Changed AnyEmbed and VideoPicker

preferencesAboutTextFull
unknown 13 years ago
parent e037fc1d73
commit 1d8d0a42a4
  1. 3
      resources/library/interactive/Anyembed.wgt/css/ubwidget.css
  2. 1
      resources/library/interactive/Anyembed.wgt/js/languages.js
  3. 44
      resources/library/interactive/Anyembed.wgt/js/ubw-main.js
  4. 195
      resources/library/interactive/VideoPicker.wgt/css/main.css
  5. 31
      resources/library/interactive/VideoPicker.wgt/index.html

@ -19,3 +19,6 @@ body{
} }
.bordered{
border: 1px solid red;
}

@ -9,4 +9,3 @@ var sankoreLang = {
"embed": "Intégrer" "embed": "Intégrer"
} }
}; };

@ -74,25 +74,35 @@ function init(){
$("#ubwidget").append(searchWrap); $("#ubwidget").append(searchWrap);
submit.click(function(){ submit.click(function(){
$("#ubwidget").append(loadWindow)
embed = inputBox.val(); embed = inputBox.val();
searchWrap.hide(); if(embed){
$("#ubwidget").append(loadWindow);
if(/<object/.test(embed)){ searchWrap.hide();
loadWindow.append(embed);
loadWindow.find("embed").attr("wmode","opaque"); if(/<object/.test(embed)){
var loadWindow_content = loadWindow.html(); loadWindow.append(embed);
loadWindow.empty().html(loadWindow_content); loadWindow.find("embed").attr("wmode","opaque");
} var loadWindow_content = loadWindow.html();
else { loadWindow.empty().html(loadWindow_content);
loadWindow.append(embed); }
else {
loadWindow.append(embed);
}
if(window.sankore){
window.sankore.resize($(document).width(),$(document).height());
window.sankore.setPreference("embed", escape(embed));
}
} else{
var sleepTime = 100;
var counter = 0;
var id = setInterval(function(){
inputBox.toggleClass("bordered");
counter ++;
if(counter == 10)
clearInterval(id);
}, sleepTime);
} }
if(window.sankore){
window.sankore.resize($(document).width(),$(document).height());
window.sankore.setPreference("embed", escape(embed));
}
}); });
if(window.sankore){ if(window.sankore){

@ -1,169 +1,176 @@
body{ body{
margin-top:10px; margin-top:10px;
margin-left:10px; margin-left:10px;
font-family:Arial, Sans-serif; font-family:Arial, Sans-serif;
font-size:15px; font-size:15px;
color:#444; color:#444;
} }
.icon-container{ .icon-container{
width:40px; width:40px;
height:40px; height:40px;
overflow:hidden; overflow:hidden;
} }
#shadow{ #shadow{
position:absolute; position:absolute;
z-index:0; z-index:0;
width:352px; width:352px;
height:58px; height:58px;
padding-left:8px; padding-left:8px;
margin-top:3px; margin-top:3px;
margin-left:3px; margin-left:3px;
background-color:rgb(220,220,220); background-color:rgb(220,220,220);
} }
#inputfield{ #inputfield{
position:absolute; position:absolute;
z-index:1; z-index:1;
width:360px; width:360px;
height:58px; height:58px;
background-color:rgb(230,230,233); background-color:rgb(230,230,233);
border:1px solid rgb(220, 220, 220); border:1px solid rgb(220, 220, 220);
} }
.button{ .button{
float:left; float:left;
padding:4px 5px; padding:4px 5px;
cursor:pointer; cursor:pointer;
background-color:rgb(45,65,250); background-color:rgb(45,65,250);
border:1px solid; border:1px solid;
border-color:rgb(45,65,250) rgb(25,45,230) rgb(25,45,230) rgb(45,65,250); border-color:rgb(45,65,250) rgb(25,45,230) rgb(25,45,230) rgb(45,65,250);
text-transform:capitalize; text-transform:capitalize;
font-size:12px; font-size:12px;
font-weight:bold; font-weight:bold;
color:white; color:white;
} }
#search-button{ #search-button{
margin-top:17px; margin-top:17px;
margin-left:17px; margin-left:17px;
} }
#search-button.over{ #search-button.over{
border-color:rgb(25,45,230) rgb(45,65,250) rgb(45,65,250) rgb(25,45,230); border-color:rgb(25,45,230) rgb(45,65,250) rgb(45,65,250) rgb(25,45,230);
} }
#show-inputfield-button{ #show-inputfield-button{
margin-left:12px; margin-left:12px;
} }
#container{ #container{
float:left; float:left;
position:relative; position:relative;
overflow:visible; overflow:visible;
height:auto; height:auto;
} }
#container.welcome{ #container.welcome{
width:405px; width:405px;
margin-top:87px; margin-top:87px;
background-color:#FFF; background-color:#FFF;
} }
#container.load{ #container.load{
margin-top:0px; margin-top:0px;
} }
#container.show{ #container.show{
margin-top:0px; margin-top:0px;
height:auto; height:auto;
} }
#container.change{ #container.change{
margin-top:80px; margin-top:80px;
height:auto; height:auto;
} }
#container.error{ #container.error{
width:400px; width:400px;
height:auto; height:auto;
margin-top:87px; margin-top:87px;
background-color:#FFF; background-color:#FFF;
position:relative; position:relative;
} }
#arrow{ #arrow{
text-align:center; text-align:center;
width:100%; width:100%;
margin-top:-36px; margin-top:-36px;
margin-bottom:-1px; margin-bottom:-1px;
position:relative; position:relative;
z-index:4; z-index:4;
} }
#embeded-content{ #embeded-content{
border:1px solid rgb(230,230,230); border:1px solid rgb(230,230,230);
position:relative; position:relative;
z-index:3; z-index:3;
float:left; float:left;
height:auto; height:auto;
} }
#show-container{ #show-container{
overflow:auto; overflow:auto;
height:auto; height:auto;
} }
#show-area{ #show-area{
display:none; display:none;
position:absolute; position:absolute;
top:150px; top:150px;
left:400px; left:400px;
z-index:999; z-index:999;
} }
#show-area .icon-container{ #show-area .icon-container{
margin:0 auto; margin:0 auto;
} }
#textbox{ #textbox{
width:245px; width:245px;
float:left; float:left;
padding:2px; padding:2px;
margin-top:17px; margin-top:17px;
margin-left:17px; margin-left:17px;
outline:none; outline:none;
border:1px solid #666; font-family:Arial, Sans-serif;
font-family:Arial, Sans-serif; font-size:15px;
font-size:15px; color:#444;
color:#444;
} }
#container-shadow{ #container-shadow{
width:100%; width:100%;
height:30px; height:30px;
} }
#container-shadow td{ #container-shadow td{
height:100%; height:100%;
} }
#shadow-left{ #shadow-left{
width:193px; width:193px;
background-image:url(../imgs/left.png); background-image:url(../imgs/left.png);
background-repeat:no-repeat; background-repeat:no-repeat;
} }
#shadow-center{ #shadow-center{
width:auto; width:auto;
background-image:url(../imgs/center.png); background-image:url(../imgs/center.png);
background-repeat:repeat; background-repeat:repeat;
} }
#shadow-right{ #shadow-right{
width:193px; width:193px;
background-image:url(../imgs/right.png); background-image:url(../imgs/right.png);
background-repeat:no-repeat; background-repeat:no-repeat;
}
.bordered1{
border: 1px solid red;
}
.bordered2{
border:1px solid #666;
} }

