diff --git a/resources/library/interactivities/Ass images.wgt/index.html b/resources/library/interactivities/Ass images.wgt/index.html index 2fe76f4c..dd36faee 100644 --- a/resources/library/interactivities/Ass images.wgt/index.html +++ b/resources/library/interactivities/Ass images.wgt/index.html @@ -16,7 +16,6 @@ lang = sankore.locale().substr(0,2); } else lang = "en"; - lang = "fr"; if(lang == "en"){ if(window.sankore) sankore.enableDropOnWidget(false); diff --git a/resources/library/interactivities/Ass images.wgt/js/script.js b/resources/library/interactivities/Ass images.wgt/js/script.js index 7bf02f67..f819ddd5 100644 --- a/resources/library/interactivities/Ass images.wgt/js/script.js +++ b/resources/library/interactivities/Ass images.wgt/js/script.js @@ -359,7 +359,9 @@ function importData(data){ for(var j in data[i].imgs){ var img_block = $("
"); var img = $(""); - img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd); + + img.height(data[i].imgs[j].ht); + if((120 - data[i].imgs[j].ht) > 0) img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0"); @@ -445,7 +447,7 @@ function importData(data){ for(j in data[i].imgs){ img_block = $("
"); img = $(""); - img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd); + img.height(data[i].imgs[j].ht); if((120 - data[i].imgs[j].ht) > 0) img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0"); hidden_input = $("").val(data[i].imgs[j].value); @@ -771,9 +773,10 @@ function onDropTarget(obj, event) { tmp_img.attr("height", "120"); else{ tmp_img.attr("width","120"); + var h = tmp_img.height(); + tmp_img.attr("height",h); tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0"); } - exportData(); }, 6) } diff --git a/resources/library/interactivities/Ass images.wgt/locales/fr/js/script.js b/resources/library/interactivities/Ass images.wgt/locales/fr/js/script.js index 6ffa8120..45280242 100644 --- a/resources/library/interactivities/Ass images.wgt/locales/fr/js/script.js +++ b/resources/library/interactivities/Ass images.wgt/locales/fr/js/script.js @@ -357,7 +357,7 @@ function importData(data){ for(var j in data[i].imgs){ var img_block = $("
"); var img = $(""); - img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd); + img.height(data[i].imgs[j].ht); if((120 - data[i].imgs[j].ht) > 0) img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0"); var hidden_input = $("").val(data[i].imgs[j].value); @@ -440,7 +440,7 @@ function importData(data){ for(j in data[i].imgs){ img_block = $("
"); img = $(""); - img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd); + img.height(data[i].imgs[j].ht); if((120 - data[i].imgs[j].ht) > 0) img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0"); hidden_input = $("").val(data[i].imgs[j].value); @@ -766,6 +766,8 @@ function onDropTarget(obj, event) { tmp_img.attr("height", "120"); else{ tmp_img.attr("width","120"); + var h = tmp_img.height(); + tmp_img.attr("height",h); tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0"); } exportData(); diff --git a/resources/library/interactivities/Ass images.wgt/locales/ru/js/script.js b/resources/library/interactivities/Ass images.wgt/locales/ru/js/script.js index 6cd777b6..0b840aaa 100644 --- a/resources/library/interactivities/Ass images.wgt/locales/ru/js/script.js +++ b/resources/library/interactivities/Ass images.wgt/locales/ru/js/script.js @@ -8,7 +8,9 @@ var sankoreLang = { reload: "Обновить", slate: "Узор", pad: "Планшет", - none: "Нет" + none: "Нет", + help: "Помощь", + help_content: "Пример текста помощи ..." }; @@ -356,7 +358,7 @@ function importData(data){ for(var j in data[i].imgs){ var img_block = $("
"); var img = $(""); - img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd); + img.height(data[i].imgs[j].ht); if((120 - data[i].imgs[j].ht) > 0) img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0"); var hidden_input = $("").val(data[i].imgs[j].value); @@ -439,7 +441,7 @@ function importData(data){ for(j in data[i].imgs){ img_block = $("
"); img = $(""); - img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd); + img.height(data[i].imgs[j].ht); if((120 - data[i].imgs[j].ht) > 0) img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0"); hidden_input = $("").val(data[i].imgs[j].value); @@ -765,6 +767,8 @@ function onDropTarget(obj, event) { tmp_img.attr("height", "120"); else{ tmp_img.attr("width","120"); + var h = tmp_img.height(); + tmp_img.attr("height",h); tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0"); } exportData(); diff --git a/resources/library/interactivities/Ass sons.wgt/css/basic.css b/resources/library/interactivities/Ass sons.wgt/css/basic.css index 86a7248c..b684a1d8 100644 --- a/resources/library/interactivities/Ass sons.wgt/css/basic.css +++ b/resources/library/interactivities/Ass sons.wgt/css/basic.css @@ -4,6 +4,7 @@ html, body{ margin: 0; padding: 0; border-radius: 50px; + overflow: hidden; } body{ @@ -318,7 +319,6 @@ body{ #wgt_name{ height: 44px; - width: 300px; margin: 10px 10px 0 10px; padding: 0; float: left; @@ -327,9 +327,8 @@ body{ color: #8c5730; } -#wgt_reload, #wgt_edit, #wgt_display{ +#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{ cursor: pointer; - width: 80px; height: 44px; margin: 10px 10px 0 0; float: right; @@ -339,7 +338,6 @@ body{ } #wgt_display{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -348,7 +346,6 @@ body{ } #wgt_edit{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -440,4 +437,28 @@ body{ background-color: #333 !important; color: white !important; background-image: url(../img/ar_down_white.png) !important; +} + +.pad_help{ + background-image: url(../img/slate-help-white.png) !important; +} + +#wgt_help{ + padding-left: 32px; + background-image: url(../img/slate-help.png); + background-repeat: no-repeat; + background-position: top 0; +} + +#help{ + width: 100%; + height: 100%; + overflow: auto; + display: none; + background-color: #ccc; + padding: 5px; +} + +.open{ + } \ No newline at end of file diff --git a/resources/library/interactivities/Ass sons.wgt/img/slate-help-white.png b/resources/library/interactivities/Ass sons.wgt/img/slate-help-white.png new file mode 100644 index 00000000..7b5ebfd8 Binary files /dev/null and b/resources/library/interactivities/Ass sons.wgt/img/slate-help-white.png differ diff --git a/resources/library/interactivities/Ass sons.wgt/img/slate-help.png b/resources/library/interactivities/Ass sons.wgt/img/slate-help.png new file mode 100644 index 00000000..069052d0 Binary files /dev/null and b/resources/library/interactivities/Ass sons.wgt/img/slate-help.png differ diff --git a/resources/library/interactivities/Ass sons.wgt/index.html b/resources/library/interactivities/Ass sons.wgt/index.html index 0715e1a6..1aec98d8 100644 --- a/resources/library/interactivities/Ass sons.wgt/index.html +++ b/resources/library/interactivities/Ass sons.wgt/index.html @@ -48,6 +48,7 @@  
+
@@ -63,6 +64,7 @@   +
diff --git a/resources/library/interactivities/Ass sons.wgt/js/script.js b/resources/library/interactivities/Ass sons.wgt/js/script.js index b02281c2..796dc06c 100644 --- a/resources/library/interactivities/Ass sons.wgt/js/script.js +++ b/resources/library/interactivities/Ass sons.wgt/js/script.js @@ -8,7 +8,9 @@ var sankoreLang = { reload: "Reload", slate: "Wood", pad: "Pad", - none: "None" + none: "None", + help: "Help", + help_content: "This is an example of help content ..." }; //main function @@ -18,6 +20,8 @@ function start(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -46,6 +50,21 @@ function start(){ } } + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -385,7 +404,7 @@ function importData(data){ for(var j in data[i].imgs){ var img_block = $("
"); var img = $(""); - img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd); + img.height(data[i].imgs[j].ht); if((120 - data[i].imgs[j].ht) > 0) img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0"); var hidden_input = $("").val(data[i].imgs[j].value); @@ -476,7 +495,7 @@ function importData(data){ for(j in data[i].imgs){ img_block = $("
"); img = $(""); - img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd); + img.height(data[i].imgs[j].ht); if((120 - data[i].imgs[j].ht) > 0) img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0"); hidden_input = $("").val(data[i].imgs[j].value); @@ -756,6 +775,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -772,6 +792,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -787,6 +808,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); @@ -814,6 +836,8 @@ function onDropTarget(obj, event) { tmp_img.attr("height", "120"); else{ tmp_img.attr("width","120"); + var h = tmp_img.height(); + tmp_img.attr("height",h); tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0"); } }, 6) diff --git a/resources/library/interactivities/Ass sons.wgt/locales/fr/index.html b/resources/library/interactivities/Ass sons.wgt/locales/fr/index.html index 1ab412a3..38c7a8c7 100644 --- a/resources/library/interactivities/Ass sons.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Ass sons.wgt/locales/fr/index.html @@ -22,6 +22,7 @@  
+
@@ -37,6 +38,7 @@   +
diff --git a/resources/library/interactivities/Ass sons.wgt/locales/fr/js/script.js b/resources/library/interactivities/Ass sons.wgt/locales/fr/js/script.js index 47fe6cf9..cc1fd6cf 100644 --- a/resources/library/interactivities/Ass sons.wgt/locales/fr/js/script.js +++ b/resources/library/interactivities/Ass sons.wgt/locales/fr/js/script.js @@ -8,7 +8,9 @@ var sankoreLang = { reload: "Recharger", slate: "Bois", pad: "Pad", - none: "Aucun" + none: "Aucun", + help: "Aide", + help_content: "Ceci est un exemple de contenu de l'aide ..." }; //main function @@ -18,6 +20,8 @@ function start(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -46,6 +50,21 @@ function start(){ } } + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -382,7 +401,7 @@ function importData(data){ for(var j in data[i].imgs){ var img_block = $("
"); var img = $(""); - img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd); + img.height(data[i].imgs[j].ht); if((120 - data[i].imgs[j].ht) > 0) img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0"); var hidden_input = $("").val(data[i].imgs[j].value); @@ -473,7 +492,7 @@ function importData(data){ for(j in data[i].imgs){ img_block = $("
"); img = $(""); - img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd); + img.height(data[i].imgs[j].ht); if((120 - data[i].imgs[j].ht) > 0) img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0"); hidden_input = $("").val(data[i].imgs[j].value); @@ -741,6 +760,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -757,6 +777,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -772,6 +793,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); @@ -799,6 +821,8 @@ function onDropTarget(obj, event) { tmp_img.attr("height", "120"); else{ tmp_img.attr("width","120"); + var h = tmp_img.height(); + tmp_img.attr("height",h); tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0"); } }, 6) diff --git a/resources/library/interactivities/Ass sons.wgt/locales/ru/index.html b/resources/library/interactivities/Ass sons.wgt/locales/ru/index.html index 192e73cf..1fb435c9 100644 --- a/resources/library/interactivities/Ass sons.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Ass sons.wgt/locales/ru/index.html @@ -22,6 +22,7 @@  
+
@@ -37,6 +38,7 @@   +
diff --git a/resources/library/interactivities/Ass sons.wgt/locales/ru/js/script.js b/resources/library/interactivities/Ass sons.wgt/locales/ru/js/script.js index 36092793..d10aefee 100644 --- a/resources/library/interactivities/Ass sons.wgt/locales/ru/js/script.js +++ b/resources/library/interactivities/Ass sons.wgt/locales/ru/js/script.js @@ -8,7 +8,9 @@ var sankoreLang = { reload: "Обновить", slate: "Узор", pad: "Планшет", - none: "Нет" + none: "Нет", + help: "Помощь", + help_content: "Пример текста помощи ..." }; //main function @@ -18,6 +20,8 @@ function start(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -46,6 +50,21 @@ function start(){ } } + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -382,7 +401,7 @@ function importData(data){ for(var j in data[i].imgs){ var img_block = $("
"); var img = $(""); - img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd); + img.height(data[i].imgs[j].ht); if((120 - data[i].imgs[j].ht) > 0) img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0"); var hidden_input = $("").val(data[i].imgs[j].value); @@ -473,7 +492,7 @@ function importData(data){ for(j in data[i].imgs){ img_block = $("
"); img = $(""); - img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd); + img.height(data[i].imgs[j].ht); if((120 - data[i].imgs[j].ht) > 0) img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0"); hidden_input = $("").val(data[i].imgs[j].value); @@ -741,6 +760,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -757,6 +777,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -772,6 +793,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); @@ -799,6 +821,8 @@ function onDropTarget(obj, event) { tmp_img.attr("height", "120"); else{ tmp_img.attr("width","120"); + var h = tmp_img.height(); + tmp_img.attr("height",h); tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0"); } }, 6) diff --git a/resources/library/interactivities/Cat images.wgt/css/basic.css b/resources/library/interactivities/Cat images.wgt/css/basic.css index ee34f168..64362b4a 100644 --- a/resources/library/interactivities/Cat images.wgt/css/basic.css +++ b/resources/library/interactivities/Cat images.wgt/css/basic.css @@ -4,6 +4,7 @@ html, body{ margin: 0; padding: 0; border-radius: 50px; + overflow: hidden; } body{ @@ -175,7 +176,7 @@ body{ } .dropBack{ - + } .def_cont{ @@ -260,7 +261,6 @@ body{ #wgt_name{ height: 44px; - width: 300px; margin: 10px 10px 0 10px; padding: 0; float: left; @@ -269,9 +269,8 @@ body{ color: #8c5730; } -#wgt_reload, #wgt_edit, #wgt_display{ +#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{ cursor: pointer; - width: 80px; height: 44px; margin: 10px 10px 0 0; float: right; @@ -281,7 +280,6 @@ body{ } #wgt_display{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -290,7 +288,6 @@ body{ } #wgt_edit{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -382,4 +379,28 @@ body{ background-color: #333 !important; color: white !important; background-image: url(../img/ar_down_white.png) !important; +} + +.pad_help{ + background-image: url(../img/slate-help-white.png) !important; +} + +#wgt_help{ + padding-left: 32px; + background-image: url(../img/slate-help.png); + background-repeat: no-repeat; + background-position: top 0; +} + +#help{ + width: 100%; + height: 100%; + overflow: auto; + display: none; + background-color: #ccc; + padding: 5px; +} + +.open{ + } \ No newline at end of file diff --git a/resources/library/interactivities/Cat images.wgt/img/slate-help-white.png b/resources/library/interactivities/Cat images.wgt/img/slate-help-white.png new file mode 100644 index 00000000..7b5ebfd8 Binary files /dev/null and b/resources/library/interactivities/Cat images.wgt/img/slate-help-white.png differ diff --git a/resources/library/interactivities/Cat images.wgt/img/slate-help.png b/resources/library/interactivities/Cat images.wgt/img/slate-help.png new file mode 100644 index 00000000..069052d0 Binary files /dev/null and b/resources/library/interactivities/Cat images.wgt/img/slate-help.png differ diff --git a/resources/library/interactivities/Cat images.wgt/index.html b/resources/library/interactivities/Cat images.wgt/index.html index 2d064cae..688bb52f 100644 --- a/resources/library/interactivities/Cat images.wgt/index.html +++ b/resources/library/interactivities/Cat images.wgt/index.html @@ -48,6 +48,7 @@  
+
@@ -63,6 +64,7 @@   +
diff --git a/resources/library/interactivities/Cat images.wgt/js/script.js b/resources/library/interactivities/Cat images.wgt/js/script.js index 35d53a44..3f239c07 100644 --- a/resources/library/interactivities/Cat images.wgt/js/script.js +++ b/resources/library/interactivities/Cat images.wgt/js/script.js @@ -9,7 +9,9 @@ var sankoreLang = { reload: "Reload", slate: "Wood", pad: "Pad", - none: "None" + none: "None", + help: "Help", + help_content: "This is an example of help content ..." }; //main function @@ -19,6 +21,8 @@ function start(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -40,6 +44,21 @@ function start(){ } } + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -212,7 +231,7 @@ function start(){ //export function exportData(){ var array_to_export = []; - if($("#edit").hasClass("selected")){ + if($("#wgt_edit").hasClass("selected")){ $(".cont").each(function(){ var cont_obj = new Object(); cont_obj.style = $(".style_select").find("option:selected").val(); @@ -310,13 +329,10 @@ function importData(data){ for(var k in data[i].conts[j].imgs){ var block_img = $("
"); $("").appendTo(block_img); - var img = $("").appendTo(block_img); - if(data[i].conts[j].imgs[k].ht >= data[i].conts[j].imgs[k].wd) - img.attr("height", "120"); - else{ - img.attr("width","120"); + var img = $("").appendTo(block_img); + img.height(data[i].conts[j].imgs[k].ht); + if((120 - data[i].conts[j].imgs[k].ht) > 0) img.css("margin",(120 - data[i].conts[j].imgs[k].ht)/2 + "px 0"); - } tmp_array.push(block_img); } @@ -376,12 +392,9 @@ function importData(data){ block_img = $("
"); $("").appendTo(block_img); img = $("").appendTo(block_img); - if(data[i].conts[j].imgs[k].ht >= data[i].conts[j].imgs[k].wd) - img.attr("height", "120"); - else{ - img.attr("width","120"); + img.height(data[i].conts[j].imgs[k].ht); + if((120 - data[i].conts[j].imgs[k].ht) > 0) img.css("margin",(120 - data[i].conts[j].imgs[k].ht)/2 + "px 0"); - } tmp_img_array.push(block_img); } @@ -413,7 +426,10 @@ function importData(data){ for(j in data[i].all_imgs){ block_img = $("
"); $("").appendTo(block_img); - $("").appendTo(block_img); + img = $("").appendTo(block_img); + img.height(data[i].all_imgs[j].ht); + if((120 - data[i].all_imgs[j].ht) > 0) + img.css("margin",(120 - data[i].all_imgs[j].ht)/2 + "px 0"); all_imgs_arr.push(block_img); } @@ -607,6 +623,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -623,6 +640,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -638,6 +656,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); @@ -750,6 +769,8 @@ function onDropTarget(obj, event) { tmp_img.attr("height", "120"); else{ tmp_img.attr("width","120"); + var h = tmp_img.height(); + tmp_img.attr("height",h); tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0"); } clearInterval(tmp_id); @@ -760,6 +781,8 @@ function onDropTarget(obj, event) { tmp_img.attr("height", "120"); else{ tmp_img.attr("width","120"); + var h = tmp_img.height(); + tmp_img.attr("height",h); tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0"); } } diff --git a/resources/library/interactivities/Cat images.wgt/locales/fr/index.html b/resources/library/interactivities/Cat images.wgt/locales/fr/index.html index d6a7a856..7d188794 100644 --- a/resources/library/interactivities/Cat images.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Cat images.wgt/locales/fr/index.html @@ -22,6 +22,7 @@  
+
@@ -33,17 +34,18 @@   - +   +
- +
  - +     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 dcb5ea02..0b45e459 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 @@ -9,7 +9,9 @@ var sankoreLang = { reload: "Recharger", slate: "ardoise", pad: "tablette", - none: "aucun" + none: "aucun", + help: "aide", + help_content: "Ceci est un exemple de contenu de l'aide ..." }; //main function @@ -19,6 +21,8 @@ function start(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -40,6 +44,21 @@ function start(){ } } + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -210,7 +229,7 @@ function start(){ //export function exportData(){ var array_to_export = []; - if($("#edit").hasClass("selected")){ + if($("#wgt_edit").hasClass("selected")){ $(".cont").each(function(){ var cont_obj = new Object(); cont_obj.style = $(".style_select").find("option:selected").val(); @@ -225,8 +244,7 @@ function exportData(){ $(this).find(".img_block").each(function(){ var img_obj = new Object(); img_obj.value = $(this).find("input").val(); - img_obj.link = $(this).find("img").attr("src").replace("../../",""); - ; + img_obj.link = $(this).find("img").attr("src").replace("../../",""); img_obj.ht = $(this).find("img").height(); img_obj.wd = $(this).find("img").width(); img_cont.imgs.push(img_obj); @@ -250,8 +268,7 @@ function exportData(){ $(this).find(".img_block").each(function(){ var img_obj = new Object(); img_obj.value = $(this).find("input").val(); - img_obj.link = $(this).find("img").attr("src").replace("../../",""); - ; + img_obj.link = $(this).find("img").attr("src").replace("../../",""); img_obj.ht = $(this).find("img").height(); img_obj.wd = $(this).find("img").width(); img_cont.imgs.push(img_obj); @@ -262,8 +279,7 @@ function exportData(){ $(this).find(".all_imgs .img_block").each(function(){ var img = new Object(); img.value = $(this).find("input").val(); - img.link = $(this).find("img").attr("src").replace("../../",""); - ; + img.link = $(this).find("img").attr("src").replace("../../",""); img.ht = $(this).find("img").height(); img.wd = $(this).find("img").width(); cont_obj.all_imgs.push(img); @@ -312,12 +328,9 @@ function importData(data){ var block_img = $("
"); $("").appendTo(block_img); var img = $("").appendTo(block_img); - if(data[i].conts[j].imgs[k].ht >= data[i].conts[j].imgs[k].wd) - img.attr("height", "120"); - else{ - img.attr("width","120"); + img.height(data[i].conts[j].imgs[k].ht); + if((120 - data[i].conts[j].imgs[k].ht) > 0) img.css("margin",(120 - data[i].conts[j].imgs[k].ht)/2 + "px 0"); - } tmp_array.push(block_img); } @@ -377,12 +390,9 @@ function importData(data){ block_img = $("
"); $("").appendTo(block_img); img = $("").appendTo(block_img); - if(data[i].conts[j].imgs[k].ht >= data[i].conts[j].imgs[k].wd) - img.attr("height", "120"); - else{ - img.attr("width","120"); + img.height(data[i].conts[j].imgs[k].ht); + if((120 - data[i].conts[j].imgs[k].ht) > 0) img.css("margin",(120 - data[i].conts[j].imgs[k].ht)/2 + "px 0"); - } tmp_img_array.push(block_img); } @@ -414,7 +424,10 @@ function importData(data){ for(j in data[i].all_imgs){ block_img = $("
"); $("").appendTo(block_img); - $("").appendTo(block_img); + img = $("").appendTo(block_img); + img.height(data[i].all_imgs[j].ht); + if((120 - data[i].all_imgs[j].ht) > 0) + img.css("margin",(120 - data[i].all_imgs[j].ht)/2 + "px 0"); all_imgs_arr.push(block_img); } @@ -621,6 +634,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -637,6 +651,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -652,6 +667,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); @@ -752,6 +768,8 @@ function onDropTarget(obj, event) { tmp_img.attr("height", "120"); else{ tmp_img.attr("width","120"); + var h = tmp_img.height(); + tmp_img.attr("height",h); tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0"); } clearInterval(tmp_id); @@ -762,6 +780,8 @@ function onDropTarget(obj, event) { tmp_img.attr("height", "120"); else{ tmp_img.attr("width","120"); + var h = tmp_img.height(); + tmp_img.attr("height",h); tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0"); } } diff --git a/resources/library/interactivities/Cat images.wgt/locales/ru/index.html b/resources/library/interactivities/Cat images.wgt/locales/ru/index.html index 28bab651..10f242f8 100644 --- a/resources/library/interactivities/Cat images.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Cat images.wgt/locales/ru/index.html @@ -22,6 +22,7 @@  
+
@@ -33,17 +34,18 @@   - +   +
- +
  - +     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 89662f28..c6a2ab6d 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 @@ -9,7 +9,9 @@ var sankoreLang = { reload: "Обновить", slate: "Узор", pad: "Планшет", - none: "Нет" + none: "Нет", + help: "Помощь", + help_content: "Пример текста помощи ..." }; //main function @@ -19,6 +21,8 @@ function start(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -40,6 +44,21 @@ function start(){ } } + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -210,7 +229,7 @@ function start(){ //export function exportData(){ var array_to_export = []; - if($("#edit").hasClass("selected")){ + if($("#wgt_edit").hasClass("selected")){ $(".cont").each(function(){ var cont_obj = new Object(); cont_obj.style = $(".style_select").find("option:selected").val(); @@ -312,12 +331,9 @@ function importData(data){ var block_img = $("
"); $("").appendTo(block_img); var img = $("").appendTo(block_img); - if(data[i].conts[j].imgs[k].ht >= data[i].conts[j].imgs[k].wd) - img.attr("height", "120"); - else{ - img.attr("width","120"); + img.height(data[i].conts[j].imgs[k].ht); + if((120 - data[i].conts[j].imgs[k].ht) > 0) img.css("margin",(120 - data[i].conts[j].imgs[k].ht)/2 + "px 0"); - } tmp_array.push(block_img); } @@ -377,12 +393,9 @@ function importData(data){ block_img = $("
"); $("").appendTo(block_img); img = $("").appendTo(block_img); - if(data[i].conts[j].imgs[k].ht >= data[i].conts[j].imgs[k].wd) - img.attr("height", "120"); - else{ - img.attr("width","120"); + img.height(data[i].conts[j].imgs[k].ht); + if((120 - data[i].conts[j].imgs[k].ht) > 0) img.css("margin",(120 - data[i].conts[j].imgs[k].ht)/2 + "px 0"); - } tmp_img_array.push(block_img); } @@ -414,7 +427,10 @@ function importData(data){ for(j in data[i].all_imgs){ block_img = $("
"); $("").appendTo(block_img); - $("").appendTo(block_img); + img = $("").appendTo(block_img); + img.height(data[i].all_imgs[j].ht); + if((120 - data[i].all_imgs[j].ht) > 0) + img.css("margin",(120 - data[i].all_imgs[j].ht)/2 + "px 0"); all_imgs_arr.push(block_img); } @@ -621,6 +637,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -637,6 +654,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -652,6 +670,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); @@ -752,6 +771,8 @@ function onDropTarget(obj, event) { tmp_img.attr("height", "120"); else{ tmp_img.attr("width","120"); + var h = tmp_img.height(); + tmp_img.attr("height",h); tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0"); } clearInterval(tmp_id); @@ -762,6 +783,8 @@ function onDropTarget(obj, event) { tmp_img.attr("height", "120"); else{ tmp_img.attr("width","120"); + var h = tmp_img.height(); + tmp_img.attr("height",h); tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0"); } } diff --git a/resources/library/interactivities/Cat text.wgt/css/basic.css b/resources/library/interactivities/Cat text.wgt/css/basic.css index 086731a4..e73ae42c 100644 --- a/resources/library/interactivities/Cat text.wgt/css/basic.css +++ b/resources/library/interactivities/Cat text.wgt/css/basic.css @@ -4,6 +4,7 @@ html, body{ margin: 0; padding: 0; border-radius: 50px; + overflow: hidden; } body{ @@ -282,7 +283,6 @@ body{ #wgt_name{ height: 44px; - width: 300px; margin: 10px 10px 0 10px; padding: 0; float: left; @@ -291,9 +291,8 @@ body{ color: #8c5730; } -#wgt_reload, #wgt_edit, #wgt_display{ +#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{ cursor: pointer; - width: 80px; height: 44px; margin: 10px 10px 0 0; float: right; @@ -303,7 +302,6 @@ body{ } #wgt_display{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -312,7 +310,6 @@ body{ } #wgt_edit{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -404,4 +401,28 @@ body{ background-color: #333 !important; color: white !important; background-image: url(../img/ar_down_white.png) !important; +} + +.pad_help{ + background-image: url(../img/slate-help-white.png) !important; +} + +#wgt_help{ + padding-left: 32px; + background-image: url(../img/slate-help.png); + background-repeat: no-repeat; + background-position: top 0; +} + +#help{ + width: 100%; + height: 100%; + overflow: auto; + display: none; + background-color: #ccc; + padding: 5px; +} + +.open{ + } \ No newline at end of file diff --git a/resources/library/interactivities/Cat text.wgt/img/slate-help-white.png b/resources/library/interactivities/Cat text.wgt/img/slate-help-white.png new file mode 100644 index 00000000..7b5ebfd8 Binary files /dev/null and b/resources/library/interactivities/Cat text.wgt/img/slate-help-white.png differ diff --git a/resources/library/interactivities/Cat text.wgt/img/slate-help.png b/resources/library/interactivities/Cat text.wgt/img/slate-help.png new file mode 100644 index 00000000..069052d0 Binary files /dev/null and b/resources/library/interactivities/Cat text.wgt/img/slate-help.png differ diff --git a/resources/library/interactivities/Cat text.wgt/index.html b/resources/library/interactivities/Cat text.wgt/index.html index 2d064cae..688bb52f 100644 --- a/resources/library/interactivities/Cat text.wgt/index.html +++ b/resources/library/interactivities/Cat text.wgt/index.html @@ -48,6 +48,7 @@  
+
@@ -63,6 +64,7 @@   +
diff --git a/resources/library/interactivities/Cat text.wgt/js/script.js b/resources/library/interactivities/Cat text.wgt/js/script.js index e93657ef..12653ac4 100644 --- a/resources/library/interactivities/Cat text.wgt/js/script.js +++ b/resources/library/interactivities/Cat text.wgt/js/script.js @@ -15,7 +15,9 @@ var sankoreLang = { reload: "Reload", slate: "Wood", pad: "Pad", - none: "None" + none: "None", + help: "Help", + help_content: "This is an example of help content ..." }; //main function @@ -25,6 +27,8 @@ function start(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -46,6 +50,21 @@ function start(){ } } + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -621,6 +640,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -637,6 +657,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -652,6 +673,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); diff --git a/resources/library/interactivities/Cat text.wgt/locales/fr/index.html b/resources/library/interactivities/Cat text.wgt/locales/fr/index.html index 7373be46..3636c4ab 100644 --- a/resources/library/interactivities/Cat text.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Cat text.wgt/locales/fr/index.html @@ -22,6 +22,7 @@  
+
@@ -33,17 +34,18 @@   - +   +
- +
  - +     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 dceeda65..2170c2f4 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 @@ -15,7 +15,9 @@ var sankoreLang = { reload: "Recharger", slate: "ardoise", pad: "tablette", - none: "aucun" + none: "aucun", + help: "aide", + help_content: "Ceci est un exemple de contenu de l'aide ..." }; //main function @@ -25,6 +27,8 @@ function start(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -46,6 +50,21 @@ function start(){ } } + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -621,6 +640,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -637,6 +657,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -652,6 +673,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); diff --git a/resources/library/interactivities/Cat text.wgt/locales/ru/index.html b/resources/library/interactivities/Cat text.wgt/locales/ru/index.html index 1486cc60..27c62f8d 100644 --- a/resources/library/interactivities/Cat text.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Cat text.wgt/locales/ru/index.html @@ -22,6 +22,7 @@  
+
@@ -33,17 +34,18 @@   - +   +
- +
  - +     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 a1811bed..dade5268 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 @@ -15,7 +15,9 @@ var sankoreLang = { reload: "Обновить", slate: "Узор", pad: "Планшет", - none: "Нет" + none: "Нет", + help: "Помощь", + help_content: "Пример текста помощи ..." }; //main function @@ -25,6 +27,8 @@ function start(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -46,6 +50,21 @@ function start(){ } } + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -621,6 +640,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -637,6 +657,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -652,6 +673,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); diff --git a/resources/library/interactivities/Choisir.wgt/css/basic.css b/resources/library/interactivities/Choisir.wgt/css/basic.css index fa6a48fd..a391cfa7 100644 --- a/resources/library/interactivities/Choisir.wgt/css/basic.css +++ b/resources/library/interactivities/Choisir.wgt/css/basic.css @@ -17,6 +17,7 @@ html, body{ margin: 0; padding: 0; border-radius: 50px; + overflow: hidden; } body{ @@ -469,7 +470,6 @@ body{ #wgt_name{ height: 44px; - width: 360px; margin: 10px 10px 0 10px; padding: 0; float: left; @@ -478,9 +478,8 @@ body{ color: #8c5730; } -#wgt_reload, #wgt_edit, #wgt_display{ +#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{ cursor: pointer; - width: 80px; height: 44px; margin: 10px 10px 0 0; float: right; @@ -490,7 +489,6 @@ body{ } #wgt_display{ - width: 100px; padding-left: 40px; background-image: url(../images/slate-edit.png); background-repeat: no-repeat; @@ -499,7 +497,6 @@ body{ } #wgt_edit{ - width: 100px; padding-left: 40px; background-image: url(../images/slate-edit.png); background-repeat: no-repeat; @@ -591,4 +588,28 @@ body{ background-color: #333 !important; color: white !important; background-image: url(../images/ar_down_white.png) !important; +} + +.pad_help{ + background-image: url(../images/slate-help-white.png) !important; +} + +#wgt_help{ + padding-left: 32px; + background-image: url(../images/slate-help.png); + background-repeat: no-repeat; + background-position: top 0; +} + +#help{ + width: 100%; + height: 100%; + overflow: auto; + display: none; + background-color: #ccc; + padding: 5px; +} + +.open{ + } \ No newline at end of file diff --git a/resources/library/interactivities/Choisir.wgt/images/slate-help-white.png b/resources/library/interactivities/Choisir.wgt/images/slate-help-white.png new file mode 100644 index 00000000..7b5ebfd8 Binary files /dev/null and b/resources/library/interactivities/Choisir.wgt/images/slate-help-white.png differ diff --git a/resources/library/interactivities/Choisir.wgt/images/slate-help.png b/resources/library/interactivities/Choisir.wgt/images/slate-help.png new file mode 100644 index 00000000..069052d0 Binary files /dev/null and b/resources/library/interactivities/Choisir.wgt/images/slate-help.png differ diff --git a/resources/library/interactivities/Choisir.wgt/index.html b/resources/library/interactivities/Choisir.wgt/index.html index a5da22f8..5d5bc7cd 100644 --- a/resources/library/interactivities/Choisir.wgt/index.html +++ b/resources/library/interactivities/Choisir.wgt/index.html @@ -51,6 +51,7 @@ and open the template in the editor.  
+
@@ -66,6 +67,7 @@ and open the template in the editor.   +
diff --git a/resources/library/interactivities/Choisir.wgt/locales/fr/index.html b/resources/library/interactivities/Choisir.wgt/locales/fr/index.html index e2130333..cafbc283 100644 --- a/resources/library/interactivities/Choisir.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Choisir.wgt/locales/fr/index.html @@ -26,6 +26,7 @@ and open the template in the editor.  
+
@@ -41,6 +42,7 @@ and open the template in the editor.   +
diff --git a/resources/library/interactivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js b/resources/library/interactivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js index 52f82e74..4ba41239 100644 --- a/resources/library/interactivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js +++ b/resources/library/interactivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js @@ -39,7 +39,9 @@ var sankoreLang = { reload: "Recharger", slate: "ardoise", pad: "tablette", - none: "aucun" + none: "aucun", + help: "aide", + help_content: "Ceci est un exemple de contenu de l'aide ..." }; var questionArray; @@ -61,6 +63,8 @@ function init(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -138,6 +142,21 @@ function init(){ } } }); + + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); $("#wgt_reload").text(sankoreLang.reload).click(function(){ if($("#wgt_edit").css("display") == "none") @@ -722,6 +741,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -738,6 +758,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -753,6 +774,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); diff --git a/resources/library/interactivities/Choisir.wgt/locales/ru/index.html b/resources/library/interactivities/Choisir.wgt/locales/ru/index.html index e2130333..cafbc283 100644 --- a/resources/library/interactivities/Choisir.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Choisir.wgt/locales/ru/index.html @@ -26,6 +26,7 @@ and open the template in the editor.  
+
@@ -41,6 +42,7 @@ and open the template in the editor.   +
diff --git a/resources/library/interactivities/Choisir.wgt/locales/ru/scripts/selQuestionApp.js b/resources/library/interactivities/Choisir.wgt/locales/ru/scripts/selQuestionApp.js index 3f2649bf..62980f84 100644 --- a/resources/library/interactivities/Choisir.wgt/locales/ru/scripts/selQuestionApp.js +++ b/resources/library/interactivities/Choisir.wgt/locales/ru/scripts/selQuestionApp.js @@ -39,7 +39,9 @@ var sankoreLang = { reload: "Обновить", slate: "Узор", pad: "Планшет", - none: "Нет" + none: "Нет", + help: "Помощь", + help_content: "Пример текста помощи ..." }; var questionArray; @@ -61,6 +63,8 @@ function init(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -139,6 +143,21 @@ function init(){ } }); + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").text(sankoreLang.reload).click(function(){ if($("#wgt_edit").css("display") == "none") $("#wgt_display").trigger("click"); @@ -722,6 +741,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -738,6 +758,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -753,6 +774,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); diff --git a/resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js b/resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js index 363b27a6..b1f64e10 100644 --- a/resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js +++ b/resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js @@ -39,7 +39,9 @@ var sankoreLang = { reload: "Reload", slate: "Wood", pad: "Pad", - none: "None" + none: "None", + help: "Help", + help_content: "This is an example of help content ..." }; var questionArray; @@ -61,6 +63,8 @@ function init(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -139,6 +143,21 @@ function init(){ } }); + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").text(sankoreLang.reload).click(function(){ if($("#wgt_edit").css("display") == "none") $("#wgt_display").trigger("click"); @@ -722,6 +741,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -738,6 +758,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -753,6 +774,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); diff --git a/resources/library/interactivities/Contraste.wgt/css/basic.css b/resources/library/interactivities/Contraste.wgt/css/basic.css index 8dcf09e7..6ca92f51 100644 --- a/resources/library/interactivities/Contraste.wgt/css/basic.css +++ b/resources/library/interactivities/Contraste.wgt/css/basic.css @@ -4,6 +4,7 @@ html, body{ margin: 0; padding: 0; border-radius: 50px; + overflow: hidden; } body{ @@ -255,7 +256,6 @@ body{ #wgt_name{ height: 44px; - width: 200px; margin: 10px 10px 0 10px; padding: 0; float: left; @@ -264,9 +264,8 @@ body{ color: #8c5730; } -#wgt_reload, #wgt_edit, #wgt_display,#wgt_add{ +#wgt_reload, #wgt_edit, #wgt_display,#wgt_add, #wgt_help{ cursor: pointer; - width: 95px; height: 44px; margin: 10px 10px 0 0; float: right; @@ -276,7 +275,6 @@ body{ } #wgt_display{ - width: 100px; padding-left: 40px; background-image: url(../images/slate-edit.png); background-repeat: no-repeat; @@ -285,7 +283,6 @@ body{ } #wgt_edit{ - width: 100px; padding-left: 40px; background-image: url(../images/slate-edit.png); background-repeat: no-repeat; @@ -389,4 +386,28 @@ body{ background-color: #333 !important; color: white !important; background-image: url(../images/ar_down_white.png) !important; +} + +.pad_help{ + background-image: url(../images/slate-help-white.png) !important; +} + +#wgt_help{ + padding-left: 32px; + background-image: url(../images/slate-help.png); + background-repeat: no-repeat; + background-position: top 0; +} + +#help{ + width: 100%; + height: 100%; + overflow: auto; + display: none; + background-color: #ccc; + padding: 5px; +} + +.open{ + } \ No newline at end of file diff --git a/resources/library/interactivities/Contraste.wgt/images/slate-help-white.png b/resources/library/interactivities/Contraste.wgt/images/slate-help-white.png new file mode 100644 index 00000000..7b5ebfd8 Binary files /dev/null and b/resources/library/interactivities/Contraste.wgt/images/slate-help-white.png differ diff --git a/resources/library/interactivities/Contraste.wgt/images/slate-help.png b/resources/library/interactivities/Contraste.wgt/images/slate-help.png new file mode 100644 index 00000000..069052d0 Binary files /dev/null and b/resources/library/interactivities/Contraste.wgt/images/slate-help.png differ diff --git a/resources/library/interactivities/Contraste.wgt/index.html b/resources/library/interactivities/Contraste.wgt/index.html index 49ada30b..0072e219 100644 --- a/resources/library/interactivities/Contraste.wgt/index.html +++ b/resources/library/interactivities/Contraste.wgt/index.html @@ -47,6 +47,7 @@  
+
@@ -63,6 +64,7 @@   +
diff --git a/resources/library/interactivities/Contraste.wgt/locales/fr/index.html b/resources/library/interactivities/Contraste.wgt/locales/fr/index.html index 4412dcb5..f2cecf06 100644 --- a/resources/library/interactivities/Contraste.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Contraste.wgt/locales/fr/index.html @@ -27,6 +27,7 @@ and open the template in the editor.  
+
@@ -43,6 +44,7 @@ and open the template in the editor.   +
diff --git a/resources/library/interactivities/Contraste.wgt/locales/fr/scripts/blackYellow.js b/resources/library/interactivities/Contraste.wgt/locales/fr/scripts/blackYellow.js index 379b3606..7f0cfb19 100644 --- a/resources/library/interactivities/Contraste.wgt/locales/fr/scripts/blackYellow.js +++ b/resources/library/interactivities/Contraste.wgt/locales/fr/scripts/blackYellow.js @@ -25,7 +25,9 @@ var sankoreLang = { reload: "Recharger", slate: "ardoise", pad: "tablette", - none: "aucun" + none: "aucun", + help: "aide", + help_content: "Ceci est un exemple de contenu de l'aide ..." }; function init(){ @@ -60,6 +62,8 @@ function init(){ $("#wgt_add").text(sankoreLang.add); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -157,6 +161,21 @@ function init(){ } } }); + + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); $("#wgt_reload").click(function(){ window.location.reload(); @@ -400,6 +419,7 @@ function changeStyle(val){ $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_add").removeClass("pad_color").removeClass("pad_add"); $("#wgt_name").removeClass("pad_color"); @@ -417,6 +437,7 @@ function changeStyle(val){ $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_add").addClass("pad_color").addClass("pad_add"); $("#wgt_name").addClass("pad_color"); @@ -434,6 +455,7 @@ function changeStyle(val){ $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_add").addClass("pad_color").addClass("pad_add"); $("#wgt_name").addClass("pad_color"); diff --git a/resources/library/interactivities/Contraste.wgt/locales/ru/index.html b/resources/library/interactivities/Contraste.wgt/locales/ru/index.html index 4412dcb5..f2cecf06 100644 --- a/resources/library/interactivities/Contraste.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Contraste.wgt/locales/ru/index.html @@ -27,6 +27,7 @@ and open the template in the editor.  
+
@@ -43,6 +44,7 @@ and open the template in the editor.   +
diff --git a/resources/library/interactivities/Contraste.wgt/locales/ru/scripts/blackYellow.js b/resources/library/interactivities/Contraste.wgt/locales/ru/scripts/blackYellow.js index 88a39ea6..d77e7108 100644 --- a/resources/library/interactivities/Contraste.wgt/locales/ru/scripts/blackYellow.js +++ b/resources/library/interactivities/Contraste.wgt/locales/ru/scripts/blackYellow.js @@ -25,7 +25,9 @@ var sankoreLang = { reload: "Обновить", slate: "Узор", pad: "Планшет", - none: "Нет" + none: "Нет", + help: "Помощь", + help_content: "Пример текста помощи ..." }; function init(){ @@ -60,6 +62,8 @@ function init(){ $("#wgt_add").text(sankoreLang.add); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -157,6 +161,21 @@ function init(){ } } }); + + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); $("#wgt_reload").click(function(){ window.location.reload(); @@ -400,6 +419,7 @@ function changeStyle(val){ $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_add").removeClass("pad_color").removeClass("pad_add"); $("#wgt_name").removeClass("pad_color"); @@ -417,6 +437,7 @@ function changeStyle(val){ $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_add").addClass("pad_color").addClass("pad_add"); $("#wgt_name").addClass("pad_color"); @@ -434,6 +455,7 @@ function changeStyle(val){ $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_add").addClass("pad_color").addClass("pad_add"); $("#wgt_name").addClass("pad_color"); diff --git a/resources/library/interactivities/Contraste.wgt/scripts/blackYellow.js b/resources/library/interactivities/Contraste.wgt/scripts/blackYellow.js index ae08cfd9..85cdaab2 100644 --- a/resources/library/interactivities/Contraste.wgt/scripts/blackYellow.js +++ b/resources/library/interactivities/Contraste.wgt/scripts/blackYellow.js @@ -25,7 +25,9 @@ var sankoreLang = { reload: "Reload", slate: "Wood", pad: "Pad", - none: "None" + none: "None", + help: "Help", + help_content: "This is an example of help content ..." }; function init(){ @@ -60,6 +62,8 @@ function init(){ $("#wgt_add").text(sankoreLang.add); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -158,6 +162,21 @@ function init(){ } }); + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").click(function(){ window.location.reload(); }); @@ -374,8 +393,8 @@ function checkEmptyFields(field){ //adding a new task to the page function addTask(expression, result){ var lastItem = $(".editContainer:last"), - lastItemPos = lastItem.length ? lastItem.position().top : 45, - lastItemHeight = lastItem.length ? lastItem.height() : 0; + lastItemPos = lastItem.length ? lastItem.position().top : 45, + lastItemHeight = lastItem.length ? lastItem.height() : 0; var editContent = $("
").width(240).height(70).css("top", lastItemPos + lastItemHeight + 15 + "px").appendTo("#data"); var closeItem = $("
").appendTo(editContent); var rightResize = $("
").appendTo(editContent); @@ -400,6 +419,7 @@ function changeStyle(val){ $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_add").removeClass("pad_color").removeClass("pad_add"); $("#wgt_name").removeClass("pad_color"); @@ -417,6 +437,7 @@ function changeStyle(val){ $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_add").addClass("pad_color").addClass("pad_add"); $("#wgt_name").addClass("pad_color"); @@ -434,6 +455,7 @@ function changeStyle(val){ $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_add").addClass("pad_color").addClass("pad_add"); $("#wgt_name").addClass("pad_color"); diff --git a/resources/library/interactivities/Etudier.wgt/img/slate-help-white.png b/resources/library/interactivities/Etudier.wgt/img/slate-help-white.png new file mode 100644 index 00000000..7b5ebfd8 Binary files /dev/null and b/resources/library/interactivities/Etudier.wgt/img/slate-help-white.png differ diff --git a/resources/library/interactivities/Etudier.wgt/img/slate-help.png b/resources/library/interactivities/Etudier.wgt/img/slate-help.png new file mode 100644 index 00000000..069052d0 Binary files /dev/null and b/resources/library/interactivities/Etudier.wgt/img/slate-help.png differ diff --git a/resources/library/interactivities/Ordre images.wgt/css/basic.css b/resources/library/interactivities/Ordre images.wgt/css/basic.css index 5ee47f9a..cc891579 100644 --- a/resources/library/interactivities/Ordre images.wgt/css/basic.css +++ b/resources/library/interactivities/Ordre images.wgt/css/basic.css @@ -4,6 +4,7 @@ html, body{ margin: 0; padding: 0; border-radius: 50px; + overflow: hidden; } body{ @@ -240,7 +241,6 @@ body{ #wgt_name{ height: 44px; - width: 300px; margin: 10px 10px 0 10px; padding: 0; float: left; @@ -249,9 +249,8 @@ body{ color: #8c5730; } -#wgt_reload, #wgt_edit, #wgt_display{ +#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{ cursor: pointer; - width: 80px; height: 44px; margin: 10px 10px 0 0; float: right; @@ -261,7 +260,6 @@ body{ } #wgt_display{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -270,7 +268,6 @@ body{ } #wgt_edit{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -362,4 +359,28 @@ body{ background-color: #333 !important; color: white !important; background-image: url(../img/ar_down_white.png) !important; +} + +.pad_help{ + background-image: url(../img/slate-help-white.png) !important; +} + +#wgt_help{ + padding-left: 32px; + background-image: url(../img/slate-help.png); + background-repeat: no-repeat; + background-position: top 0; +} + +#help{ + width: 100%; + height: 100%; + overflow: auto; + display: none; + background-color: #ccc; + padding: 5px; +} + +.open{ + } \ No newline at end of file diff --git a/resources/library/interactivities/Ordre images.wgt/img/slate-help-white.png b/resources/library/interactivities/Ordre images.wgt/img/slate-help-white.png new file mode 100644 index 00000000..7b5ebfd8 Binary files /dev/null and b/resources/library/interactivities/Ordre images.wgt/img/slate-help-white.png differ diff --git a/resources/library/interactivities/Ordre images.wgt/img/slate-help.png b/resources/library/interactivities/Ordre images.wgt/img/slate-help.png new file mode 100644 index 00000000..069052d0 Binary files /dev/null and b/resources/library/interactivities/Ordre images.wgt/img/slate-help.png differ diff --git a/resources/library/interactivities/Ordre images.wgt/index.html b/resources/library/interactivities/Ordre images.wgt/index.html index 4719f037..53ab2c3d 100644 --- a/resources/library/interactivities/Ordre images.wgt/index.html +++ b/resources/library/interactivities/Ordre images.wgt/index.html @@ -48,6 +48,7 @@  
+
@@ -59,17 +60,18 @@   - +   +
- +
  - +     diff --git a/resources/library/interactivities/Ordre images.wgt/js/script.js b/resources/library/interactivities/Ordre images.wgt/js/script.js index 791b9d28..f0a4ca0c 100644 --- a/resources/library/interactivities/Ordre images.wgt/js/script.js +++ b/resources/library/interactivities/Ordre images.wgt/js/script.js @@ -8,7 +8,9 @@ var sankoreLang = { reload: "Reload", slate: "Wood", pad: "Pad", - none: "None" + none: "None", + help: "Help", + help_content: "This is an example of help content ..." }; //main function @@ -18,6 +20,8 @@ function start(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -40,6 +44,21 @@ function start(){ } } + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -255,7 +274,7 @@ function importData(data){ for(var j in data[i].imgs){ var img_block = $("
"); var img = $(""); - img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd); + img.height(data[i].imgs[j].ht); if((120 - data[i].imgs[j].ht) > 0) img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0"); var hidden_input = $("").val(data[i].imgs[j].value); @@ -430,6 +449,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -446,6 +466,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -461,6 +482,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); @@ -500,9 +522,10 @@ function onDropTarget(obj, event) { tmp_img.attr("height", "120"); else{ tmp_img.attr("width","120"); + var h = tmp_img.height(); + tmp_img.attr("height",h); tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0"); } - exportData(); }, 6) } else { diff --git a/resources/library/interactivities/Ordre images.wgt/locales/fr/index.html b/resources/library/interactivities/Ordre images.wgt/locales/fr/index.html index 144a3b3a..6151ae43 100644 --- a/resources/library/interactivities/Ordre images.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Ordre images.wgt/locales/fr/index.html @@ -22,6 +22,7 @@  
+
@@ -37,6 +38,7 @@   +
diff --git a/resources/library/interactivities/Ordre images.wgt/locales/fr/js/script.js b/resources/library/interactivities/Ordre images.wgt/locales/fr/js/script.js index 02b392b9..c0620f09 100644 --- a/resources/library/interactivities/Ordre images.wgt/locales/fr/js/script.js +++ b/resources/library/interactivities/Ordre images.wgt/locales/fr/js/script.js @@ -9,7 +9,9 @@ var sankoreLang = { reload: "Recharger", slate: "ardoise", pad: "tablette", - none: "aucun" + none: "aucun", + help: "aide", + help_content: "Ceci est un exemple de contenu de l'aide ..." }; //main function @@ -19,6 +21,8 @@ function start(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -41,6 +45,21 @@ function start(){ } } + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -248,7 +267,7 @@ function importData(data){ for(var j in data[i].imgs){ var img_block = $("
"); var img = $(""); - img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd); + img.height(data[i].imgs[j].ht); if((120 - data[i].imgs[j].ht) > 0) img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0"); var hidden_input = $("").val(data[i].imgs[j].value); @@ -349,7 +368,7 @@ function addContainer(){ //add new img block function addImgBlock(dest){ - var img_block = $("
").insertBefore(dest); + var img_block = $("
").insertBefore(dest); var tmp_counter = dest.parent().find(".img_block").size(); $("
").appendTo(img_block); $("
").appendTo(img_block); @@ -422,6 +441,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -438,6 +458,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -453,6 +474,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); @@ -492,9 +514,10 @@ function onDropTarget(obj, event) { tmp_img.attr("height", "120"); else{ tmp_img.attr("width","120"); + var h = tmp_img.height(); + tmp_img.attr("height",h); tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0"); } - exportData(); }, 6) } else { diff --git a/resources/library/interactivities/Ordre images.wgt/locales/ru/index.html b/resources/library/interactivities/Ordre images.wgt/locales/ru/index.html index 144a3b3a..6151ae43 100644 --- a/resources/library/interactivities/Ordre images.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Ordre images.wgt/locales/ru/index.html @@ -22,6 +22,7 @@  
+
@@ -37,6 +38,7 @@   +
diff --git a/resources/library/interactivities/Ordre images.wgt/locales/ru/js/script.js b/resources/library/interactivities/Ordre images.wgt/locales/ru/js/script.js index d033c1b0..4f709a3c 100644 --- a/resources/library/interactivities/Ordre images.wgt/locales/ru/js/script.js +++ b/resources/library/interactivities/Ordre images.wgt/locales/ru/js/script.js @@ -9,7 +9,9 @@ var sankoreLang = { reload: "Обновить", slate: "Узор", pad: "Планшет", - none: "Нет" + none: "Нет", + help: "Помощь", + help_content: "Пример текста помощи ..." }; //main function @@ -19,6 +21,8 @@ function start(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -41,6 +45,21 @@ function start(){ } } + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -248,7 +267,7 @@ function importData(data){ for(var j in data[i].imgs){ var img_block = $("
"); var img = $(""); - img.height(data[i].imgs[j].ht).width(data[i].imgs[j].wd); + img.height(data[i].imgs[j].ht); if((120 - data[i].imgs[j].ht) > 0) img.css("margin",(120 - data[i].imgs[j].ht)/2 + "px 0"); var hidden_input = $("").val(data[i].imgs[j].value); @@ -349,7 +368,7 @@ function addContainer(){ //add new img block function addImgBlock(dest){ - var img_block = $("
").insertBefore(dest); + var img_block = $("
").insertBefore(dest); var tmp_counter = dest.parent().find(".img_block").size(); $("
").appendTo(img_block); $("
").appendTo(img_block); @@ -422,6 +441,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -438,6 +458,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -453,6 +474,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); @@ -492,6 +514,8 @@ function onDropTarget(obj, event) { tmp_img.attr("height", "120"); else{ tmp_img.attr("width","120"); + var h = tmp_img.height(); + tmp_img.attr("height",h); tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0"); } exportData(); diff --git a/resources/library/interactivities/Ordre lettres.wgt/css/basic.css b/resources/library/interactivities/Ordre lettres.wgt/css/basic.css index 1bcdec7b..6830edb2 100644 --- a/resources/library/interactivities/Ordre lettres.wgt/css/basic.css +++ b/resources/library/interactivities/Ordre lettres.wgt/css/basic.css @@ -4,6 +4,7 @@ html, body{ margin: 0; padding: 0; border-radius: 50px; + overflow: hidden; } body{ @@ -286,7 +287,6 @@ body{ #wgt_name{ height: 44px; - width: 300px; margin: 10px 10px 0 10px; padding: 0; float: left; @@ -295,9 +295,8 @@ body{ color: #8c5730; } -#wgt_reload, #wgt_edit, #wgt_display{ +#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{ cursor: pointer; - width: 80px; height: 44px; margin: 10px 10px 0 0; float: right; @@ -307,7 +306,6 @@ body{ } #wgt_display{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -316,7 +314,6 @@ body{ } #wgt_edit{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -408,4 +405,28 @@ body{ background-color: #333 !important; color: white !important; background-image: url(../img/ar_down_white.png) !important; +} + +.pad_help{ + background-image: url(../img/slate-help-white.png) !important; +} + +#wgt_help{ + padding-left: 32px; + background-image: url(../img/slate-help.png); + background-repeat: no-repeat; + background-position: top 0; +} + +#help{ + width: 100%; + height: 100%; + overflow: auto; + display: none; + background-color: #ccc; + padding: 5px; +} + +.open{ + } \ No newline at end of file diff --git a/resources/library/interactivities/Ordre lettres.wgt/img/slate-help-white.png b/resources/library/interactivities/Ordre lettres.wgt/img/slate-help-white.png new file mode 100644 index 00000000..7b5ebfd8 Binary files /dev/null and b/resources/library/interactivities/Ordre lettres.wgt/img/slate-help-white.png differ diff --git a/resources/library/interactivities/Ordre lettres.wgt/img/slate-help.png b/resources/library/interactivities/Ordre lettres.wgt/img/slate-help.png new file mode 100644 index 00000000..069052d0 Binary files /dev/null and b/resources/library/interactivities/Ordre lettres.wgt/img/slate-help.png differ diff --git a/resources/library/interactivities/Ordre lettres.wgt/index.html b/resources/library/interactivities/Ordre lettres.wgt/index.html index 0715e1a6..1aec98d8 100644 --- a/resources/library/interactivities/Ordre lettres.wgt/index.html +++ b/resources/library/interactivities/Ordre lettres.wgt/index.html @@ -48,6 +48,7 @@  
+
@@ -63,6 +64,7 @@   +
diff --git a/resources/library/interactivities/Ordre lettres.wgt/js/script.js b/resources/library/interactivities/Ordre lettres.wgt/js/script.js index 32c7f1df..66e9855f 100644 --- a/resources/library/interactivities/Ordre lettres.wgt/js/script.js +++ b/resources/library/interactivities/Ordre lettres.wgt/js/script.js @@ -9,7 +9,9 @@ var sankoreLang = { reload: "Reload", slate: "Wood", pad: "Pad", - none: "None" + none: "None", + help: "Help", + help_content: "This is an example of help content ..." }; //main function @@ -19,6 +21,8 @@ function start(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -46,6 +50,21 @@ function start(){ } } + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -340,16 +359,16 @@ function showExample(){ } //check result -function checkResult(event) -{ - var str = ""; - var right_str = $(event.target).find("input").val(); - $(event.target).find(".img_block").each(function(){ - str += $(this).find("input").val() + "*"; - }); - if(str == right_str) - $(event.target).css("background-color","#9f9"); -} +//function checkResult(event) +//{ +// var str = ""; +// var right_str = $(event.target).find("input").val(); +// $(event.target).find(".img_block").each(function(){ +// str += $(this).find("input").val() + "*"; +// }); +// if(str == right_str) +// $(event.target).css("background-color","#9f9"); +//} //add new container function addContainer(){ @@ -414,8 +433,7 @@ function checkResult(event) .addClass("imgs_answers_green"); else $(event.target).removeClass("imgs_answers_gray") - .removeClass("imgs_answers_green") - .addClass("imgs_answers_red"); + .removeClass("imgs_answers_green"); } function stringToXML(text){ @@ -443,6 +461,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -459,6 +478,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -474,6 +494,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); diff --git a/resources/library/interactivities/Ordre lettres.wgt/locales/fr/index.html b/resources/library/interactivities/Ordre lettres.wgt/locales/fr/index.html index 1ab412a3..38c7a8c7 100644 --- a/resources/library/interactivities/Ordre lettres.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Ordre lettres.wgt/locales/fr/index.html @@ -22,6 +22,7 @@  
+
@@ -37,6 +38,7 @@   +
diff --git a/resources/library/interactivities/Ordre lettres.wgt/locales/fr/js/script.js b/resources/library/interactivities/Ordre lettres.wgt/locales/fr/js/script.js index 3584f83f..83a1edf0 100644 --- a/resources/library/interactivities/Ordre lettres.wgt/locales/fr/js/script.js +++ b/resources/library/interactivities/Ordre lettres.wgt/locales/fr/js/script.js @@ -9,7 +9,9 @@ var sankoreLang = { reload: "Recharger", slate: "Bois", pad: "Pad", - none: "Aucun" + none: "Aucun", + help: "Aide", + help_content: "Ceci est un exemple de contenu de l'aide ..." }; //main function @@ -19,6 +21,8 @@ function start(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -46,6 +50,21 @@ function start(){ } } + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -334,16 +353,16 @@ function showExample(){ } //check result -function checkResult(event) -{ - var str = ""; - var right_str = $(event.target).find("input").val(); - $(event.target).find(".img_block").each(function(){ - str += $(this).find("input").val() + "*"; - }); - if(str == right_str) - $(event.target).css("background-color","#9f9"); -} +//function checkResult(event) +//{ +// var str = ""; +// var right_str = $(event.target).find("input").val(); +// $(event.target).find(".img_block").each(function(){ +// str += $(this).find("input").val() + "*"; +// }); +// if(str == right_str) +// $(event.target).css("background-color","#9f9"); +//} //add new container function addContainer(){ @@ -408,8 +427,7 @@ function checkResult(event) .addClass("imgs_answers_green"); else $(event.target).removeClass("imgs_answers_gray") - .removeClass("imgs_answers_green") - .addClass("imgs_answers_red"); + .removeClass("imgs_answers_green"); } function stringToXML(text){ @@ -437,6 +455,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -453,6 +472,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -468,6 +488,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); diff --git a/resources/library/interactivities/Ordre lettres.wgt/locales/ru/index.html b/resources/library/interactivities/Ordre lettres.wgt/locales/ru/index.html index 192e73cf..1fb435c9 100644 --- a/resources/library/interactivities/Ordre lettres.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Ordre lettres.wgt/locales/ru/index.html @@ -22,6 +22,7 @@  
+
@@ -37,6 +38,7 @@   +
diff --git a/resources/library/interactivities/Ordre lettres.wgt/locales/ru/js/script.js b/resources/library/interactivities/Ordre lettres.wgt/locales/ru/js/script.js index befb959f..c12ef6eb 100644 --- a/resources/library/interactivities/Ordre lettres.wgt/locales/ru/js/script.js +++ b/resources/library/interactivities/Ordre lettres.wgt/locales/ru/js/script.js @@ -9,7 +9,9 @@ var sankoreLang = { reload: "Обновить", slate: "Узор", pad: "Планшет", - none: "Нет" + none: "Нет", + help: "Помощь", + help_content: "Пример текста помощи ..." }; @@ -20,6 +22,8 @@ function start(){ $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); $(".style_select option[value='3']").text(sankoreLang.none); @@ -47,6 +51,21 @@ function start(){ } } + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#data").show(); + }); + } else { + $("#data").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -335,16 +354,16 @@ function showExample(){ } //check result -function checkResult(event) -{ - var str = ""; - var right_str = $(event.target).find("input").val(); - $(event.target).find(".img_block").each(function(){ - str += $(this).find("input").val() + "*"; - }); - if(str == right_str) - $(event.target).css("background-color","#9f9"); -} +//function checkResult(event) +//{ +// var str = ""; +// var right_str = $(event.target).find("input").val(); +// $(event.target).find(".img_block").each(function(){ +// str += $(this).find("input").val() + "*"; +// }); +// if(str == right_str) +// $(event.target).css("background-color","#9f9"); +//} //add new container function addContainer(){ @@ -409,8 +428,7 @@ function checkResult(event) .addClass("imgs_answers_green"); else $(event.target).removeClass("imgs_answers_gray") - .removeClass("imgs_answers_green") - .addClass("imgs_answers_red"); + .removeClass("imgs_answers_green"); } function stringToXML(text){ @@ -438,6 +456,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -454,6 +473,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -469,6 +489,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); diff --git a/resources/library/interactivities/Ordre mots.wgt/img/slate-help-white.png b/resources/library/interactivities/Ordre mots.wgt/img/slate-help-white.png new file mode 100644 index 00000000..7b5ebfd8 Binary files /dev/null and b/resources/library/interactivities/Ordre mots.wgt/img/slate-help-white.png differ diff --git a/resources/library/interactivities/Ordre mots.wgt/img/slate-help.png b/resources/library/interactivities/Ordre mots.wgt/img/slate-help.png new file mode 100644 index 00000000..069052d0 Binary files /dev/null and b/resources/library/interactivities/Ordre mots.wgt/img/slate-help.png differ diff --git a/resources/library/interactivities/Ordre mots.wgt/index.html b/resources/library/interactivities/Ordre mots.wgt/index.html index 9a7cb14b..80615e61 100644 --- a/resources/library/interactivities/Ordre mots.wgt/index.html +++ b/resources/library/interactivities/Ordre mots.wgt/index.html @@ -59,6 +59,7 @@  
+
@@ -74,6 +75,7 @@   +
diff --git a/resources/library/interactivities/Ordre mots.wgt/locales/fr/index.html b/resources/library/interactivities/Ordre mots.wgt/locales/fr/index.html index 09bf56aa..8918641f 100644 --- a/resources/library/interactivities/Ordre mots.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Ordre mots.wgt/locales/fr/index.html @@ -30,6 +30,7 @@  
+
@@ -45,6 +46,7 @@   +
diff --git a/resources/library/interactivities/Ordre mots.wgt/locales/fr/scripts/template2.js b/resources/library/interactivities/Ordre mots.wgt/locales/fr/scripts/template2.js index 70e765b7..08499234 100644 --- a/resources/library/interactivities/Ordre mots.wgt/locales/fr/scripts/template2.js +++ b/resources/library/interactivities/Ordre mots.wgt/locales/fr/scripts/template2.js @@ -34,7 +34,9 @@ var sankoreLang = { reload: "Recharger", slate: "ardoise", pad: "tablette", - none: "aucun" + none: "aucun", + help: "aide", + help_content: "Ceci est un exemple de contenu de l'aide ..." }; var word = ""; @@ -73,8 +75,12 @@ $(document).ready(function(){ changeStyle("3") } else changeStyle("3") + $("#wgt_display").text(sankoreLang.view); $("#wgt_edit").text(sankoreLang.edit); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); + $("#wgt_display, #wgt_edit").click(function(event){ if(this.id == "wgt_display"){ if(!$(this).hasClass("selected")){ @@ -99,6 +105,21 @@ $(document).ready(function(){ $("#wgt_name").text(sankoreLang.wgt_name); + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#ub-widget").show(); + }); + } else { + $("#ub-widget").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").text(sankoreLang.reload).click(function(){ if(wgtState) $("#wgt_display").trigger("click"); @@ -202,6 +223,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -218,6 +240,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -233,6 +256,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); diff --git a/resources/library/interactivities/Ordre mots.wgt/locales/ru/index.html b/resources/library/interactivities/Ordre mots.wgt/locales/ru/index.html index 09bf56aa..8918641f 100644 --- a/resources/library/interactivities/Ordre mots.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Ordre mots.wgt/locales/ru/index.html @@ -30,6 +30,7 @@  
+
@@ -45,6 +46,7 @@   +
diff --git a/resources/library/interactivities/Ordre mots.wgt/locales/ru/scripts/template2.js b/resources/library/interactivities/Ordre mots.wgt/locales/ru/scripts/template2.js index 5a7e095e..3b267590 100644 --- a/resources/library/interactivities/Ordre mots.wgt/locales/ru/scripts/template2.js +++ b/resources/library/interactivities/Ordre mots.wgt/locales/ru/scripts/template2.js @@ -34,7 +34,9 @@ var sankoreLang = { reload: "Обновить", slate: "Узор", pad: "Планшет", - none: "Нет" + none: "Нет", + help: "Помощь", + help_content: "Пример текста помощи ..." }; var word = ""; @@ -75,6 +77,9 @@ $(document).ready(function(){ changeStyle("3") $("#wgt_display").text(sankoreLang.view); $("#wgt_edit").text(sankoreLang.edit); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); + $("#wgt_display, #wgt_edit").click(function(event){ if(this.id == "wgt_display"){ if(!$(this).hasClass("selected")){ @@ -99,6 +104,21 @@ $(document).ready(function(){ $("#wgt_name").text(sankoreLang.wgt_name); + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#ub-widget").show(); + }); + } else { + $("#ub-widget").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").text(sankoreLang.reload).click(function(){ if(wgtState) $("#wgt_display").trigger("click"); @@ -202,6 +222,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -218,6 +239,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -233,6 +255,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); diff --git a/resources/library/interactivities/Ordre mots.wgt/scripts/template2.js b/resources/library/interactivities/Ordre mots.wgt/scripts/template2.js index ef75b7ce..db966b89 100644 --- a/resources/library/interactivities/Ordre mots.wgt/scripts/template2.js +++ b/resources/library/interactivities/Ordre mots.wgt/scripts/template2.js @@ -34,7 +34,9 @@ var sankoreLang = { reload: "Reload", slate: "Wood", pad: "Pad", - none: "None" + none: "None", + help: "Help", + help_content: "This is an example of help content ..." }; var word = ""; @@ -75,6 +77,9 @@ $(document).ready(function(){ changeStyle("3") $("#wgt_display").text(sankoreLang.view); $("#wgt_edit").text(sankoreLang.edit); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); + $("#wgt_display, #wgt_edit").click(function(event){ if(this.id == "wgt_display"){ if(!$(this).hasClass("selected")){ @@ -99,6 +104,21 @@ $(document).ready(function(){ $("#wgt_name").text(sankoreLang.wgt_name); + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#ub-widget").show(); + }); + } else { + $("#ub-widget").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").text(sankoreLang.reload).click(function(){ if(wgtState) $("#wgt_display").trigger("click"); @@ -202,6 +222,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -218,6 +239,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -233,6 +255,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); diff --git a/resources/library/interactivities/Ordre mots.wgt/styles/of_puppets.css b/resources/library/interactivities/Ordre mots.wgt/styles/of_puppets.css index 0a1c5924..111e3199 100644 --- a/resources/library/interactivities/Ordre mots.wgt/styles/of_puppets.css +++ b/resources/library/interactivities/Ordre mots.wgt/styles/of_puppets.css @@ -4,6 +4,7 @@ html, body{ margin: 0; padding: 0; border-radius: 50px; + overflow: hidden; } body{ @@ -135,7 +136,6 @@ body{ #wgt_name{ height: 44px; - width: 300px; margin: 10px 10px 0 10px; padding: 0; float: left; @@ -144,9 +144,8 @@ body{ color: #8c5730; } -#wgt_reload, #wgt_edit, #wgt_display{ +#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{ cursor: pointer; - width: 80px; height: 44px; margin: 10px 10px 0 0; float: right; @@ -156,7 +155,6 @@ body{ } #wgt_display{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -165,7 +163,6 @@ body{ } #wgt_edit{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -257,4 +254,28 @@ body{ background-color: #333 !important; color: white !important; background-image: url(../img/ar_down_white.png) !important; +} + +.pad_help{ + background-image: url(../img/slate-help-white.png) !important; +} + +#wgt_help{ + padding-left: 32px; + background-image: url(../img/slate-help.png); + background-repeat: no-repeat; + background-position: top 0; +} + +#help{ + width: 100%; + height: 100%; + overflow: auto; + display: none; + background-color: #ccc; + padding: 5px; +} + +.open{ + } \ No newline at end of file diff --git a/resources/library/interactivities/Ordre phrase.wgt/img/slate-help-white.png b/resources/library/interactivities/Ordre phrase.wgt/img/slate-help-white.png new file mode 100644 index 00000000..7b5ebfd8 Binary files /dev/null and b/resources/library/interactivities/Ordre phrase.wgt/img/slate-help-white.png differ diff --git a/resources/library/interactivities/Ordre phrase.wgt/img/slate-help.png b/resources/library/interactivities/Ordre phrase.wgt/img/slate-help.png new file mode 100644 index 00000000..069052d0 Binary files /dev/null and b/resources/library/interactivities/Ordre phrase.wgt/img/slate-help.png differ diff --git a/resources/library/interactivities/Ordre phrase.wgt/index.html b/resources/library/interactivities/Ordre phrase.wgt/index.html index b360cad9..48305e39 100644 --- a/resources/library/interactivities/Ordre phrase.wgt/index.html +++ b/resources/library/interactivities/Ordre phrase.wgt/index.html @@ -56,6 +56,7 @@  
+
@@ -67,17 +68,18 @@   - +   +
- +
  - +     diff --git a/resources/library/interactivities/Ordre phrase.wgt/locales/fr/index.html b/resources/library/interactivities/Ordre phrase.wgt/locales/fr/index.html index 33f1b81b..763aa128 100644 --- a/resources/library/interactivities/Ordre phrase.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Ordre phrase.wgt/locales/fr/index.html @@ -32,6 +32,7 @@  
+
@@ -47,6 +48,7 @@   +
diff --git a/resources/library/interactivities/Ordre phrase.wgt/locales/fr/script/template2.js b/resources/library/interactivities/Ordre phrase.wgt/locales/fr/script/template2.js index 2afb7f67..1ef09c29 100644 --- a/resources/library/interactivities/Ordre phrase.wgt/locales/fr/script/template2.js +++ b/resources/library/interactivities/Ordre phrase.wgt/locales/fr/script/template2.js @@ -33,7 +33,9 @@ var sankoreLang = { reload: "Recharger", slate: "ardoise", pad: "tablette", - none: "aucun" + none: "aucun", + help: "aide", + help_content: "Ceci est un exemple de contenu de l'aide ..." }; @@ -71,8 +73,12 @@ $(document).ready(function(){ $(".style_select").val(sankore.preference("ord_phrases_style","")); } else changeStyle("3") + $("#wgt_display").text(sankoreLang.view); $("#wgt_edit").text(sankoreLang.edit); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); + $("#wgt_display, #wgt_edit").click(function(event){ if(this.id == "wgt_display"){ if(!$(this).hasClass("selected")){ @@ -94,8 +100,24 @@ $(document).ready(function(){ } } }); + $("#wgt_name").text(sankoreLang.wgt_name); + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#ub-widget").show(); + }); + } else { + $("#ub-widget").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").text(sankoreLang.reload).click(function(){ if(wgtState) $("#wgt_display").trigger("click"); @@ -192,6 +214,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -208,6 +231,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -223,6 +247,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); diff --git a/resources/library/interactivities/Ordre phrase.wgt/locales/ru/index.html b/resources/library/interactivities/Ordre phrase.wgt/locales/ru/index.html index 33f1b81b..763aa128 100644 --- a/resources/library/interactivities/Ordre phrase.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Ordre phrase.wgt/locales/ru/index.html @@ -32,6 +32,7 @@  
+
@@ -47,6 +48,7 @@   +
diff --git a/resources/library/interactivities/Ordre phrase.wgt/locales/ru/script/template2.js b/resources/library/interactivities/Ordre phrase.wgt/locales/ru/script/template2.js index f5c72ca3..8163d8af 100644 --- a/resources/library/interactivities/Ordre phrase.wgt/locales/ru/script/template2.js +++ b/resources/library/interactivities/Ordre phrase.wgt/locales/ru/script/template2.js @@ -33,7 +33,9 @@ var sankoreLang = { reload: "Обновить", slate: "Узор", pad: "Планшет", - none: "Нет" + none: "Нет", + help: "Помощь", + help_content: "Пример текста помощи ..." } @@ -71,8 +73,12 @@ $(document).ready(function(){ $(".style_select").val(sankore.preference("ord_phrases_style","")); } else changeStyle("3") + $("#wgt_display").text(sankoreLang.view); $("#wgt_edit").text(sankoreLang.edit); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); + $("#wgt_display, #wgt_edit").click(function(event){ if(this.id == "wgt_display"){ if(!$(this).hasClass("selected")){ @@ -94,8 +100,24 @@ $(document).ready(function(){ } } }); + $("#wgt_name").text(sankoreLang.wgt_name); + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#ub-widget").show(); + }); + } else { + $("#ub-widget").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").text(sankoreLang.reload).click(function(){ if(wgtState) $("#wgt_display").trigger("click"); @@ -192,6 +214,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -208,6 +231,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -223,6 +247,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); diff --git a/resources/library/interactivities/Ordre phrase.wgt/scripts/template2.js b/resources/library/interactivities/Ordre phrase.wgt/scripts/template2.js index d55f26eb..99241058 100644 --- a/resources/library/interactivities/Ordre phrase.wgt/scripts/template2.js +++ b/resources/library/interactivities/Ordre phrase.wgt/scripts/template2.js @@ -34,7 +34,9 @@ var sankoreLang = { reload: "Reload", slate: "Wood", pad: "Pad", - none: "None" + none: "None", + help: "Help", + help_content: "This is an example of help content ..." } @@ -73,8 +75,12 @@ $(document).ready(function(){ $(".style_select").val(sankore.preference("ord_phrases_style","")); } else changeStyle("3") + $("#wgt_display").text(sankoreLang.view); $("#wgt_edit").text(sankoreLang.edit); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); + $("#wgt_display, #wgt_edit").click(function(event){ if(this.id == "wgt_display"){ if(!$(this).hasClass("selected")){ @@ -96,8 +102,24 @@ $(document).ready(function(){ } } }); + $("#wgt_name").text(sankoreLang.wgt_name); + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#ub-widget").show(); + }); + } else { + $("#ub-widget").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").text(sankoreLang.reload).click(function(){ if(wgtState) $("#wgt_display").trigger("click"); @@ -194,6 +216,7 @@ function changeStyle(val){ $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -210,6 +233,7 @@ function changeStyle(val){ $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -225,6 +249,7 @@ function changeStyle(val){ $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); diff --git a/resources/library/interactivities/Ordre phrase.wgt/styles/of_puppets.css b/resources/library/interactivities/Ordre phrase.wgt/styles/of_puppets.css index d99114b6..6589dcef 100644 --- a/resources/library/interactivities/Ordre phrase.wgt/styles/of_puppets.css +++ b/resources/library/interactivities/Ordre phrase.wgt/styles/of_puppets.css @@ -4,6 +4,7 @@ html, body{ margin: 0; padding: 0; border-radius: 50px; + overflow: hidden; } body{ @@ -40,6 +41,13 @@ body{ background-color: #cfb; } +textarea{ + font: 32px tahoma; + letter-spacing: 0.1em; + width: 98%; + min-height: 200px; + resize: vertical; +} #mp_setup{ @@ -139,7 +147,6 @@ body{ #wgt_name{ height: 44px; - width: 300px; margin: 10px 10px 0 10px; padding: 0; float: left; @@ -148,9 +155,8 @@ body{ color: #8c5730; } -#wgt_reload, #wgt_edit, #wgt_display{ +#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{ cursor: pointer; - width: 80px; height: 44px; margin: 10px 10px 0 0; float: right; @@ -160,7 +166,6 @@ body{ } #wgt_display{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -169,7 +174,6 @@ body{ } #wgt_edit{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -261,4 +265,28 @@ body{ background-color: #333 !important; color: white !important; background-image: url(../img/ar_down_white.png) !important; +} + +.pad_help{ + background-image: url(../img/slate-help-white.png) !important; +} + +#wgt_help{ + padding-left: 32px; + background-image: url(../img/slate-help.png); + background-repeat: no-repeat; + background-position: top 0; +} + +#help{ + width: 100%; + height: 100%; + overflow: auto; + display: none; + background-color: #ccc; + padding: 5px; +} + +.open{ + } \ No newline at end of file diff --git a/resources/library/interactivities/Separe phrase.wgt/img/slate-help-white.png b/resources/library/interactivities/Separe phrase.wgt/img/slate-help-white.png new file mode 100644 index 00000000..7b5ebfd8 Binary files /dev/null and b/resources/library/interactivities/Separe phrase.wgt/img/slate-help-white.png differ diff --git a/resources/library/interactivities/Separe phrase.wgt/img/slate-help.png b/resources/library/interactivities/Separe phrase.wgt/img/slate-help.png new file mode 100644 index 00000000..069052d0 Binary files /dev/null and b/resources/library/interactivities/Separe phrase.wgt/img/slate-help.png differ diff --git a/resources/library/interactivities/Separe phrase.wgt/index.html b/resources/library/interactivities/Separe phrase.wgt/index.html index 02e74da7..e108a1c9 100644 --- a/resources/library/interactivities/Separe phrase.wgt/index.html +++ b/resources/library/interactivities/Separe phrase.wgt/index.html @@ -27,7 +27,6 @@ lang = sankore.locale().substr(0,2); } else lang = "en"; - lang = "fr"; if(lang != "en"){ returnStatus(lang); } @@ -55,6 +54,7 @@  
+
@@ -66,17 +66,18 @@   - +   +
- +
  - +     diff --git a/resources/library/interactivities/Separe phrase.wgt/locales/fr/index.html b/resources/library/interactivities/Separe phrase.wgt/locales/fr/index.html index 32486fa5..593e885a 100644 --- a/resources/library/interactivities/Separe phrase.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Separe phrase.wgt/locales/fr/index.html @@ -32,6 +32,7 @@  
+
@@ -43,17 +44,18 @@   - +   +
- +
  - +     diff --git a/resources/library/interactivities/Separe phrase.wgt/locales/fr/scripts/wcontainer.js b/resources/library/interactivities/Separe phrase.wgt/locales/fr/scripts/wcontainer.js index 1c7f9eb3..3bab5e58 100644 --- a/resources/library/interactivities/Separe phrase.wgt/locales/fr/scripts/wcontainer.js +++ b/resources/library/interactivities/Separe phrase.wgt/locales/fr/scripts/wcontainer.js @@ -6,7 +6,9 @@ var sankoreLang = { reload: "Recharger", slate: "ardoise", pad: "tablette", - none: "aucun" + none: "aucun", + help: "aide", + help_content: "Ceci est un exemple de contenu de l'aide ..." }; // if use the "view/edit" button or rely on the api instead diff --git a/resources/library/interactivities/Separe phrase.wgt/locales/ru/index.html b/resources/library/interactivities/Separe phrase.wgt/locales/ru/index.html index f584fd83..61039d1a 100644 --- a/resources/library/interactivities/Separe phrase.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Separe phrase.wgt/locales/ru/index.html @@ -33,6 +33,7 @@  
+
@@ -44,17 +45,18 @@   - +   +
- +
  - +     diff --git a/resources/library/interactivities/Separe phrase.wgt/locales/ru/scripts/wcontainer.js b/resources/library/interactivities/Separe phrase.wgt/locales/ru/scripts/wcontainer.js index 880ccd69..d73ca911 100644 --- a/resources/library/interactivities/Separe phrase.wgt/locales/ru/scripts/wcontainer.js +++ b/resources/library/interactivities/Separe phrase.wgt/locales/ru/scripts/wcontainer.js @@ -6,7 +6,9 @@ var sankoreLang = { reload: "Обновить", slate: "Узор", pad: "Планшет", - none: "Нет" + none: "Нет", + help: "Помощь", + help_content: "Пример текста помощи ..." }; // if use the "view/edit" button or rely on the api instead diff --git a/resources/library/interactivities/Separe phrase.wgt/scripts/app.js b/resources/library/interactivities/Separe phrase.wgt/scripts/app.js index b574bb2f..693e63c4 100644 --- a/resources/library/interactivities/Separe phrase.wgt/scripts/app.js +++ b/resources/library/interactivities/Separe phrase.wgt/scripts/app.js @@ -45,7 +45,7 @@ $(document).ready(function() } } - if(sankore.preference("spl_phrase_style","")){ + if(window.sankore && sankore.preference("spl_phrase_style","")){ changeStyle(sankore.preference("spl_phrase_style","")); $(".style_select").val(sankore.preference("spl_phrase_style","")); } else @@ -53,6 +53,9 @@ $(document).ready(function() $("#wgt_display").text(sankoreLang.view); $("#wgt_edit").text(sankoreLang.edit); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); + $("#wgt_display, #wgt_edit").click(function(event){ if(this.id == "wgt_display"){ if(!$(this).hasClass("selected")){ @@ -74,8 +77,24 @@ $(document).ready(function() } } }); + $("#wgt_name").text(sankoreLang.wgt_name); + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#ub-widget").show(); + }); + } else { + $("#ub-widget").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").text(sankoreLang.reload).click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -118,7 +137,7 @@ $(document).ready(function() phrase = phrase.replace( / /g, '' ); // create the html - if(sankore.preference("ordSplPhrasesState", "") == "1" && flag){ + if(window.sankore && sankore.preference("ordSplPhrasesState", "") == "1" && flag){ $("#mp_view").html(sankore.preference("ordSplPhrasesCode", "")); if(sankore.preference("ordSplPhrasesAnswer", "")) $("#mp_view").addClass(sankore.preference("ordSplPhrasesAnswer", "")); @@ -244,56 +263,59 @@ $(document).ready(function() //changing the style function changeStyle(val){ - switch(val){ - case "1": - $(".b_top_left").removeClass("btl_pad").removeClass("without_back"); - $(".b_top_center").removeClass("btc_pad").removeClass("without_back"); - $(".b_top_right").removeClass("btr_pad").removeClass("without_back"); - $(".b_center_left").removeClass("bcl_pad").removeClass("without_back"); - $(".b_center_right").removeClass("bcr_pad").removeClass("without_back"); - $(".b_bottom_right").removeClass("bbr_pad").removeClass("without_back"); - $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); - $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); - $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); - $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); - $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); - $("#wgt_name").removeClass("pad_color"); - $(".style_select").removeClass("pad_select").removeClass("none_select").val(val); - $("body, html").removeClass("without_radius"); - break; - case "2": - $(".b_top_left").addClass("btl_pad").removeClass("without_back"); - $(".b_top_center").addClass("btc_pad").removeClass("without_back"); - $(".b_top_right").addClass("btr_pad").removeClass("without_back"); - $(".b_center_left").addClass("bcl_pad").removeClass("without_back"); - $(".b_center_right").addClass("bcr_pad").removeClass("without_back"); - $(".b_bottom_right").addClass("bbr_pad").removeClass("without_back"); - $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); - $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); - $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); - $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); - $("#wgt_display").addClass("pad_color").addClass("pad_edit"); - $("#wgt_name").addClass("pad_color"); - $(".style_select").addClass("pad_select").removeClass("none_select").val(val); - $("body, html").removeClass("without_radius"); - break; - case "3": - $(".b_top_left").addClass("without_back").removeClass("btl_pad"); - $(".b_top_center").addClass("without_back").removeClass("btc_pad"); - $(".b_top_right").addClass("without_back").removeClass("btr_pad"); - $(".b_center_left").addClass("without_back").removeClass("bcl_pad"); - $(".b_center_right").addClass("without_back").removeClass("bcr_pad"); - $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); - $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); - $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); - $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); - $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); - $("#wgt_display").addClass("pad_color").addClass("pad_edit"); - $("#wgt_name").addClass("pad_color"); - $(".style_select").addClass("none_select").val(val); - $("body, html").addClass("without_radius"); - break; - } + switch(val){ + case "1": + $(".b_top_left").removeClass("btl_pad").removeClass("without_back"); + $(".b_top_center").removeClass("btc_pad").removeClass("without_back"); + $(".b_top_right").removeClass("btr_pad").removeClass("without_back"); + $(".b_center_left").removeClass("bcl_pad").removeClass("without_back"); + $(".b_center_right").removeClass("bcr_pad").removeClass("without_back"); + $(".b_bottom_right").removeClass("bbr_pad").removeClass("without_back"); + $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); + $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); + $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); + $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); + $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); + $("#wgt_name").removeClass("pad_color"); + $(".style_select").removeClass("pad_select").removeClass("none_select").val(val); + $("body, html").removeClass("without_radius"); + break; + case "2": + $(".b_top_left").addClass("btl_pad").removeClass("without_back"); + $(".b_top_center").addClass("btc_pad").removeClass("without_back"); + $(".b_top_right").addClass("btr_pad").removeClass("without_back"); + $(".b_center_left").addClass("bcl_pad").removeClass("without_back"); + $(".b_center_right").addClass("bcr_pad").removeClass("without_back"); + $(".b_bottom_right").addClass("bbr_pad").removeClass("without_back"); + $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); + $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); + $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); + $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); + $("#wgt_display").addClass("pad_color").addClass("pad_edit"); + $("#wgt_name").addClass("pad_color"); + $(".style_select").addClass("pad_select").removeClass("none_select").val(val); + $("body, html").removeClass("without_radius"); + break; + case "3": + $(".b_top_left").addClass("without_back").removeClass("btl_pad"); + $(".b_top_center").addClass("without_back").removeClass("btc_pad"); + $(".b_top_right").addClass("without_back").removeClass("btr_pad"); + $(".b_center_left").addClass("without_back").removeClass("bcl_pad"); + $(".b_center_right").addClass("without_back").removeClass("bcr_pad"); + $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); + $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); + $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); + $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); + $("#wgt_display").addClass("pad_color").addClass("pad_edit"); + $("#wgt_name").addClass("pad_color"); + $(".style_select").addClass("none_select").val(val); + $("body, html").addClass("without_radius"); + break; } +} }); \ No newline at end of file diff --git a/resources/library/interactivities/Separe phrase.wgt/scripts/wcontainer.js b/resources/library/interactivities/Separe phrase.wgt/scripts/wcontainer.js index 3e59f8cc..be809815 100644 --- a/resources/library/interactivities/Separe phrase.wgt/scripts/wcontainer.js +++ b/resources/library/interactivities/Separe phrase.wgt/scripts/wcontainer.js @@ -6,7 +6,9 @@ var sankoreLang = { reload: "Reload", slate: "Wood", pad: "Pad", - none: "None" + none: "None", + help: "Help", + help_content: "This is an example of help content ..." }; // if use the "view/edit" button or rely on the api instead diff --git a/resources/library/interactivities/Separe phrase.wgt/styles/app.css b/resources/library/interactivities/Separe phrase.wgt/styles/app.css index a98aef3d..6db70b17 100644 --- a/resources/library/interactivities/Separe phrase.wgt/styles/app.css +++ b/resources/library/interactivities/Separe phrase.wgt/styles/app.css @@ -32,12 +32,6 @@ display: inline-block; } - -#mp_edit textarea{ - resize: none; - height: 60px; -} - /*new design*/ .selected{ @@ -112,7 +106,6 @@ #wgt_name{ height: 44px; - width: 300px; margin: 10px 10px 0 10px; padding: 0; float: left; @@ -121,9 +114,8 @@ color: #8c5730; } -#wgt_reload, #wgt_edit, #wgt_display{ +#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{ cursor: pointer; - width: 80px; height: 44px; margin: 10px 10px 0 0; float: right; @@ -133,7 +125,6 @@ } #wgt_display{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -142,7 +133,6 @@ } #wgt_edit{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -234,4 +224,28 @@ background-color: #333 !important; color: white !important; background-image: url(../img/ar_down_white.png) !important; +} + +.pad_help{ + background-image: url(../img/slate-help-white.png) !important; +} + +#wgt_help{ + padding-left: 32px; + background-image: url(../img/slate-help.png); + background-repeat: no-repeat; + background-position: top 0; +} + +#help{ + width: 100%; + height: 100%; + overflow: auto; + display: none; + background-color: #ccc; + padding: 5px; +} + +.open{ + } \ No newline at end of file diff --git a/resources/library/interactivities/Separe phrase.wgt/styles/master.css b/resources/library/interactivities/Separe phrase.wgt/styles/master.css index 73a14af0..62ff205f 100644 --- a/resources/library/interactivities/Separe phrase.wgt/styles/master.css +++ b/resources/library/interactivities/Separe phrase.wgt/styles/master.css @@ -4,6 +4,7 @@ html, body{ margin: 0; padding: 0; border-radius: 50px; + overflow: hidden; } body{ @@ -37,15 +38,14 @@ button{ width: 80px; } -input.percent, textarea.percent{ - width: 100%; - margin: 0px; padding: 0px; - border-width: 0px; +textarea{ + font: 32px tahoma; + letter-spacing: 0.1em; + width: 98%; + min-height: 160px; + resize: vertical; } .inputwrap{ - border-style: solid; - border-width: 1px; - border-color: #dbdfe6; - border-top-color: #abadb3; + } \ No newline at end of file diff --git a/resources/library/interactivities/Separe texte.wgt/img/slate-help-white.png b/resources/library/interactivities/Separe texte.wgt/img/slate-help-white.png new file mode 100644 index 00000000..7b5ebfd8 Binary files /dev/null and b/resources/library/interactivities/Separe texte.wgt/img/slate-help-white.png differ diff --git a/resources/library/interactivities/Separe texte.wgt/img/slate-help.png b/resources/library/interactivities/Separe texte.wgt/img/slate-help.png new file mode 100644 index 00000000..069052d0 Binary files /dev/null and b/resources/library/interactivities/Separe texte.wgt/img/slate-help.png differ diff --git a/resources/library/interactivities/Separe texte.wgt/index.html b/resources/library/interactivities/Separe texte.wgt/index.html index 3990e44e..f615b9fe 100644 --- a/resources/library/interactivities/Separe texte.wgt/index.html +++ b/resources/library/interactivities/Separe texte.wgt/index.html @@ -57,6 +57,7 @@  
+
@@ -68,17 +69,18 @@   - +   +
- +
  - +     diff --git a/resources/library/interactivities/Separe texte.wgt/locales/fr/index.html b/resources/library/interactivities/Separe texte.wgt/locales/fr/index.html index c6966082..4a728cf8 100644 --- a/resources/library/interactivities/Separe texte.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Separe texte.wgt/locales/fr/index.html @@ -32,6 +32,7 @@  
+
@@ -43,17 +44,18 @@   - +   +
- +
  - +     diff --git a/resources/library/interactivities/Separe texte.wgt/locales/fr/scripts/wcontainer.js b/resources/library/interactivities/Separe texte.wgt/locales/fr/scripts/wcontainer.js index 251b9ebd..a89a91de 100644 --- a/resources/library/interactivities/Separe texte.wgt/locales/fr/scripts/wcontainer.js +++ b/resources/library/interactivities/Separe texte.wgt/locales/fr/scripts/wcontainer.js @@ -6,7 +6,9 @@ var sankoreLang = { reload: "Recharger", slate: "ardoise", pad: "tablette", - none: "aucun" + none: "aucun", + help: "aide", + help_content: "Ceci est un exemple de contenu de l'aide ..." }; // if use the "view/edit" button or rely on the api instead diff --git a/resources/library/interactivities/Separe texte.wgt/locales/ru/index.html b/resources/library/interactivities/Separe texte.wgt/locales/ru/index.html index c6966082..4a728cf8 100644 --- a/resources/library/interactivities/Separe texte.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Separe texte.wgt/locales/ru/index.html @@ -32,6 +32,7 @@  
+
@@ -43,17 +44,18 @@   - +   +
- +
  - +     diff --git a/resources/library/interactivities/Separe texte.wgt/locales/ru/scripts/wcontainer.js b/resources/library/interactivities/Separe texte.wgt/locales/ru/scripts/wcontainer.js index 1beee2c7..8fb023d9 100644 --- a/resources/library/interactivities/Separe texte.wgt/locales/ru/scripts/wcontainer.js +++ b/resources/library/interactivities/Separe texte.wgt/locales/ru/scripts/wcontainer.js @@ -6,7 +6,9 @@ var sankoreLang = { reload: "Обновить", slate: "Узор", pad: "Планшет", - none: "Нет" + none: "Нет", + help: "Помощь", + help_content: "Пример текста помощи ..." }; // if use the "view/edit" button or rely on the api instead diff --git a/resources/library/interactivities/Separe texte.wgt/scripts/app2.js b/resources/library/interactivities/Separe texte.wgt/scripts/app2.js index 7ae34291..a53fa9b5 100644 --- a/resources/library/interactivities/Separe texte.wgt/scripts/app2.js +++ b/resources/library/interactivities/Separe texte.wgt/scripts/app2.js @@ -54,6 +54,9 @@ $(document).ready(function() $("#wgt_display").text(sankoreLang.view); $("#wgt_edit").text(sankoreLang.edit); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); + $("#wgt_display, #wgt_edit").click(function(event){ if(this.id == "wgt_display"){ if(!$(this).hasClass("selected")){ @@ -75,8 +78,24 @@ $(document).ready(function() } } }); + $("#wgt_name").text(sankoreLang.wgt_name); + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#ub-widget").show(); + }); + } else { + $("#ub-widget").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").text(sankoreLang.reload).click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -258,6 +277,7 @@ $(document).ready(function() $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); + $("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -274,6 +294,7 @@ $(document).ready(function() $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_name").addClass("pad_color"); @@ -289,6 +310,7 @@ $(document).ready(function() $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_display").addClass("pad_color").addClass("pad_edit"); diff --git a/resources/library/interactivities/Separe texte.wgt/scripts/wcontainer.js b/resources/library/interactivities/Separe texte.wgt/scripts/wcontainer.js index a5598ca1..f64ef65c 100644 --- a/resources/library/interactivities/Separe texte.wgt/scripts/wcontainer.js +++ b/resources/library/interactivities/Separe texte.wgt/scripts/wcontainer.js @@ -6,7 +6,9 @@ var sankoreLang = { reload: "Reload", slate: "Wood", pad: "Pad", - none: "None" + none: "None", + help: "Help", + help_content: "This is an example of help content ..." }; // if use the "view/edit" button or rely on the api instead diff --git a/resources/library/interactivities/Separe texte.wgt/styles/app.css b/resources/library/interactivities/Separe texte.wgt/styles/app.css index cba95823..fb0061ea 100644 --- a/resources/library/interactivities/Separe texte.wgt/styles/app.css +++ b/resources/library/interactivities/Separe texte.wgt/styles/app.css @@ -33,11 +33,6 @@ } -#mp_edit textarea{ - resize: none; - height: 100px; -} - /*new design*/ .selected{ @@ -112,7 +107,6 @@ #wgt_name{ height: 44px; - width: 300px; margin: 10px 10px 0 10px; padding: 0; float: left; @@ -121,9 +115,8 @@ color: #8c5730; } -#wgt_reload, #wgt_edit, #wgt_display{ +#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{ cursor: pointer; - width: 80px; height: 44px; margin: 10px 10px 0 0; float: right; @@ -133,7 +126,6 @@ } #wgt_display{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -142,7 +134,6 @@ } #wgt_edit{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -234,4 +225,28 @@ background-color: #333 !important; color: white !important; background-image: url(../img/ar_down_white.png) !important; +} + +.pad_help{ + background-image: url(../img/slate-help-white.png) !important; +} + +#wgt_help{ + padding-left: 32px; + background-image: url(../img/slate-help.png); + background-repeat: no-repeat; + background-position: top 0; +} + +#help{ + width: 100%; + height: 100%; + overflow: auto; + display: none; + background-color: #ccc; + padding: 5px; +} + +.open{ + } \ No newline at end of file diff --git a/resources/library/interactivities/Separe texte.wgt/styles/master.css b/resources/library/interactivities/Separe texte.wgt/styles/master.css index 6f0a3397..42dde744 100644 --- a/resources/library/interactivities/Separe texte.wgt/styles/master.css +++ b/resources/library/interactivities/Separe texte.wgt/styles/master.css @@ -4,6 +4,7 @@ html, body{ margin: 0; padding: 0; border-radius: 50px; + overflow: hidden; } body{ @@ -36,14 +37,13 @@ button{ width: 80px; } -input.percent, textarea.percent{ - width: 100%; - margin: 0px; padding: 0px; - border-width: 0px; +textarea{ + font: 32px tahoma; + letter-spacing: 0.1em; + width: 98%; + min-height: 200px; + resize: vertical; } .inputwrap{ - border-style: solid; - border-width: 1px; - border-color: #dbdfe6; - border-top-color: #abadb3; + } \ No newline at end of file diff --git a/src/adaptors/UBSvgSubsetAdaptor.cpp b/src/adaptors/UBSvgSubsetAdaptor.cpp index 08e51c03..a56fd342 100644 --- a/src/adaptors/UBSvgSubsetAdaptor.cpp +++ b/src/adaptors/UBSvgSubsetAdaptor.cpp @@ -1405,7 +1405,10 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex) } QMap elements = getAdditionalElementToStore(); - QVector dataStorageItems = elements.value("teacherGuide")->save(pageIndex); + QVector dataStorageItems; + + if(elements.value("teacherGuide")) + dataStorageItems = elements.value("teacherGuide")->save(pageIndex); foreach(tIDataStorage* eachItem, dataStorageItems){ if(eachItem->type == eElementType_START){ mXmlWriter.writeStartElement(eachItem->name); diff --git a/src/adaptors/UBThumbnailAdaptor.cpp b/src/adaptors/UBThumbnailAdaptor.cpp index 656a009e..057cf991 100644 --- a/src/adaptors/UBThumbnailAdaptor.cpp +++ b/src/adaptors/UBThumbnailAdaptor.cpp @@ -91,9 +91,22 @@ const QPixmap* UBThumbnailAdaptor::get(UBDocumentProxy* proxy, int pageIndex) return pix; } +void UBThumbnailAdaptor::updateDocumentToHandleZeroPage(UBDocumentProxy* proxy) +{ + if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()){ + QString fileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", 0); + QFile file(fileName); + qDebug() << fileName; + if(!file.exists()){ + UBPersistenceManager::persistenceManager()->persistDocumentScene(proxy,new UBGraphicsScene(proxy),0); + } + } +} + void UBThumbnailAdaptor::load(UBDocumentProxy* proxy, QList& list) { - generateMissingThumbnails(proxy); + updateDocumentToHandleZeroPage(proxy); + generateMissingThumbnails(proxy); foreach(const QPixmap* pm, list) delete pm; @@ -102,81 +115,10 @@ void UBThumbnailAdaptor::load(UBDocumentProxy* proxy, QList& lis list.append(get(proxy, i)); } - -/* -QList UBThumbnailAdaptor::load(UBDocumentProxy* proxy) -{ - QList thumbnails; - - qDebug() << "Loadinf thumbnails for " << proxy->name(); - - if (!proxy || proxy->persistencePath().isEmpty()) - return thumbnails; - - //compatibility with older formats (<= 4.0.b.2.0) : generate missing thumbnails - generateMissingThumbnails(proxy); - - //end compatibility with older format - - bool moreToProcess = true; - int pageCount = UBApplication::boardController->sceneIndexFromPage(0); - - while (moreToProcess) { - pageCount++; - QString fileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", pageCount); - - QFile file(fileName); - if (file.exists()) { - QPixmap pix; - //Warning. Works only with modified Qt -#ifdef Q_WS_X11 - //pix.load(fileName, 0, Qt::AutoColor); - pix.load(fileName, 0); -#else - pix.load(fileName, 0, Qt::AutoColor, false); -#endif - thumbnails.append(pix); - } else { - moreToProcess = false; - } - } - return thumbnails; -} - -QPixmap UBThumbnailAdaptor::load(UBDocumentProxy* proxy, int index) -{ - qDebug() << "Loadinf thumbnails for " << proxy->name(); - - int existingPageCount = proxy->pageCount(); - - if (!proxy || proxy->persistencePath().size() == 0 || index < 0 || index > existingPageCount) - return QPixmap(); - //compatibility with older formats (<= 4.0.b.2.0) : generate missing thumbnails - generateMissingThumbnails(proxy); - - //end compatibility with older format - QString fileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", index); - - QFile file(fileName); - if (file.exists()) - { - QPixmap pix; - //Warning. Works only with modified Qt -#ifdef Q_WS_X11 - pix.load(fileName, 0, Qt::AutoColor); -#else - pix.load(fileName, 0, Qt::AutoColor, false); -#endif - return pix; - } - return QPixmap(); -} -*/ - void UBThumbnailAdaptor::persistScene(UBDocumentProxy* proxy, UBGraphicsScene* pScene, int pageIndex, bool overrideModified) { - qDebug() << "Persiste scene on path " << proxy->persistencePath() << ", index " << pageIndex; + qDebug() << "Persist scene on path " << proxy->persistencePath() << ", index " << pageIndex; QString fileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", pageIndex); diff --git a/src/adaptors/UBThumbnailAdaptor.h b/src/adaptors/UBThumbnailAdaptor.h index c53f120b..58972ae5 100644 --- a/src/adaptors/UBThumbnailAdaptor.h +++ b/src/adaptors/UBThumbnailAdaptor.h @@ -35,6 +35,7 @@ public: private: static void generateMissingThumbnails(UBDocumentProxy* proxy); + static void updateDocumentToHandleZeroPage(UBDocumentProxy* proxy); UBThumbnailAdaptor() {} }; diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index edbfa923..d7c333a7 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -69,7 +69,6 @@ #include "core/UBSettings.h" #include "core/memcheck.h" -//#include UBBoardController::UBBoardController(UBMainWindow* mainWindow) : UBDocumentContainer(mainWindow->centralWidget()) @@ -106,18 +105,6 @@ void UBBoardController::init() setupViews(); setupToolbar(); - //connect(UBPersistenceManager::persistenceManager(), SIGNAL(documentWillBeDeleted(UBDocumentProxy*)) - // , this, SLOT(documentWillBeDeleted(UBDocumentProxy*))); - - //connect(UBPersistenceManager::persistenceManager(), SIGNAL(documentSceneCreated(UBDocumentProxy*, int)) - // , this, SLOT(documentSceneChanged(UBDocumentProxy*, int))); - - //connect(UBPersistenceManager::persistenceManager(), SIGNAL(documentSceneDeleted(UBDocumentProxy*, int)) - // , this, SLOT(documentSceneChanged(UBDocumentProxy*, int))); - - //connect(UBPersistenceManager::persistenceManager(), SIGNAL(documentSceneMoved(UBDocumentProxy*, int)) - // , this, SLOT(documentSceneChanged(UBDocumentProxy*, int))); - connect(UBApplication::undoStack, SIGNAL(canUndoChanged(bool)) , this, SLOT(undoRedoStateChange(bool))); @@ -468,7 +455,6 @@ void UBBoardController::addScene() QApplication::restoreOverrideCursor(); } - void UBBoardController::addScene(UBGraphicsScene* scene, bool replaceActiveIfEmpty) { if (scene) diff --git a/src/board/UBBoardPaletteManager.cpp b/src/board/UBBoardPaletteManager.cpp index 1b349661..5c52ee61 100644 --- a/src/board/UBBoardPaletteManager.cpp +++ b/src/board/UBBoardPaletteManager.cpp @@ -150,7 +150,7 @@ void UBBoardPaletteManager::setupDockPaletteWidgets() mLeftPalette->registerWidget(mpPageNavigWidget); mLeftPalette->addTab(mpPageNavigWidget); - if(UBSettings::settings()->teacherGuidePageZeroActivated || UBSettings::settings()->teacherGuideLessonPagesActivated){ + if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool() || UBSettings::settings()->teacherGuideLessonPagesActivated->get().toBool()){ mpTeacherGuideWidget = new UBDockTeacherGuideWidget(); mLeftPalette->registerWidget(mpTeacherGuideWidget); mLeftPalette->addTab(mpTeacherGuideWidget); diff --git a/src/board/UBBoardView.cpp b/src/board/UBBoardView.cpp index daa8895b..4953c018 100644 --- a/src/board/UBBoardView.cpp +++ b/src/board/UBBoardView.cpp @@ -417,7 +417,7 @@ bool UBBoardView::itemShouldReceiveMousePressEvent(QGraphicsItem *item) return true; if (item == scene()->backgroundObject()) - return true; + return false; if (itemIsLocked(item)) return false; @@ -577,6 +577,19 @@ void UBBoardView::handleItemMousePress(QMouseEvent *event) { mLastPressedMousePos = mapToScene(event->pos()); + + if (movingItem && QGraphicsSvgItem::Type != movingItem->type() + && UBGraphicsDelegateFrame::Type != movingItem->type()) + { + foreach(QGraphicsItem *item, scene()->selectedItems()) + { + if (item != movingItem) + { + item->setSelected(false); + } + } + } + if (itemShouldReceiveMousePressEvent(movingItem)) QGraphicsView::mousePressEvent (event); else @@ -704,7 +717,9 @@ void UBBoardView::mousePressEvent (QMouseEvent *event) mMouseDownPos = event->pos (); - emit clickOnBoard(); + movingItem = scene()->itemAt(this->mapToScene(event->posF().toPoint())); + if (!movingItem) + emit clickOnBoard(); if (event->button () == Qt::LeftButton && isInteractive ()) { @@ -732,8 +747,6 @@ void UBBoardView::mousePressEvent (QMouseEvent *event) } else if (currentTool == UBStylusTool::Selector || currentTool == UBStylusTool::Play) { - movingItem = scene()->itemAt(this->mapToScene(event->posF().toPoint())); - connect(&mLongPressTimer, SIGNAL(timeout()), this, SLOT(longPressEvent())); if (!movingItem && !mController->cacheIsVisible()) mLongPressTimer.start(); @@ -998,6 +1011,7 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event) UBDrawingController::drawingController ()->setStylusTool (UBStylusTool::Selector); textItem->setSelected (true); + textItem->setFocus(); } else { diff --git a/src/core/UBPersistenceManager.cpp b/src/core/UBPersistenceManager.cpp index a46d8ed7..a279ab4c 100644 --- a/src/core/UBPersistenceManager.cpp +++ b/src/core/UBPersistenceManager.cpp @@ -676,7 +676,7 @@ int UBPersistenceManager::sceneCountInDir(const QString& pPath) } else { - if(UBSettings::settings()->teacherGuidePageZeroActivated && pageIndex == 0){ + if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool() && pageIndex == 0){ // the document has no zero file but doesn't means that it hasn't any file // at all. Just importing a document without the first page using a configuartion // that enables zero page. diff --git a/src/document/UBDocumentController.cpp b/src/document/UBDocumentController.cpp index 46f8cf32..7adbc6fd 100644 --- a/src/document/UBDocumentController.cpp +++ b/src/document/UBDocumentController.cpp @@ -74,15 +74,9 @@ UBDocumentController::UBDocumentController(UBMainWindow* mainWindow) setupToolbar(); this->selectDocument(UBApplication::boardController->selectedDocument()); connect(this, SIGNAL(exportDone()), mMainWindow, SLOT(onExportDone())); - //connect(mMainWindow->actionNewPage, SIGNAL(triggered()), this, SLOT(reloadThumbs())); connect(this, SIGNAL(documentThumbnailsUpdated(UBDocumentContainer*)), this, SLOT(refreshDocumentThumbnailsView(UBDocumentContainer*))); } -//void UBDocumentController::reloadThumbs() -//{ -// UBThumbnailAdaptor::load(selectedDocumentProxy(), mDocumentThumbs); -//} - UBDocumentController::~UBDocumentController() { if (mDocumentUI) @@ -1654,6 +1648,5 @@ void UBDocumentController::refreshDocumentThumbnailsView(UBDocumentContainer*) connect(mDocumentUI->thumbnailWidget->scene(), SIGNAL(selectionChanged()), this, SLOT(pageSelectionChanged())); } - //emit refreshThumbnails(); QApplication::restoreOverrideCursor(); } diff --git a/src/document/UBDocumentController.h b/src/document/UBDocumentController.h index 4d58b87c..29077c4d 100644 --- a/src/document/UBDocumentController.h +++ b/src/document/UBDocumentController.h @@ -57,9 +57,7 @@ class UBDocumentController : public UBDocumentContainer bool pageCanBeDeleted(int page); signals: - //void refreshThumbnails(); void exportDone(); - //void movedToIndex(int index); public slots: void createNewDocument(); @@ -80,7 +78,6 @@ class UBDocumentController : public UBDocumentContainer void copy(); void paste(); void focusChanged(QWidget *old, QWidget *current); - //void reloadThumbs(); protected: virtual void setupViews(); diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index 7651fc96..dec6530f 100644 --- a/src/domain/UBGraphicsScene.cpp +++ b/src/domain/UBGraphicsScene.cpp @@ -1593,12 +1593,14 @@ UBGraphicsTextItem* UBGraphicsScene::textForObjectName(const QString& pString, c if(!textItem){ textItem = addTextWithFont(pString,QPointF(0,0) ,72,UBSettings::settings()->fontFamily(),true,false); textItem->setObjectName(objectName); + QSizeF size = textItem->size(); + textItem->setPos(QPointF(-size.width()/2.0,-size.height()/2.0)); } textItem->setPlainText(pString); textItem->adjustSize(); - QSizeF size = textItem->size(); - textItem->setPos(QPointF(-size.width()/2.0,-size.height()/2.0)); + textItem->clearFocus(); + textItem->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); return textItem; } diff --git a/src/domain/UBGraphicsTextItem.cpp b/src/domain/UBGraphicsTextItem.cpp index 75a676c4..80625045 100644 --- a/src/domain/UBGraphicsTextItem.cpp +++ b/src/domain/UBGraphicsTextItem.cpp @@ -73,23 +73,6 @@ UBGraphicsTextItem::~UBGraphicsTextItem() QVariant UBGraphicsTextItem::itemChange(GraphicsItemChange change, const QVariant &value) { - if (QGraphicsItem::ItemSelectedChange == change) - { - bool selected = value.toBool(); - - if (selected) - { - setTextInteractionFlags(Qt::TextEditorInteraction); - } - else - { - QTextCursor tc = textCursor(); - tc.clearSelection(); - setTextCursor(tc); - setTextInteractionFlags(Qt::NoTextInteraction); - } - } - QVariant newValue = value; if(mDelegate) diff --git a/src/domain/UBGraphicsTextItemDelegate.cpp b/src/domain/UBGraphicsTextItemDelegate.cpp index e160869c..f9220302 100644 --- a/src/domain/UBGraphicsTextItemDelegate.cpp +++ b/src/domain/UBGraphicsTextItemDelegate.cpp @@ -318,8 +318,6 @@ void UBGraphicsTextItemDelegate::positionHandles() { mToolBarItem->hide(); } - - setEditable(isEditable()); } void UBGraphicsTextItemDelegate::ChangeTextSize(qreal factor, textChangeMode changeMode) diff --git a/src/gui/UBDockPalette.cpp b/src/gui/UBDockPalette.cpp index c71ee276..8962a282 100644 --- a/src/gui/UBDockPalette.cpp +++ b/src/gui/UBDockPalette.cpp @@ -318,6 +318,7 @@ void UBDockPalette::toggleCollapseExpand() resize(mLastWidth,height()); else{ mLastWidth = width(); + update(); resize(0,height()); } } @@ -691,6 +692,7 @@ void UBTabDockPalette::mouseMoveEvent(QMouseEvent *event) case eUBDockOrientation_Left: p.setX(p.x() + dock->width()); if(p.x() < dock->collapseWidth() && p.x() >= dock->minimumWidth()) { + dock->update(); dock->resize(0, dock->height()); //dock->mLastWidth = dock->collapseWidth() + 1; dock->mResized = true; @@ -703,6 +705,7 @@ void UBTabDockPalette::mouseMoveEvent(QMouseEvent *event) case eUBDockOrientation_Right: p.setX(p.x() - 2 * dock->border()); if((dock->x() + p.x() > dock->parentWidget()->width() - dock->collapseWidth()) && (dock->x() + p.x() < dock->parentWidget()->width())) { + dock->update(); dock->resize(0, dock->height()); //dock->mLastWidth = dock->collapseWidth() + 1; dock->mResized = true; diff --git a/src/gui/UBTeacherGuideWidget.cpp b/src/gui/UBTeacherGuideWidget.cpp index af56d202..592242fd 100644 --- a/src/gui/UBTeacherGuideWidget.cpp +++ b/src/gui/UBTeacherGuideWidget.cpp @@ -135,7 +135,8 @@ UBTeacherGuideEditionWidget::UBTeacherGuideEditionWidget(QWidget *parent, const if(UBSettings::settings()->teacherGuideLessonPagesActivated->get().toBool()){ UBSvgSubsetAdaptor::addElementToBeStored(QString("teacherGuide"),this); - connect(UBApplication::boardController,SIGNAL(activeDocumentChanged()),this,SLOT(onActiveDocumentChanged())); + //connect(UBApplication::boardController,SIGNAL(activeDocumentChanged()),this,SLOT(onActiveDocumentChanged())); + connect(UBApplication::boardController,SIGNAL(documentSet(UBDocumentProxy*)),this,SLOT(onActiveDocumentChanged())); } }