From 0d4d602402f5108efef5af8c6be5d7cdd0a977de Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 23 Jul 2012 15:55:14 +0200 Subject: [PATCH] help for 'Ass images' widget --- .../Ass images.wgt/css/basic.css | 31 +++++++++++++++--- .../Ass images.wgt/img/slate-help-white.png | Bin 0 -> 553 bytes .../Ass images.wgt/img/slate-help.png | Bin 0 -> 1795 bytes .../interactivities/Ass images.wgt/index.html | 3 ++ .../Ass images.wgt/js/script.js | 26 +++++++++++++-- .../Ass images.wgt/locales/fr/index.html | 6 ++-- .../Ass images.wgt/locales/fr/js/script.js | 27 +++++++++++++-- .../Ass images.wgt/locales/ru/index.html | 2 ++ .../Ass images.wgt/locales/ru/js/script.js | 24 ++++++++++++-- 9 files changed, 105 insertions(+), 14 deletions(-) create mode 100644 resources/library/interactivities/Ass images.wgt/img/slate-help-white.png create mode 100644 resources/library/interactivities/Ass images.wgt/img/slate-help.png diff --git a/resources/library/interactivities/Ass images.wgt/css/basic.css b/resources/library/interactivities/Ass images.wgt/css/basic.css index 1af8b6a6..033ef2d2 100644 --- a/resources/library/interactivities/Ass images.wgt/css/basic.css +++ b/resources/library/interactivities/Ass images.wgt/css/basic.css @@ -4,6 +4,7 @@ html, body{ margin: 0; padding: 0; border-radius: 50px; + overflow: hidden; } .without_radius{ @@ -283,7 +284,6 @@ body{ #wgt_name{ height: 44px; - width: 300px; margin: 10px 10px 0 10px; padding: 0; float: left; @@ -292,9 +292,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; @@ -304,7 +303,6 @@ body{ } #wgt_display{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -313,7 +311,6 @@ body{ } #wgt_edit{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -398,3 +395,27 @@ body{ 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 images.wgt/img/slate-help-white.png b/resources/library/interactivities/Ass images.wgt/img/slate-help-white.png new file mode 100644 index 0000000000000000000000000000000000000000..7b5ebfd8d29a9283767b2a42ff801178434f729d GIT binary patch literal 553 zcmV+^0@nSBP)_pb~$&L3vDaAXI=gPRvNf*c8S$Ood*7f2B<470o|&+qb$b4UIY z13>CP>OuPOnGLstkOR8%{g1qObmu=Q0HhwIk75S^eUb3s#)bdn0FXYAeu^Bhd-aTS z|0w`a{dn!bn+;`^bqp!VV#MfYB#=_6QA{$9mV`ss0iQp-IZBD)pWhRqpFlQo_)i&d zptvOb{rlHea%_g`qr4~v(gJ_~{<%zwYKh_U?Zrw@-n>WPS6;vE1r zEP==XNFXwOfiY3-0T}r6=l54;W)?17>VZN3jfI7ko0J9#3n|%Z%fg=f0wNOHxa2>) zd2yfQyh>~ofWWf{H{at6dyqT{S)6cfhz|IL#UD~4PjM7%n%~7BDX)rC{`te(3^a`b zU{mWgfu`7NQlo$*2LQ!35XgcXNOb^7*$@Qgcjh%IY8cj{i{HO-zB#dcQXRSjs2T-O r^#wS5UqE6-M>qsV8zl4q009O7eJ4TJ=dcL@00000NkvXXu0mjfuXXIg literal 0 HcmV?d00001 diff --git a/resources/library/interactivities/Ass images.wgt/img/slate-help.png b/resources/library/interactivities/Ass images.wgt/img/slate-help.png new file mode 100644 index 0000000000000000000000000000000000000000..069052d0061dacbeaa3bd022259a5db0e37a9f16 GIT binary patch literal 1795 zcmaJ?Yfuws6kQ%FAfUs`V%6>}AZQ`UCO}LiA%P?U8VVsuP)1ymg+xd;B#Q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3%{Z;wpQRYh5oXO;qb@|}&BeSBtV*>m%b98Oi7 z9Zcy=DH6cSl%_cgub0zd7DKmf6xU@a7G@+%tZ~xY&$WO|Q%B zZ%=Lgx;ac&ztrAhYO3SL;8^n{&0*>t 
+
@@ -66,6 +68,7 @@   +
diff --git a/resources/library/interactivities/Ass images.wgt/js/script.js b/resources/library/interactivities/Ass images.wgt/js/script.js index 13b25274..7bf02f67 100644 --- a/resources/library/interactivities/Ass images.wgt/js/script.js +++ b/resources/library/interactivities/Ass 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); @@ -39,6 +43,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"); @@ -312,7 +331,7 @@ function exportData(){ } if(window.sankore) - sankore.setPreference("associer", JSON.stringify(array_to_export)); + sankore.setPreference("associer", JSON.stringify(array_to_export)); } //import @@ -618,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"); @@ -634,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"); @@ -649,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"); diff --git a/resources/library/interactivities/Ass images.wgt/locales/fr/index.html b/resources/library/interactivities/Ass images.wgt/locales/fr/index.html index 1ab412a3..1fb435c9 100644 --- a/resources/library/interactivities/Ass images.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Ass images.wgt/locales/fr/index.html @@ -10,18 +10,19 @@ - +
 
+
@@ -37,6 +38,7 @@
  +
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 9e46cb07..6ffa8120 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 @@ -8,7 +8,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 @@ -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); @@ -39,6 +43,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"); @@ -613,6 +632,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"); @@ -629,6 +649,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"); @@ -644,6 +665,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"); @@ -760,5 +782,4 @@ function onDropTarget(obj, event) { event.cancelBubble = true; } return false; -} - +} \ No newline at end of file diff --git a/resources/library/interactivities/Ass images.wgt/locales/ru/index.html b/resources/library/interactivities/Ass images.wgt/locales/ru/index.html index 192e73cf..1fb435c9 100644 --- a/resources/library/interactivities/Ass images.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Ass images.wgt/locales/ru/index.html @@ -22,6 +22,7 @@
 
+
@@ -37,6 +38,7 @@
  +
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 614099d7..6cd777b6 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 @@ -11,6 +11,7 @@ var sankoreLang = { none: "Нет" }; + //main function function start(){ @@ -18,6 +19,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); @@ -39,6 +42,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"); @@ -613,6 +631,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"); @@ -629,6 +648,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"); @@ -644,6 +664,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"); @@ -760,5 +781,4 @@ function onDropTarget(obj, event) { event.cancelBubble = true; } return false; -} - +} \ No newline at end of file