fixed and well worked widgets

preferencesAboutTextFull
unknown 13 years ago
parent 8bc1a3cffe
commit b4cd1d1655
  1. 17
      resources/library/interactivities/ordonner_des_images.wgt/index.html
  2. 22
      resources/library/interactivities/ordonner_des_images.wgt/js/script.js
  3. 16
      resources/library/interactivities/ordonner_des_images.wgt/locales/fr/index.html
  4. 22
      resources/library/interactivities/ordonner_des_images.wgt/locales/fr/js/script.js
  5. 14
      resources/library/interactivities/ordonner_des_images.wgt/locales/ru/index.html
  6. 22
      resources/library/interactivities/ordonner_des_images.wgt/locales/ru/js/script.js

@ -15,8 +15,10 @@
lang = sankore.locale().substr(0,2); lang = sankore.locale().substr(0,2);
} else } else
lang = "en"; lang = "en";
if(lang == "en") if(lang == "en"){
sankore.enableDropOnWidget(false);
start(); start();
}
else{ else{
returnStatus(lang); returnStatus(lang);
} }
@ -35,21 +37,10 @@
} }
}); });
} }
//here you can put your code
if(window.sankore)
sankore.enableDropOnWidget();
}); });
</script> </script>
</head> </head>
<body> <body>
<!--<div class="dnd_container">
<div class="dnd_1" id="dnd_1" ondragenter="return false;" ondragleave="$(this).css('border-color','#ccc'); return false;" ondragover="$(this).css('border-color','orange'); return false;" ondrop="$(this).css('border-color','#ccc'); return onDropTarget1(event);">Drop the item here ...</div>
<div class="dnd_2" id="dnd_2" ondragenter="return false;" ondragleave="$(this).css('border-color','#ccc'); return false;" ondragover="$(this).css('border-color','orange'); return false;" ondrop="$(this).css('border-color','#ccc'); return onDropTarget2(event);">Drop the item here ...</div>
</div>
<div class='black_overlay' id='fade'></div>
<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">открыть</a></p>
<div id="light" class="white_content">
Содержание<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">закрыть</a></div>-->
<div class="toggle_mode"> <div class="toggle_mode">
<div style="width: 50%; height: 100%; float: left;"> <div style="width: 50%; height: 100%; float: left;">
<div id="display" style="float: right; width: 90px; cursor: pointer;" class="selected"> <div id="display" style="float: right; width: 90px; cursor: pointer;" class="selected">

