diff --git a/resources/library/interactivities/Cat images.wgt/js/script.js b/resources/library/interactivities/Cat images.wgt/js/script.js index 14b54c79..7f8ca614 100644 --- a/resources/library/interactivities/Cat images.wgt/js/script.js +++ b/resources/library/interactivities/Cat images.wgt/js/script.js @@ -34,12 +34,21 @@ function start(){ if (window.widget) { window.widget.onleave = function(){ - //exportData(); + exportData(); } } $("#wgt_reload").click(function(){ - window.location.reload(); + if($("#wgt_display").hasClass("selected")){ + $("#wgt_edit").trigger("click"); + $("#wgt_display").trigger("click"); + } else { + $("#wgt_display").trigger("click"); + } + }); + + $("#wgt_reload, #wgt_display, #wgt_edit").mouseover(function(){ + exportData(); }); $(".style_select").change(function (event){ @@ -131,9 +140,9 @@ function start(){ $("").appendTo($(this)); $("").appendTo($(this)); $(this).attr("ondragenter", "return false;") - .attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;") - .attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;") - .attr("ondrop", "$(this).css(\"background-color\",\"\"); return onDropTarget(this,event);") + .attr("ondragleave", "$(this).css(\"background-color\",\"#E6F6FF\"); return false;") + .attr("ondragover", "$(this).css(\"background-color\",\"#C3E9FF\"); return false;") + .attr("ondrop", "$(this).css(\"background-color\",\"#E6F6FF\"); return onDropTarget(this,event);") .removeClass("red_cont") .removeClass("green_cont") .addClass("def_cont") diff --git a/resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js b/resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js index 371d2623..8cf62916 100644 --- a/resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js +++ b/resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js @@ -34,12 +34,21 @@ function start(){ if (window.widget) { window.widget.onleave = function(){ - //exportData(); + exportData(); } } $("#wgt_reload").click(function(){ - window.location.reload(); + if($("#wgt_display").hasClass("selected")){ + $("#wgt_edit").trigger("click"); + $("#wgt_display").trigger("click"); + } else { + $("#wgt_display").trigger("click"); + } + }); + + $("#wgt_reload, #wgt_display, #wgt_edit").mouseover(function(){ + exportData(); }); $(".style_select").change(function (event){ @@ -131,9 +140,9 @@ function start(){ $("").appendTo($(this)); $("").appendTo($(this)); $(this).attr("ondragenter", "return false;") - .attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;") - .attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;") - .attr("ondrop", "$(this).css(\"background-color\",\"\"); return onDropTarget(this,event);") + .attr("ondragleave", "$(this).css(\"background-color\",\"#E6F6FF\"); return false;") + .attr("ondragover", "$(this).css(\"background-color\",\"#C3E9FF\"); return false;") + .attr("ondrop", "$(this).css(\"background-color\",\"#E6F6FF\"); return onDropTarget(this,event);") .removeClass("red_cont") .removeClass("green_cont") .addClass("def_cont") diff --git a/resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js b/resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js index d1f8f5fd..778a3ad5 100644 --- a/resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js +++ b/resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js @@ -34,12 +34,21 @@ function start(){ if (window.widget) { window.widget.onleave = function(){ - //exportData(); + exportData(); } } $("#wgt_reload").click(function(){ - window.location.reload(); + if($("#wgt_display").hasClass("selected")){ + $("#wgt_edit").trigger("click"); + $("#wgt_display").trigger("click"); + } else { + $("#wgt_display").trigger("click"); + } + }); + + $("#wgt_reload, #wgt_display, #wgt_edit").mouseover(function(){ + exportData(); }); $(".style_select").change(function (event){ @@ -131,9 +140,9 @@ function start(){ $("").appendTo($(this)); $("").appendTo($(this)); $(this).attr("ondragenter", "return false;") - .attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;") - .attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;") - .attr("ondrop", "$(this).css(\"background-color\",\"\"); return onDropTarget(this,event);") + .attr("ondragleave", "$(this).css(\"background-color\",\"#E6F6FF\"); return false;") + .attr("ondragover", "$(this).css(\"background-color\",\"#C3E9FF\"); return false;") + .attr("ondrop", "$(this).css(\"background-color\",\"#E6F6FF\"); return onDropTarget(this,event);") .removeClass("red_cont") .removeClass("green_cont") .addClass("def_cont") diff --git a/resources/library/interactivities/Cat text.wgt/js/script.js b/resources/library/interactivities/Cat text.wgt/js/script.js index 1ea3bc2b..d054d43d 100644 --- a/resources/library/interactivities/Cat text.wgt/js/script.js +++ b/resources/library/interactivities/Cat text.wgt/js/script.js @@ -40,12 +40,21 @@ function start(){ if (window.widget) { window.widget.onleave = function(){ - //exportData(); + exportData(); } } $("#wgt_reload").click(function(){ - window.location.reload(); + if($("#wgt_display").hasClass("selected")){ + $("#wgt_edit").trigger("click"); + $("#wgt_display").trigger("click"); + } else { + $("#wgt_display").trigger("click"); + } + }); + + $("#wgt_reload, #wgt_display, #wgt_edit").mouseover(function(){ + exportData(); }); $(".style_select").change(function (event){ @@ -202,13 +211,6 @@ function start(){ $(this).parent().remove(); } }); - - $(".text_cont").live("blur", function(){ - exportData(); - }).live("keyup", function(e){ - if (e.keyCode == 13) - exportData(); - }); } //export diff --git a/resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js b/resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js index 2f2a9c6c..db9544e3 100644 --- a/resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js +++ b/resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js @@ -13,8 +13,8 @@ var sankoreLang = { text: "Texte", wgt_name: "Catégoriser des textes", reload: "Recharger", - slate: "Ardoise", - pad: "Tablette" + slate: "Bois", + pad: "Pad" }; //main function @@ -40,12 +40,21 @@ function start(){ if (window.widget) { window.widget.onleave = function(){ - //exportData(); + exportData(); } } $("#wgt_reload").click(function(){ - window.location.reload(); + if($("#wgt_display").hasClass("selected")){ + $("#wgt_edit").trigger("click"); + $("#wgt_display").trigger("click"); + } else { + $("#wgt_display").trigger("click"); + } + }); + + $("#wgt_reload, #wgt_display, #wgt_edit").mouseover(function(){ + exportData(); }); $(".style_select").change(function (event){ @@ -202,13 +211,6 @@ function start(){ $(this).parent().remove(); } }); - - $(".text_cont").live("blur", function(){ - exportData(); - }).live("keyup", function(e){ - if (e.keyCode == 13) - exportData(); - }); } //export diff --git a/resources/library/interactivities/Cat text.wgt/locales/ru/js/script.js b/resources/library/interactivities/Cat text.wgt/locales/ru/js/script.js index 7c66426b..6abe92ac 100644 --- a/resources/library/interactivities/Cat text.wgt/locales/ru/js/script.js +++ b/resources/library/interactivities/Cat text.wgt/locales/ru/js/script.js @@ -40,12 +40,21 @@ function start(){ if (window.widget) { window.widget.onleave = function(){ - //exportData(); + exportData(); } } $("#wgt_reload").click(function(){ - window.location.reload(); + if($("#wgt_display").hasClass("selected")){ + $("#wgt_edit").trigger("click"); + $("#wgt_display").trigger("click"); + } else { + $("#wgt_display").trigger("click"); + } + }); + + $("#wgt_reload, #wgt_display, #wgt_edit").mouseover(function(){ + exportData(); }); $(".style_select").change(function (event){ @@ -202,13 +211,6 @@ function start(){ $(this).parent().remove(); } }); - - $(".text_cont").live("blur", function(){ - exportData(); - }).live("keyup", function(e){ - if (e.keyCode == 13) - exportData(); - }); } //export diff --git a/resources/library/interactivities/Ordre images.wgt/index.html b/resources/library/interactivities/Ordre images.wgt/index.html index 5b38539e..e8e11b60 100644 --- a/resources/library/interactivities/Ordre images.wgt/index.html +++ b/resources/library/interactivities/Ordre images.wgt/index.html @@ -5,7 +5,7 @@ - + @@ -17,7 +17,8 @@ } else lang = "en"; if(lang == "en"){ - sankore.enableDropOnWidget(false); + if(window.sankore) + sankore.enableDropOnWidget(false); start(); } else{ @@ -57,17 +58,17 @@