@ -65,15 +65,26 @@
$("#search-button") $("#search-button")
.click(function(){ .click(function(){
window.resizeTo(385, 80); if($("#textbox").val()){
$("#container").removeClass("welcome").removeClass("change").removeClass("error").addClass("load"); window.resizeTo(385, 80);
$("#container-shadow").hide(); $("#container").removeClass("welcome").removeClass("change").removeClass("error").addClass("load");
$("#arrow").hide(); $("#container-shadow").hide();
$("#embeded-content").css({ $("#arrow").hide();
marginLeft:-9000, $("#embeded-content").css({
marginTop:-9000 marginLeft:-9000,
}).empty().oembed($("#textbox").val()); marginTop:-9000
checkcontent(); }).empty().oembed($("#textbox").val());
checkcontent();
} else {
var sleepTime = 100;
var counter = 0;
var id = setInterval(function(){
$("#textbox").toggleClass("bordered1").toggleClass("bordered2");
counter ++;
if(counter == 10)
clearInterval(id);
}, sleepTime);
}
}) })
.mouseenter(function(){ .mouseenter(function(){
$(this) $(this)
@ -187,7 +198,7 @@
<div id="shadow"></div> <div id="shadow"></div>
<div id="inputfield"> <div id="inputfield">
<input id="textbox" type="text"> <input id="textbox" type="text" class="bordered2">
<div id="search-button" class="button">Show</div> <div id="search-button" class="button">Show</div>
</div> </div>

Loading…
Cancel
Save