@ -1,4 +1,10 @@
var sankoreLang = {display: "Display", edit: "Edit", short_desc: "Place the pictures in ascending order.", add: "Add new block"}; var sankoreLang = {
display: "Display",
edit: "Edit",
short_desc: "Place the pictures in ascending order.",
add: "Add new block",
enter: "Enter your text here ..."
};
//main function //main function
function start(){ function start(){
@ -18,15 +24,16 @@ function start(){
showExample(); showExample();
//events //events
$("body").live("mouseout",function(){ if (window.widget) {
if(event.target.tagName == "BODY") window.widget.onleave = function(){
if(window.sankore) exportData();
exportData(); }
}) }
$("#display, #edit").click(function(event){ $("#display, #edit").click(function(event){
if(this.id == "display"){ if(this.id == "display"){
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
sankore.enableDropOnWidget(false);
$(this).addClass("selected"); $(this).addClass("selected");
$("#display_img").removeClass("red_point").addClass("green_point"); $("#display_img").removeClass("red_point").addClass("green_point");
$("#edit_img").removeClass("green_point").addClass("red_point"); $("#edit_img").removeClass("green_point").addClass("red_point");
@ -71,6 +78,7 @@ function start(){
} }
} else { } else {
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
sankore.enableDropOnWidget(true);
$(this).addClass("selected"); $(this).addClass("selected");
$("#edit_img").removeClass("red_point").addClass("green_point"); $("#edit_img").removeClass("red_point").addClass("green_point");
$("#display_img").removeClass("green_point").addClass("red_point"); $("#display_img").removeClass("green_point").addClass("red_point");
@ -298,7 +306,7 @@ function addContainer(){
var close = $("<div class='close_cont'>").appendTo(container); var close = $("<div class='close_cont'>").appendTo(container);
var number = $("<div class='number_cont'>"+ ($(".cont").size() + 1) +"</div>").appendTo(sub_container); var number = $("<div class='number_cont'>"+ ($(".cont").size() + 1) +"</div>").appendTo(sub_container);
var text = $("<div class='text_cont' contenteditable>Enter your text here ... </div>").appendTo(sub_container); var text = $("<div class='text_cont' contenteditable>" + sankoreLang.enter + "</div>").appendTo(sub_container);
$("<input type='hidden' value='1*2*3*4*5*'/>").appendTo(imgs_container); $("<input type='hidden' value='1*2*3*4*5*'/>").appendTo(imgs_container);
var add_img = $("<div class='add_img'>").appendTo(imgs_container); var add_img = $("<div class='add_img'>").appendTo(imgs_container);

@ -8,23 +8,13 @@
<script type="text/javascript" src="../../js/jquery-ui-1.8.9.custom.min.js"></script> <script type="text/javascript" src="../../js/jquery-ui-1.8.9.custom.min.js"></script>
<script type="text/javascript" src="js/script.js"></script> <script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
sankore.enableDropOnWidget(false);
start(); start();
//here you can put your code
if(window.sankore)
sankore.enableDropOnWidget();
}); });
</script> </script>
</head> </head>
<body> <body>
<!--<div class="dnd_container">
<div class="dnd_1" id="dnd_1" ondragenter="return false;" ondragleave="$(this).css('border-color','#ccc'); return false;" ondragover="$(this).css('border-color','orange'); return false;" ondrop="$(this).css('border-color','#ccc'); return onDropTarget1(event);">Drop the item here ...</div>
<div class="dnd_2" id="dnd_2" ondragenter="return false;" ondragleave="$(this).css('border-color','#ccc'); return false;" ondragover="$(this).css('border-color','orange'); return false;" ondrop="$(this).css('border-color','#ccc'); return onDropTarget2(event);">Drop the item here ...</div>
</div>
<div class='black_overlay' id='fade'></div>
<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">открыть</a></p>
<div id="light" class="white_content">
Содержание<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">закрыть</a></div>-->
<div class="toggle_mode"> <div class="toggle_mode">
<div style="width: 50%; height: 100%; float: left;"> <div style="width: 50%; height: 100%; float: left;">
<div id="display" style="float: right; width: 130px; cursor: pointer;" class="selected"> <div id="display" style="float: right; width: 130px; cursor: pointer;" class="selected">

@ -1,5 +1,11 @@
var sankoreLang = {display: "D'affichage", edit: "Modifier", short_desc: "Placez les photos dans l'ordre croissant.", add: "Nouveau bloc"}; var sankoreLang = {
display: "D'affichage",
edit: "Modifier",
short_desc: "Placez les photos dans l'ordre croissant.",
add: "Nouveau bloc",
enter: "Entrez votre texte ici ..."
};
//main function //main function
function start(){ function start(){
@ -19,15 +25,16 @@ function start(){
showExample(); showExample();
//events //events
$("body").live("mouseout",function(){ if (window.widget) {
if(event.target.tagName == "BODY") window.widget.onleave = function(){
if(window.sankore) exportData();
exportData(); }
}) }
$("#display, #edit").click(function(event){ $("#display, #edit").click(function(event){
if(this.id == "display"){ if(this.id == "display"){
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
sankore.enableDropOnWidget(false);
$(this).addClass("selected"); $(this).addClass("selected");
$("#display_img").removeClass("red_point").addClass("green_point"); $("#display_img").removeClass("red_point").addClass("green_point");
$("#edit_img").removeClass("green_point").addClass("red_point"); $("#edit_img").removeClass("green_point").addClass("red_point");
@ -72,6 +79,7 @@ function start(){
} }
} else { } else {
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
sankore.enableDropOnWidget(true);
$(this).addClass("selected"); $(this).addClass("selected");
$("#edit_img").removeClass("red_point").addClass("green_point"); $("#edit_img").removeClass("red_point").addClass("green_point");
$("#display_img").removeClass("green_point").addClass("red_point"); $("#display_img").removeClass("green_point").addClass("red_point");
@ -274,7 +282,7 @@ function addContainer(){
var close = $("<div class='close_cont'>").appendTo(container); var close = $("<div class='close_cont'>").appendTo(container);
var number = $("<div class='number_cont'>"+ ($(".cont").size() + 1) +"</div>").appendTo(sub_container); var number = $("<div class='number_cont'>"+ ($(".cont").size() + 1) +"</div>").appendTo(sub_container);
var text = $("<div class='text_cont' contenteditable>Enter your text here ... </div>").appendTo(sub_container); var text = $("<div class='text_cont' contenteditable>" + sankoreLang.enter + "</div>").appendTo(sub_container);
$("<input type='hidden' value='1*2*3*4*5*'/>").appendTo(imgs_container); $("<input type='hidden' value='1*2*3*4*5*'/>").appendTo(imgs_container);
var add_img = $("<div class='add_img'>").appendTo(imgs_container); var add_img = $("<div class='add_img'>").appendTo(imgs_container);

@ -8,23 +8,13 @@
<script type="text/javascript" src="../../js/jquery-ui-1.8.9.custom.min.js"></script> <script type="text/javascript" src="../../js/jquery-ui-1.8.9.custom.min.js"></script>
<script type="text/javascript" src="js/script.js"></script> <script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
sankore.enableDropOnWidget(false);
start(); start();
//here you can put your code
if(window.sankore)
sankore.enableDropOnWidget();
}); });
</script> </script>
</head> </head>
<body> <body>
<!--<div class="dnd_container">
<div class="dnd_1" id="dnd_1" ondragenter="return false;" ondragleave="$(this).css('border-color','#ccc'); return false;" ondragover="$(this).css('border-color','orange'); return false;" ondrop="$(this).css('border-color','#ccc'); return onDropTarget1(event);">Drop the item here ...</div>
<div class="dnd_2" id="dnd_2" ondragenter="return false;" ondragleave="$(this).css('border-color','#ccc'); return false;" ondragover="$(this).css('border-color','orange'); return false;" ondrop="$(this).css('border-color','#ccc'); return onDropTarget2(event);">Drop the item here ...</div>
</div>
<div class='black_overlay' id='fade'></div>
<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">открыть</a></p>
<div id="light" class="white_content">
Содержание<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">закрыть</a></div>-->
<div class="toggle_mode"> <div class="toggle_mode">
<div style="width: 50%; height: 100%; float: left;"> <div style="width: 50%; height: 100%; float: left;">
<div id="display" style="float: right; width: 120px; cursor: pointer;" class="selected"> <div id="display" style="float: right; width: 120px; cursor: pointer;" class="selected">

@ -1,5 +1,11 @@
var sankoreLang = {display: "Показать", edit: "Изменить", short_desc: "Расположите картинки в порядке возрастания цифр.", add: "Новый блок"}; var sankoreLang = {
display: "Показать",
edit: "Изменить",
short_desc: "Расположите картинки в порядке возрастания цифр.",
add: "Новый блок",
enter: "Введите текст ..."
};
//main function //main function
function start(){ function start(){
@ -19,15 +25,16 @@ function start(){
showExample(); showExample();
//events //events
$("body").live("mouseout",function(){ if (window.widget) {
if(event.target.tagName == "BODY") window.widget.onleave = function(){
if(window.sankore) exportData();
exportData(); }
}) }
$("#display, #edit").click(function(event){ $("#display, #edit").click(function(event){
if(this.id == "display"){ if(this.id == "display"){
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
sankore.enableDropOnWidget(false);
$(this).addClass("selected"); $(this).addClass("selected");
$("#display_img").removeClass("red_point").addClass("green_point"); $("#display_img").removeClass("red_point").addClass("green_point");
$("#edit_img").removeClass("green_point").addClass("red_point"); $("#edit_img").removeClass("green_point").addClass("red_point");
@ -72,6 +79,7 @@ function start(){
} }
} else { } else {
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
sankore.enableDropOnWidget(true);
$(this).addClass("selected"); $(this).addClass("selected");
$("#edit_img").removeClass("red_point").addClass("green_point"); $("#edit_img").removeClass("red_point").addClass("green_point");
$("#display_img").removeClass("green_point").addClass("red_point"); $("#display_img").removeClass("green_point").addClass("red_point");
@ -274,7 +282,7 @@ function addContainer(){
var close = $("<div class='close_cont'>").appendTo(container); var close = $("<div class='close_cont'>").appendTo(container);
var number = $("<div class='number_cont'>"+ ($(".cont").size() + 1) +"</div>").appendTo(sub_container); var number = $("<div class='number_cont'>"+ ($(".cont").size() + 1) +"</div>").appendTo(sub_container);
var text = $("<div class='text_cont' contenteditable>Enter your text here ... </div>").appendTo(sub_container); var text = $("<div class='text_cont' contenteditable>" + sankoreLang.enter + "</div>").appendTo(sub_container);
$("<input type='hidden' value='1*2*3*4*5*'/>").appendTo(imgs_container); $("<input type='hidden' value='1*2*3*4*5*'/>").appendTo(imgs_container);
var add_img = $("<div class='add_img'>").appendTo(imgs_container); var add_img = $("<div class='add_img'>").appendTo(imgs_container);

Loading…
Cancel
Save