From 251e1c6952f2daf62826ff1320310d2e0623cd7e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Jul 2012 16:34:16 +0200 Subject: [PATCH 1/6] new style for ass_images widget --- .../Ass images.wgt/css/basic.css | 13 +++ .../interactivities/Ass images.wgt/index.html | 2 + .../Ass images.wgt/js/script.js | 85 ++++++++++++------- .../Ass images.wgt/locales/fr/index.html | 1 + .../Ass images.wgt/locales/fr/js/script.js | 83 +++++++++++------- .../Ass images.wgt/locales/ru/index.html | 1 + .../Ass images.wgt/locales/ru/js/script.js | 83 +++++++++++------- 7 files changed, 177 insertions(+), 91 deletions(-) diff --git a/resources/library/interactivities/Ass images.wgt/css/basic.css b/resources/library/interactivities/Ass images.wgt/css/basic.css index 7f4ef2e4..1af8b6a6 100644 --- a/resources/library/interactivities/Ass images.wgt/css/basic.css +++ b/resources/library/interactivities/Ass images.wgt/css/basic.css @@ -6,6 +6,10 @@ html, body{ border-radius: 50px; } +.without_radius{ + border-radius: 0 !important; +} + body{ background-image: url(../img/bg.png); } @@ -207,6 +211,9 @@ body{ /* new design */ +.without_back{ + background: none !important; +} .body_table{ width: 100%; @@ -385,3 +392,9 @@ body{ color: white !important; background-image: url(../img/ar_down_white.png) !important; } + +.none_select{ + background-color: #333 !important; + color: white !important; + background-image: url(../img/ar_down_white.png) !important; +} diff --git a/resources/library/interactivities/Ass images.wgt/index.html b/resources/library/interactivities/Ass images.wgt/index.html index 5ae2e9a1..89621654 100644 --- a/resources/library/interactivities/Ass images.wgt/index.html +++ b/resources/library/interactivities/Ass images.wgt/index.html @@ -16,6 +16,7 @@ lang = sankore.locale().substr(0,2); } else lang = "en"; + lang = "fr"; if(lang == "en"){ if(window.sankore) sankore.enableDropOnWidget(false); @@ -57,6 +58,7 @@   diff --git a/resources/library/interactivities/Ass images.wgt/js/script.js b/resources/library/interactivities/Ass images.wgt/js/script.js index d14820c0..13b25274 100644 --- a/resources/library/interactivities/Ass images.wgt/js/script.js +++ b/resources/library/interactivities/Ass images.wgt/js/script.js @@ -7,18 +7,20 @@ var sankoreLang = { wgt_name: "Associate images", reload: "Reload", slate: "Wood", - pad: "Pad" + pad: "Pad", + none: "None" }; //main function function start(){ - + $("#wgt_display").text(sankoreLang.display); $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); $("#wgt_reload").text(sankoreLang.reload); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); + $(".style_select option[value='3']").text(sankoreLang.none); if(window.sankore){ if(sankore.preference("associer","")){ @@ -508,7 +510,7 @@ function importData(data){ //example function showExample(){ - changeStyle(1); + changeStyle("3"); var tmp_array = []; var container = $("
").appendTo("#data"); @@ -605,34 +607,55 @@ function showExample(){ //changing the style function changeStyle(val){ - if(val == 1){ - $(".b_top_left").removeClass("btl_pad"); - $(".b_top_center").removeClass("btc_pad"); - $(".b_top_right").removeClass("btr_pad"); - $(".b_center_left").removeClass("bcl_pad"); - $(".b_center_right").removeClass("bcr_pad"); - $(".b_bottom_right").removeClass("bbr_pad"); - $(".b_bottom_left").removeClass("bbl_pad"); - $(".b_bottom_center").removeClass("bbc_pad"); - $("#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"); - } else { - $(".b_top_left").addClass("btl_pad"); - $(".b_top_center").addClass("btc_pad"); - $(".b_top_right").addClass("btr_pad"); - $(".b_center_left").addClass("bcl_pad"); - $(".b_center_right").addClass("bcr_pad"); - $(".b_bottom_right").addClass("bbr_pad"); - $(".b_bottom_left").addClass("bbl_pad"); - $(".b_bottom_center").addClass("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("pad_select"); + 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; } } 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 ef8c9d5c..1ab412a3 100644 --- a/resources/library/interactivities/Ass images.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Ass images.wgt/locales/fr/index.html @@ -28,6 +28,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 a56ac3be..9e46cb07 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 @@ -7,7 +7,8 @@ var sankoreLang = { wgt_name: "Associer des images", reload: "Recharger", slate: "ardoise", - pad: "tablette" + pad: "tablette", + none: "aucun" }; //main function @@ -19,6 +20,7 @@ function start(){ $("#wgt_reload").text(sankoreLang.reload); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); + $(".style_select option[value='3']").text(sankoreLang.none); if(window.sankore){ if(sankore.preference("associer","")){ @@ -503,7 +505,7 @@ function importData(data){ //example function showExample(){ - changeStyle(1); + changeStyle("3"); var tmp_array = []; var container = $("
").appendTo("#data"); @@ -600,34 +602,55 @@ function showExample(){ //changing the style function changeStyle(val){ - if(val == 1){ - $(".b_top_left").removeClass("btl_pad"); - $(".b_top_center").removeClass("btc_pad"); - $(".b_top_right").removeClass("btr_pad"); - $(".b_center_left").removeClass("bcl_pad"); - $(".b_center_right").removeClass("bcr_pad"); - $(".b_bottom_right").removeClass("bbr_pad"); - $(".b_bottom_left").removeClass("bbl_pad"); - $(".b_bottom_center").removeClass("bbc_pad"); - $("#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"); - } else { - $(".b_top_left").addClass("btl_pad"); - $(".b_top_center").addClass("btc_pad"); - $(".b_top_right").addClass("btr_pad"); - $(".b_center_left").addClass("bcl_pad"); - $(".b_center_right").addClass("bcr_pad"); - $(".b_bottom_right").addClass("bbr_pad"); - $(".b_bottom_left").addClass("bbl_pad"); - $(".b_bottom_center").addClass("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("pad_select"); + 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; } } 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 261886d7..192e73cf 100644 --- a/resources/library/interactivities/Ass images.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Ass images.wgt/locales/ru/index.html @@ -28,6 +28,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 59388c3a..614099d7 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 @@ -7,7 +7,8 @@ var sankoreLang = { wgt_name: "Соотнести", reload: "Обновить", slate: "Узор", - pad: "Планшет" + pad: "Планшет", + none: "Нет" }; //main function @@ -19,6 +20,7 @@ function start(){ $("#wgt_reload").text(sankoreLang.reload); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); + $(".style_select option[value='3']").text(sankoreLang.none); if(window.sankore){ if(sankore.preference("associer","")){ @@ -503,7 +505,7 @@ function importData(data){ //example function showExample(){ - changeStyle(1); + changeStyle("3"); var tmp_array = []; var container = $("
").appendTo("#data"); @@ -600,34 +602,55 @@ function showExample(){ //changing the style function changeStyle(val){ - if(val == 1){ - $(".b_top_left").removeClass("btl_pad"); - $(".b_top_center").removeClass("btc_pad"); - $(".b_top_right").removeClass("btr_pad"); - $(".b_center_left").removeClass("bcl_pad"); - $(".b_center_right").removeClass("bcr_pad"); - $(".b_bottom_right").removeClass("bbr_pad"); - $(".b_bottom_left").removeClass("bbl_pad"); - $(".b_bottom_center").removeClass("bbc_pad"); - $("#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"); - } else { - $(".b_top_left").addClass("btl_pad"); - $(".b_top_center").addClass("btc_pad"); - $(".b_top_right").addClass("btr_pad"); - $(".b_center_left").addClass("bcl_pad"); - $(".b_center_right").addClass("bcr_pad"); - $(".b_bottom_right").addClass("bbr_pad"); - $(".b_bottom_left").addClass("bbl_pad"); - $(".b_bottom_center").addClass("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("pad_select"); + 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; } } From 087f19d8f921cf6c6bf586801212efe0dec88bff Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Jul 2012 16:48:37 +0200 Subject: [PATCH 2/6] new style for ass_images widget --- resources/library/interactivities/Ass images.wgt/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/library/interactivities/Ass images.wgt/index.html b/resources/library/interactivities/Ass images.wgt/index.html index 89621654..cd4a8aa3 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); From 370e5c8223a90df4b31c0744f3e71149934801a8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Jul 2012 17:00:05 +0200 Subject: [PATCH 3/6] new style for ass_sons widget --- .../Ass sons.wgt/css/basic.css | 14 ++++ .../interactivities/Ass sons.wgt/index.html | 1 + .../interactivities/Ass sons.wgt/js/script.js | 83 +++++++++++------- .../Ass sons.wgt/locales/fr/index.html | 1 + .../Ass sons.wgt/locales/fr/js/script.js | 84 ++++++++++++------- .../Ass sons.wgt/locales/ru/index.html | 1 + .../Ass sons.wgt/locales/ru/js/script.js | 81 +++++++++++------- 7 files changed, 176 insertions(+), 89 deletions(-) diff --git a/resources/library/interactivities/Ass sons.wgt/css/basic.css b/resources/library/interactivities/Ass sons.wgt/css/basic.css index 77551b3c..86a7248c 100644 --- a/resources/library/interactivities/Ass sons.wgt/css/basic.css +++ b/resources/library/interactivities/Ass sons.wgt/css/basic.css @@ -427,3 +427,17 @@ body{ color: white !important; background-image: url(../img/ar_down_white.png) !important; } + +.without_radius{ + border-radius: 0 !important; +} + +.without_back{ + background: none !important; +} + +.none_select{ + background-color: #333 !important; + color: white !important; + background-image: url(../img/ar_down_white.png) !important; +} \ No newline at end of file diff --git a/resources/library/interactivities/Ass sons.wgt/index.html b/resources/library/interactivities/Ass sons.wgt/index.html index aaf069d9..0715e1a6 100644 --- a/resources/library/interactivities/Ass sons.wgt/index.html +++ b/resources/library/interactivities/Ass sons.wgt/index.html @@ -54,6 +54,7 @@   diff --git a/resources/library/interactivities/Ass sons.wgt/js/script.js b/resources/library/interactivities/Ass sons.wgt/js/script.js index 9350d669..b02281c2 100644 --- a/resources/library/interactivities/Ass sons.wgt/js/script.js +++ b/resources/library/interactivities/Ass sons.wgt/js/script.js @@ -7,7 +7,8 @@ var sankoreLang = { wgt_name: "Associate to the audio", reload: "Reload", slate: "Wood", - pad: "Pad" + pad: "Pad", + none: "None" }; //main function @@ -19,6 +20,7 @@ function start(){ $("#wgt_reload").text(sankoreLang.reload); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); + $(".style_select option[value='3']").text(sankoreLang.none); if(window.sankore){ if(sankore.preference("associer_sound","")){ @@ -31,7 +33,7 @@ function start(){ changeStyle(sankore.preference("as_snd_style","")); $(".style_select").val(sankore.preference("as_snd_style","")); } else - changeStyle(1) + changeStyle("3") } else showExample(); @@ -743,34 +745,55 @@ function stringToXML(text){ //changing the style function changeStyle(val){ - if(val == 1){ - $(".b_top_left").removeClass("btl_pad"); - $(".b_top_center").removeClass("btc_pad"); - $(".b_top_right").removeClass("btr_pad"); - $(".b_center_left").removeClass("bcl_pad"); - $(".b_center_right").removeClass("bcr_pad"); - $(".b_bottom_right").removeClass("bbr_pad"); - $(".b_bottom_left").removeClass("bbl_pad"); - $(".b_bottom_center").removeClass("bbc_pad"); - $("#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"); - } else { - $(".b_top_left").addClass("btl_pad"); - $(".b_top_center").addClass("btc_pad"); - $(".b_top_right").addClass("btr_pad"); - $(".b_center_left").addClass("bcl_pad"); - $(".b_center_right").addClass("bcr_pad"); - $(".b_bottom_right").addClass("bbr_pad"); - $(".b_bottom_left").addClass("bbl_pad"); - $(".b_bottom_center").addClass("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("pad_select"); + 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; } } 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 ef8c9d5c..1ab412a3 100644 --- a/resources/library/interactivities/Ass sons.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Ass sons.wgt/locales/fr/index.html @@ -28,6 +28,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 a07767a6..47fe6cf9 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 @@ -7,8 +7,10 @@ var sankoreLang = { wgt_name: "Associer aux sons", reload: "Recharger", slate: "Bois", - pad: "Pad" + pad: "Pad", + none: "Aucun" }; + //main function function start(){ @@ -18,6 +20,7 @@ function start(){ $("#wgt_reload").text(sankoreLang.reload); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); + $(".style_select option[value='3']").text(sankoreLang.none); if(window.sankore){ if(sankore.preference("associer_sound","")){ @@ -30,7 +33,7 @@ function start(){ changeStyle(sankore.preference("as_snd_style","")); $(".style_select").val(sankore.preference("as_snd_style","")); } else - changeStyle(1) + changeStyle("3") } else showExample(); @@ -727,34 +730,55 @@ function stringToXML(text){ //changing the style function changeStyle(val){ - if(val == 1){ - $(".b_top_left").removeClass("btl_pad"); - $(".b_top_center").removeClass("btc_pad"); - $(".b_top_right").removeClass("btr_pad"); - $(".b_center_left").removeClass("bcl_pad"); - $(".b_center_right").removeClass("bcr_pad"); - $(".b_bottom_right").removeClass("bbr_pad"); - $(".b_bottom_left").removeClass("bbl_pad"); - $(".b_bottom_center").removeClass("bbc_pad"); - $("#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"); - } else { - $(".b_top_left").addClass("btl_pad"); - $(".b_top_center").addClass("btc_pad"); - $(".b_top_right").addClass("btr_pad"); - $(".b_center_left").addClass("bcl_pad"); - $(".b_center_right").addClass("bcr_pad"); - $(".b_bottom_right").addClass("bbr_pad"); - $(".b_bottom_left").addClass("bbl_pad"); - $(".b_bottom_center").addClass("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("pad_select"); + 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; } } 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 261886d7..192e73cf 100644 --- a/resources/library/interactivities/Ass sons.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Ass sons.wgt/locales/ru/index.html @@ -28,6 +28,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 2c6f0eb2..85e6e8f1 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 @@ -9,6 +9,7 @@ var sankoreLang = { slate: "Узор", pad: "Планшет" }; + //main function function start(){ @@ -18,6 +19,7 @@ function start(){ $("#wgt_reload").text(sankoreLang.reload); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); + $(".style_select option[value='3']").text(sankoreLang.none); if(window.sankore){ if(sankore.preference("associer_sound","")){ @@ -30,7 +32,7 @@ function start(){ changeStyle(sankore.preference("as_snd_style","")); $(".style_select").val(sankore.preference("as_snd_style","")); } else - changeStyle(1) + changeStyle("3") } else showExample(); @@ -727,34 +729,55 @@ function stringToXML(text){ //changing the style function changeStyle(val){ - if(val == 1){ - $(".b_top_left").removeClass("btl_pad"); - $(".b_top_center").removeClass("btc_pad"); - $(".b_top_right").removeClass("btr_pad"); - $(".b_center_left").removeClass("bcl_pad"); - $(".b_center_right").removeClass("bcr_pad"); - $(".b_bottom_right").removeClass("bbr_pad"); - $(".b_bottom_left").removeClass("bbl_pad"); - $(".b_bottom_center").removeClass("bbc_pad"); - $("#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"); - } else { - $(".b_top_left").addClass("btl_pad"); - $(".b_top_center").addClass("btc_pad"); - $(".b_top_right").addClass("btr_pad"); - $(".b_center_left").addClass("bcl_pad"); - $(".b_center_right").addClass("bcr_pad"); - $(".b_bottom_right").addClass("bbr_pad"); - $(".b_bottom_left").addClass("bbl_pad"); - $(".b_bottom_center").addClass("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("pad_select"); + 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; } } From a53f41f71b8346e263e44e146d6e0853e20f4867 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Jul 2012 17:09:58 +0200 Subject: [PATCH 4/6] new style for cat_images widget --- .../Ass sons.wgt/locales/ru/js/script.js | 3 +- .../Cat images.wgt/css/basic.css | 14 +++ .../interactivities/Cat images.wgt/index.html | 1 + .../Cat images.wgt/js/script.js | 89 ++++++++++++------- .../Cat images.wgt/locales/fr/index.html | 1 + .../Cat images.wgt/locales/fr/js/script.js | 87 +++++++++++------- .../Cat images.wgt/locales/ru/index.html | 1 + .../Cat images.wgt/locales/ru/js/script.js | 85 +++++++++++------- 8 files changed, 184 insertions(+), 97 deletions(-) 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 85e6e8f1..36092793 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 @@ -7,7 +7,8 @@ var sankoreLang = { wgt_name: "Что звучит", reload: "Обновить", slate: "Узор", - pad: "Планшет" + pad: "Планшет", + none: "Нет" }; //main function diff --git a/resources/library/interactivities/Cat images.wgt/css/basic.css b/resources/library/interactivities/Cat images.wgt/css/basic.css index 4553befb..ee34f168 100644 --- a/resources/library/interactivities/Cat images.wgt/css/basic.css +++ b/resources/library/interactivities/Cat images.wgt/css/basic.css @@ -369,3 +369,17 @@ body{ color: white !important; background-image: url(../img/ar_down_white.png) !important; } + +.without_radius{ + border-radius: 0 !important; +} + +.without_back{ + background: none !important; +} + +.none_select{ + background-color: #333 !important; + color: white !important; + background-image: url(../img/ar_down_white.png) !important; +} \ No newline at end of file diff --git a/resources/library/interactivities/Cat images.wgt/index.html b/resources/library/interactivities/Cat images.wgt/index.html index 8f7780ad..2d064cae 100644 --- a/resources/library/interactivities/Cat images.wgt/index.html +++ b/resources/library/interactivities/Cat images.wgt/index.html @@ -54,6 +54,7 @@   diff --git a/resources/library/interactivities/Cat images.wgt/js/script.js b/resources/library/interactivities/Cat images.wgt/js/script.js index 66dfa039..35d53a44 100644 --- a/resources/library/interactivities/Cat images.wgt/js/script.js +++ b/resources/library/interactivities/Cat images.wgt/js/script.js @@ -8,7 +8,8 @@ var sankoreLang = { wgt_name: "Order images", reload: "Reload", slate: "Wood", - pad: "Pad" + pad: "Pad", + none: "None" }; //main function @@ -20,6 +21,7 @@ function start(){ $("#wgt_reload").text(sankoreLang.reload); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); + $(".style_select option[value='3']").text(sankoreLang.none); if(window.sankore){ if(sankore.preference("categoriser_images","")){ @@ -61,7 +63,7 @@ function start(){ $(this).addClass("selected"); $("#wgt_edit").removeClass("selected"); $(".style_select").css("display","none"); - if(window.sankore) + if(window.sankore) sankore.enableDropOnWidget(false); $(".add_block").remove(); $(".cont").each(function(){ @@ -210,7 +212,7 @@ function start(){ //export function exportData(){ var array_to_export = []; - if($("#wgt_edit").hasClass("selected")){ + if($("#edit").hasClass("selected")){ $(".cont").each(function(){ var cont_obj = new Object(); cont_obj.style = $(".style_select").find("option:selected").val(); @@ -292,7 +294,7 @@ function importData(data){ changeStyle(data[i].style); $(".style_select").val(data[i].style); } - if(data[i].mode == "edit"){ + if(data[i].mode == "edit"){ var tmp_array = []; var container = $("
"); var sub_container = $("
").appendTo(container); @@ -448,7 +450,7 @@ function importData(data){ //example function showExample(){ - changeStyle(1); + changeStyle("3"); var tmp_array = []; var container = $("
").appendTo("#data"); @@ -594,34 +596,55 @@ function shuffle( arr ) //changing the style function changeStyle(val){ - if(val == 1){ - $(".b_top_left").removeClass("btl_pad"); - $(".b_top_center").removeClass("btc_pad"); - $(".b_top_right").removeClass("btr_pad"); - $(".b_center_left").removeClass("bcl_pad"); - $(".b_center_right").removeClass("bcr_pad"); - $(".b_bottom_right").removeClass("bbr_pad"); - $(".b_bottom_left").removeClass("bbl_pad"); - $(".b_bottom_center").removeClass("bbc_pad"); - $("#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"); - } else { - $(".b_top_left").addClass("btl_pad"); - $(".b_top_center").addClass("btc_pad"); - $(".b_top_right").addClass("btr_pad"); - $(".b_center_left").addClass("bcl_pad"); - $(".b_center_right").addClass("bcr_pad"); - $(".b_bottom_right").addClass("bbr_pad"); - $(".b_bottom_left").addClass("bbl_pad"); - $(".b_bottom_center").addClass("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("pad_select"); + 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; } } 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 1f91cb1c..d6a7a856 100644 --- a/resources/library/interactivities/Cat images.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Cat images.wgt/locales/fr/index.html @@ -28,6 +28,7 @@   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 da2f2627..dcb5ea02 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 @@ -7,8 +7,9 @@ var sankoreLang = { add: "Nouveau bloc", wgt_name: "Catégoriser des images", reload: "Recharger", - slate: "Ardoise", - pad: "Tablette" + slate: "ardoise", + pad: "tablette", + none: "aucun" }; //main function @@ -20,6 +21,7 @@ function start(){ $("#wgt_reload").text(sankoreLang.reload); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); + $(".style_select option[value='3']").text(sankoreLang.none); if(window.sankore){ if(sankore.preference("categoriser_images","")){ @@ -208,7 +210,7 @@ function start(){ //export function exportData(){ var array_to_export = []; - if($("#wgt_edit").hasClass("selected")){ + if($("#edit").hasClass("selected")){ $(".cont").each(function(){ var cont_obj = new Object(); cont_obj.style = $(".style_select").find("option:selected").val(); @@ -449,7 +451,7 @@ function importData(data){ //example function showExample(){ - changeStyle(1); + changeStyle("3"); var tmp_array = []; var container = $("
").appendTo("#data"); @@ -608,34 +610,55 @@ function stringToXML(text){ //changing the style function changeStyle(val){ - if(val == 1){ - $(".b_top_left").removeClass("btl_pad"); - $(".b_top_center").removeClass("btc_pad"); - $(".b_top_right").removeClass("btr_pad"); - $(".b_center_left").removeClass("bcl_pad"); - $(".b_center_right").removeClass("bcr_pad"); - $(".b_bottom_right").removeClass("bbr_pad"); - $(".b_bottom_left").removeClass("bbl_pad"); - $(".b_bottom_center").removeClass("bbc_pad"); - $("#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"); - } else { - $(".b_top_left").addClass("btl_pad"); - $(".b_top_center").addClass("btc_pad"); - $(".b_top_right").addClass("btr_pad"); - $(".b_center_left").addClass("bcl_pad"); - $(".b_center_right").addClass("bcr_pad"); - $(".b_bottom_right").addClass("bbr_pad"); - $(".b_bottom_left").addClass("bbl_pad"); - $(".b_bottom_center").addClass("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("pad_select"); + 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; } } 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 7df83297..28bab651 100644 --- a/resources/library/interactivities/Cat images.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Cat images.wgt/locales/ru/index.html @@ -28,6 +28,7 @@   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 63850c45..89662f28 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 @@ -8,7 +8,8 @@ var sankoreLang = { wgt_name: "Категории", reload: "Обновить", slate: "Узор", - pad: "Планшет" + pad: "Планшет", + none: "Нет" }; //main function @@ -20,6 +21,7 @@ function start(){ $("#wgt_reload").text(sankoreLang.reload); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); + $(".style_select option[value='3']").text(sankoreLang.none); if(window.sankore){ if(sankore.preference("categoriser_images","")){ @@ -208,7 +210,7 @@ function start(){ //export function exportData(){ var array_to_export = []; - if($("#wgt_edit").hasClass("selected")){ + if($("#edit").hasClass("selected")){ $(".cont").each(function(){ var cont_obj = new Object(); cont_obj.style = $(".style_select").find("option:selected").val(); @@ -449,7 +451,7 @@ function importData(data){ //example function showExample(){ - changeStyle(1); + changeStyle("3"); var tmp_array = []; var container = $("
").appendTo("#data"); @@ -608,34 +610,55 @@ function stringToXML(text){ //changing the style function changeStyle(val){ - if(val == 1){ - $(".b_top_left").removeClass("btl_pad"); - $(".b_top_center").removeClass("btc_pad"); - $(".b_top_right").removeClass("btr_pad"); - $(".b_center_left").removeClass("bcl_pad"); - $(".b_center_right").removeClass("bcr_pad"); - $(".b_bottom_right").removeClass("bbr_pad"); - $(".b_bottom_left").removeClass("bbl_pad"); - $(".b_bottom_center").removeClass("bbc_pad"); - $("#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"); - } else { - $(".b_top_left").addClass("btl_pad"); - $(".b_top_center").addClass("btc_pad"); - $(".b_top_right").addClass("btr_pad"); - $(".b_center_left").addClass("bcl_pad"); - $(".b_center_right").addClass("bcr_pad"); - $(".b_bottom_right").addClass("bbr_pad"); - $(".b_bottom_left").addClass("bbl_pad"); - $(".b_bottom_center").addClass("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("pad_select"); + 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; } } From c2345d6cc469d91bdde66fc2ce80c337b19e9775 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Jul 2012 17:18:59 +0200 Subject: [PATCH 5/6] new style for cat_images widget --- .../interactivities/Cat text.wgt/config.xml | 2 +- .../Cat text.wgt/css/basic.css | 14 ++++ .../interactivities/Cat text.wgt/index.html | 1 + .../interactivities/Cat text.wgt/js/script.js | 83 ++++++++++++------- .../Cat text.wgt/locales/fr/index.html | 1 + .../Cat text.wgt/locales/fr/js/script.js | 83 ++++++++++++------- .../Cat text.wgt/locales/ru/index.html | 1 + .../Cat text.wgt/locales/ru/js/script.js | 83 ++++++++++++------- 8 files changed, 177 insertions(+), 91 deletions(-) diff --git a/resources/library/interactivities/Cat text.wgt/config.xml b/resources/library/interactivities/Cat text.wgt/config.xml index 7b9e54e4..133cd228 100644 --- a/resources/library/interactivities/Cat text.wgt/config.xml +++ b/resources/library/interactivities/Cat text.wgt/config.xml @@ -3,7 +3,7 @@ xmlns:ub="http://uniboard.mnemis.com/widgets" id="http://uniboard.mnemis.com/widgets/notes" version="1.2" - width="980" + width="990" height="520" ub:resizable="true"> diff --git a/resources/library/interactivities/Cat text.wgt/css/basic.css b/resources/library/interactivities/Cat text.wgt/css/basic.css index 030a2677..086731a4 100644 --- a/resources/library/interactivities/Cat text.wgt/css/basic.css +++ b/resources/library/interactivities/Cat text.wgt/css/basic.css @@ -391,3 +391,17 @@ body{ color: white !important; background-image: url(../img/ar_down_white.png) !important; } + +.without_radius{ + border-radius: 0 !important; +} + +.without_back{ + background: none !important; +} + +.none_select{ + background-color: #333 !important; + color: white !important; + background-image: url(../img/ar_down_white.png) !important; +} \ No newline at end of file diff --git a/resources/library/interactivities/Cat text.wgt/index.html b/resources/library/interactivities/Cat text.wgt/index.html index 8f7780ad..2d064cae 100644 --- a/resources/library/interactivities/Cat text.wgt/index.html +++ b/resources/library/interactivities/Cat text.wgt/index.html @@ -54,6 +54,7 @@   diff --git a/resources/library/interactivities/Cat text.wgt/js/script.js b/resources/library/interactivities/Cat text.wgt/js/script.js index 148d35c5..e93657ef 100644 --- a/resources/library/interactivities/Cat text.wgt/js/script.js +++ b/resources/library/interactivities/Cat text.wgt/js/script.js @@ -14,7 +14,8 @@ var sankoreLang = { wgt_name: "Categorize text", reload: "Reload", slate: "Wood", - pad: "Pad" + pad: "Pad", + none: "None" }; //main function @@ -26,6 +27,7 @@ function start(){ $("#wgt_reload").text(sankoreLang.reload); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); + $(".style_select option[value='3']").text(sankoreLang.none); if(window.sankore){ if(sankore.preference("categoriser_text","")){ @@ -440,7 +442,7 @@ function importData(data){ //example function showExample(){ - changeStyle(1); + changeStyle("3"); var tmp_array = []; var container = $("
").appendTo("#data"); @@ -608,34 +610,55 @@ function returnId(){ //changing the style function changeStyle(val){ - if(val == 1){ - $(".b_top_left").removeClass("btl_pad"); - $(".b_top_center").removeClass("btc_pad"); - $(".b_top_right").removeClass("btr_pad"); - $(".b_center_left").removeClass("bcl_pad"); - $(".b_center_right").removeClass("bcr_pad"); - $(".b_bottom_right").removeClass("bbr_pad"); - $(".b_bottom_left").removeClass("bbl_pad"); - $(".b_bottom_center").removeClass("bbc_pad"); - $("#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"); - } else { - $(".b_top_left").addClass("btl_pad"); - $(".b_top_center").addClass("btc_pad"); - $(".b_top_right").addClass("btr_pad"); - $(".b_center_left").addClass("bcl_pad"); - $(".b_center_right").addClass("bcr_pad"); - $(".b_bottom_right").addClass("bbr_pad"); - $(".b_bottom_left").addClass("bbl_pad"); - $(".b_bottom_center").addClass("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("pad_select"); + 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; } } 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 df096513..7373be46 100644 --- a/resources/library/interactivities/Cat text.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Cat text.wgt/locales/fr/index.html @@ -28,6 +28,7 @@   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 89758658..dceeda65 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 @@ -14,7 +14,8 @@ var sankoreLang = { wgt_name: "Catégoriser des textes", reload: "Recharger", slate: "ardoise", - pad: "tablette" + pad: "tablette", + none: "aucun" }; //main function @@ -26,6 +27,7 @@ function start(){ $("#wgt_reload").text(sankoreLang.reload); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); + $(".style_select option[value='3']").text(sankoreLang.none); if(window.sankore){ if(sankore.preference("categoriser_text","")){ @@ -440,7 +442,7 @@ function importData(data){ //example function showExample(){ - changeStyle(1); + changeStyle("3"); var tmp_array = []; var container = $("
").appendTo("#data"); @@ -608,34 +610,55 @@ function returnId(){ //changing the style function changeStyle(val){ - if(val == 1){ - $(".b_top_left").removeClass("btl_pad"); - $(".b_top_center").removeClass("btc_pad"); - $(".b_top_right").removeClass("btr_pad"); - $(".b_center_left").removeClass("bcl_pad"); - $(".b_center_right").removeClass("bcr_pad"); - $(".b_bottom_right").removeClass("bbr_pad"); - $(".b_bottom_left").removeClass("bbl_pad"); - $(".b_bottom_center").removeClass("bbc_pad"); - $("#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"); - } else { - $(".b_top_left").addClass("btl_pad"); - $(".b_top_center").addClass("btc_pad"); - $(".b_top_right").addClass("btr_pad"); - $(".b_center_left").addClass("bcl_pad"); - $(".b_center_right").addClass("bcr_pad"); - $(".b_bottom_right").addClass("bbr_pad"); - $(".b_bottom_left").addClass("bbl_pad"); - $(".b_bottom_center").addClass("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("pad_select"); + 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; } } 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 6a0d5a79..1486cc60 100644 --- a/resources/library/interactivities/Cat text.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Cat text.wgt/locales/ru/index.html @@ -28,6 +28,7 @@   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 6abe92ac..a1811bed 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 @@ -14,7 +14,8 @@ var sankoreLang = { wgt_name: "Категории", reload: "Обновить", slate: "Узор", - pad: "Планшет" + pad: "Планшет", + none: "Нет" }; //main function @@ -26,6 +27,7 @@ function start(){ $("#wgt_reload").text(sankoreLang.reload); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); + $(".style_select option[value='3']").text(sankoreLang.none); if(window.sankore){ if(sankore.preference("categoriser_text","")){ @@ -440,7 +442,7 @@ function importData(data){ //example function showExample(){ - changeStyle(1); + changeStyle("3"); var tmp_array = []; var container = $("
").appendTo("#data"); @@ -608,34 +610,55 @@ function returnId(){ //changing the style function changeStyle(val){ - if(val == 1){ - $(".b_top_left").removeClass("btl_pad"); - $(".b_top_center").removeClass("btc_pad"); - $(".b_top_right").removeClass("btr_pad"); - $(".b_center_left").removeClass("bcl_pad"); - $(".b_center_right").removeClass("bcr_pad"); - $(".b_bottom_right").removeClass("bbr_pad"); - $(".b_bottom_left").removeClass("bbl_pad"); - $(".b_bottom_center").removeClass("bbc_pad"); - $("#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"); - } else { - $(".b_top_left").addClass("btl_pad"); - $(".b_top_center").addClass("btc_pad"); - $(".b_top_right").addClass("btr_pad"); - $(".b_center_left").addClass("bcl_pad"); - $(".b_center_right").addClass("bcr_pad"); - $(".b_bottom_right").addClass("bbr_pad"); - $(".b_bottom_left").addClass("bbl_pad"); - $(".b_bottom_center").addClass("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("pad_select"); + 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; } } From 82968242a4b6536f59086093b11e2e5a370c43dc Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Jul 2012 17:29:08 +0200 Subject: [PATCH 6/6] some changes for new style --- resources/library/interactivities/Ass images.wgt/css/basic.css | 2 +- resources/library/interactivities/Ass sons.wgt/css/basic.css | 2 +- resources/library/interactivities/Cat images.wgt/css/basic.css | 2 +- resources/library/interactivities/Cat text.wgt/css/basic.css | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/library/interactivities/Ass images.wgt/css/basic.css b/resources/library/interactivities/Ass images.wgt/css/basic.css index 1af8b6a6..7c8e2fa3 100644 --- a/resources/library/interactivities/Ass images.wgt/css/basic.css +++ b/resources/library/interactivities/Ass images.wgt/css/basic.css @@ -396,5 +396,5 @@ body{ .none_select{ background-color: #333 !important; color: white !important; - background-image: url(../img/ar_down_white.png) !important; + background-image: url(../images/ar_down_white.png) !important; } diff --git a/resources/library/interactivities/Ass sons.wgt/css/basic.css b/resources/library/interactivities/Ass sons.wgt/css/basic.css index 86a7248c..ebf0387c 100644 --- a/resources/library/interactivities/Ass sons.wgt/css/basic.css +++ b/resources/library/interactivities/Ass sons.wgt/css/basic.css @@ -439,5 +439,5 @@ body{ .none_select{ background-color: #333 !important; color: white !important; - background-image: url(../img/ar_down_white.png) !important; + background-image: url(../images/ar_down_white.png) !important; } \ No newline at end of file diff --git a/resources/library/interactivities/Cat images.wgt/css/basic.css b/resources/library/interactivities/Cat images.wgt/css/basic.css index ee34f168..8374bd64 100644 --- a/resources/library/interactivities/Cat images.wgt/css/basic.css +++ b/resources/library/interactivities/Cat images.wgt/css/basic.css @@ -381,5 +381,5 @@ body{ .none_select{ background-color: #333 !important; color: white !important; - background-image: url(../img/ar_down_white.png) !important; + background-image: url(../images/ar_down_white.png) !important; } \ No newline at end of file diff --git a/resources/library/interactivities/Cat text.wgt/css/basic.css b/resources/library/interactivities/Cat text.wgt/css/basic.css index 086731a4..2885e08e 100644 --- a/resources/library/interactivities/Cat text.wgt/css/basic.css +++ b/resources/library/interactivities/Cat text.wgt/css/basic.css @@ -403,5 +403,5 @@ body{ .none_select{ background-color: #333 !important; color: white !important; - background-image: url(../img/ar_down_white.png) !important; + background-image: url(../images/ar_down_white.png) !important; } \ No newline at end of file