From eff4dbade7031b159502dedac51e5d5af234af77 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Aug 2012 18:16:53 +0200 Subject: [PATCH 1/2] some fixes in Syllabes widget --- .../Syllabes.wgt/img/slate-help-white.png | Bin 0 -> 553 bytes .../Syllabes.wgt/img/slate-help.png | Bin 0 -> 1795 bytes .../interactivities/Syllabes.wgt/index.html | 9 +- .../Syllabes.wgt/locales/fr/index.html | 9 +- .../locales/fr/scripts/wcontainer.js | 7 +- .../Syllabes.wgt/locales/ru/index.html | 9 +- .../locales/ru/scripts/wcontainer.js | 5 +- .../Syllabes.wgt/scripts/spl-word.js | 102 +++++++++++++----- .../Syllabes.wgt/scripts/wcontainer.js | 5 +- .../Syllabes.wgt/styles/master.css | 4 +- .../Syllabes.wgt/styles/spl-word.css | 45 +++++++- 11 files changed, 147 insertions(+), 48 deletions(-) create mode 100644 resources/library/interactivities/Syllabes.wgt/img/slate-help-white.png create mode 100644 resources/library/interactivities/Syllabes.wgt/img/slate-help.png diff --git a/resources/library/interactivities/Syllabes.wgt/img/slate-help-white.png b/resources/library/interactivities/Syllabes.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/Syllabes.wgt/img/slate-help.png b/resources/library/interactivities/Syllabes.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|FDK9}0 z8N@1s4oc9DRuQEwqAdt&i&AZiqUGTrC}=y1Kv4#(6uUvd{wUp<-S08yoO|y5?l-$P zB7B3L&2k$60PI3Tcp_p1O|R8L;;S_nUJ-*U&X?d(SR$@NG$_E8VF@T0szj1d5sJvt zQ`^u00I&cRVhJu0ZemI?B?&QMNP4B3U;{uvpk9qglTjQ@K$8?I7BupGGXyGREGWiL zND-=oQMn?-ph2Sy;bN&FS;~+>fow29&m;ttD2{-7Wr|A6)U%*zT_!O%ZIdBz8iFUY zp!cRE!U!-J)1aUqiQ*%r_)|cCm;}>&>2$g`NTt9OGKETpsXj2BNux3;6maH&h-eyF zB2&Z@%)}yAEJ%*yY9^Vi)9FY$8VS=RkzoddVbY*deF%h)HeH1ydLNb6ZB~JYYNZ;5 z8dqQ{(4>eYU}-oDBAmWYL8+dTRcU9+L==pyN7Q7PL@}i_3ls|fAF5Q&p|!XO{owaM zg|*^zHA)ttS}aW?B@Qmp%@j(_4A!6sj%magmNHw#2swshS~;c$gQNVw7==oP>9o^m zp^zD>(&C6piiYx75Wy!Y6f!2mpC*8P>ApOe0mCpK=K8_G!Twxs5TDNA(ip+BTplJ( zQ=%$-mMijbiz!<{9dT@>dkOv^LwGq%Ow+L$fjfc z*D=p-5xrxY&NVHum}`4fMfAFcXlh6v9!K1j^iUpGtnV3$5y~C8A65R{=k6<1bcmgb z?mN|=s;;Z^5Y<6m{Ptj@$lGSs$wiU8(e`6JABgn|`eLnNyubI1hs)$;v0>?FVWiE; zJCr@EkEZPGY&6FI5$e#ek(5Qbok**gxI!N}T47Z(aA8Zq%^fTJJi!>+>*0vb=(bdW zQ)`cVB#c7TK8~u9FEq=w zjgCeo=0L6`aA#nBaSjz!Jn(;cHf(fi_wbq+%OgQoxj=#_8|f8x4DtZM+V-SkzJ)Qx z|JL%nw7goYnsYU;+uvrg*}Sl{vk4nq1j(+WN9(W@MmLwt67aBRfL& zdr9%9=7*t@G#no-4pD6?3G3Rj0L(+H(d+9b!`tt{om*3%{Z;wpQRYh5oXO;qb@|}&BeSBtV*>m%b98Oi7 z9Zcy=DH6cSl%_cgub0zd7DKmf6xU@a7G@+%tZ~xY&$WO|Q%B zZ%=Lgx;ac&ztrAhYO3SL;8^n{&0*>t 
+
  - +   +
- +
  - +     diff --git a/resources/library/interactivities/Syllabes.wgt/locales/fr/index.html b/resources/library/interactivities/Syllabes.wgt/locales/fr/index.html index 1a6b9dad..99f21db7 100644 --- a/resources/library/interactivities/Syllabes.wgt/locales/fr/index.html +++ b/resources/library/interactivities/Syllabes.wgt/locales/fr/index.html @@ -33,27 +33,30 @@  
+
  - +   +
- +
  - +     diff --git a/resources/library/interactivities/Syllabes.wgt/locales/fr/scripts/wcontainer.js b/resources/library/interactivities/Syllabes.wgt/locales/fr/scripts/wcontainer.js index fc0a762f..43ec3fc3 100644 --- a/resources/library/interactivities/Syllabes.wgt/locales/fr/scripts/wcontainer.js +++ b/resources/library/interactivities/Syllabes.wgt/locales/fr/scripts/wcontainer.js @@ -1,11 +1,14 @@ var sankoreLang = { view: "Afficher", edit: "Modifier", - example: "so*phi*sti*qué", + example: "so*phis*ti*qué", wgt_name: "Syllabe", reload: "Recharger", slate: "ardoise", - pad: "tablette" + pad: "tablette", + none: "aucun", + help: "aide", + help_content: "Ceci est un exemple de contenu de l'aide ..." }; // if use the "view/edit" button or rely on the api instead diff --git a/resources/library/interactivities/Syllabes.wgt/locales/ru/index.html b/resources/library/interactivities/Syllabes.wgt/locales/ru/index.html index 1a6b9dad..99f21db7 100644 --- a/resources/library/interactivities/Syllabes.wgt/locales/ru/index.html +++ b/resources/library/interactivities/Syllabes.wgt/locales/ru/index.html @@ -33,27 +33,30 @@  
+
  - +   +
- +
  - +     diff --git a/resources/library/interactivities/Syllabes.wgt/locales/ru/scripts/wcontainer.js b/resources/library/interactivities/Syllabes.wgt/locales/ru/scripts/wcontainer.js index fecdffe5..cf158ff3 100644 --- a/resources/library/interactivities/Syllabes.wgt/locales/ru/scripts/wcontainer.js +++ b/resources/library/interactivities/Syllabes.wgt/locales/ru/scripts/wcontainer.js @@ -5,7 +5,10 @@ var sankoreLang = { wgt_name: "Разделить слово", reload: "Обновить", slate: "Узор", - pad: "Планшет" + pad: "Планшет", + none: "Нет", + help: "Помощь", + help_content: "Пример текста помощи ..." }; // if use the "view/edit" button or rely on the api instead diff --git a/resources/library/interactivities/Syllabes.wgt/scripts/spl-word.js b/resources/library/interactivities/Syllabes.wgt/scripts/spl-word.js index 35120a3d..e46e7f0d 100644 --- a/resources/library/interactivities/Syllabes.wgt/scripts/spl-word.js +++ b/resources/library/interactivities/Syllabes.wgt/scripts/spl-word.js @@ -54,10 +54,13 @@ $(document).ready(function() changeStyle(sankore.preference("spl_word_style","")); $(".style_select").val(sankore.preference("spl_word_style","")); } else - changeStyle(1) + changeStyle("3") $("#wgt_display").text(sankoreLang.view); $("#wgt_edit").text(sankoreLang.edit); + $("#wgt_help").text(sankoreLang.help); + $("#help").html(sankoreLang.help_content); + $("#wgt_display, #wgt_edit").click(function(event){ if(this.id == "wgt_display"){ if(!$(this).hasClass("selected")){ @@ -79,8 +82,24 @@ $(document).ready(function() } } }); + $("#wgt_name").text(sankoreLang.wgt_name); + $("#wgt_help").click(function(){ + var tmp = $(this); + if($(this).hasClass("open")){ + $("#help").slideUp("100", function(){ + tmp.removeClass("open"); + $("#ub-widget").show(); + }); + } else { + $("#ub-widget").hide(); + $("#help").slideDown("100", function(){ + tmp.addClass("open"); + }); + } + }); + $("#wgt_reload").text(sankoreLang.reload).click(function(){ if($("#wgt_display").hasClass("selected")){ $("#wgt_edit").trigger("click"); @@ -92,6 +111,7 @@ $(document).ready(function() $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); + $(".style_select option[value='3']").text(sankoreLang.none); $(".style_select").change(function (event){ changeStyle($(this).find("option:selected").val()); @@ -181,34 +201,58 @@ $(document).ready(function() //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_help").removeClass("pad_color").removeClass("pad_help"); + $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); + $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); + $("#wgt_name").removeClass("pad_color"); + $(".style_select").removeClass("pad_select").removeClass("none_select").val(val); + $("body, html").removeClass("without_radius"); + break; + case "2": + $(".b_top_left").addClass("btl_pad").removeClass("without_back"); + $(".b_top_center").addClass("btc_pad").removeClass("without_back"); + $(".b_top_right").addClass("btr_pad").removeClass("without_back"); + $(".b_center_left").addClass("bcl_pad").removeClass("without_back"); + $(".b_center_right").addClass("bcr_pad").removeClass("without_back"); + $(".b_bottom_right").addClass("bbr_pad").removeClass("without_back"); + $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); + $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); + $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); + $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); + $("#wgt_display").addClass("pad_color").addClass("pad_edit"); + $("#wgt_name").addClass("pad_color"); + $(".style_select").addClass("pad_select").removeClass("none_select").val(val); + $("body, html").removeClass("without_radius"); + break; + case "3": + $(".b_top_left").addClass("without_back").removeClass("btl_pad"); + $(".b_top_center").addClass("without_back").removeClass("btc_pad"); + $(".b_top_right").addClass("without_back").removeClass("btr_pad"); + $(".b_center_left").addClass("without_back").removeClass("bcl_pad"); + $(".b_center_right").addClass("without_back").removeClass("bcr_pad"); + $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); + $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); + $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); + $("#wgt_help").addClass("pad_color").addClass("pad_help"); + $("#wgt_reload").addClass("pad_color").addClass("pad_reload"); + $("#wgt_edit").addClass("pad_color").addClass("pad_edit"); + $("#wgt_display").addClass("pad_color").addClass("pad_edit"); + $("#wgt_name").addClass("pad_color"); + $(".style_select").addClass("none_select").val(val); + $("body, html").addClass("without_radius"); + break; } } diff --git a/resources/library/interactivities/Syllabes.wgt/scripts/wcontainer.js b/resources/library/interactivities/Syllabes.wgt/scripts/wcontainer.js index 0d40d0d2..daaf20b3 100644 --- a/resources/library/interactivities/Syllabes.wgt/scripts/wcontainer.js +++ b/resources/library/interactivities/Syllabes.wgt/scripts/wcontainer.js @@ -5,7 +5,10 @@ var sankoreLang = { wgt_name: "Split a word", reload: "Reload", slate: "Wood", - pad: "Pad" + pad: "Pad", + none: "None", + help: "Help", + help_content: "This is an example of help content ..." }; // if use the "view/edit" button or rely on the api instead diff --git a/resources/library/interactivities/Syllabes.wgt/styles/master.css b/resources/library/interactivities/Syllabes.wgt/styles/master.css index 7e39b7f2..9775eba8 100644 --- a/resources/library/interactivities/Syllabes.wgt/styles/master.css +++ b/resources/library/interactivities/Syllabes.wgt/styles/master.css @@ -4,24 +4,26 @@ html, body{ margin: 0; padding: 0; border-radius: 50px; + overflow: hidden; } body{ background-image: url(../img/bg.png); } - h1{ font-size:18px; margin-bottom:20px; margin-top:0px; } + #ub-widget{ width: 100%; height: 100%; min-height: 180px; overflow: auto; color: white; + word-wrap: break-word; } input{ diff --git a/resources/library/interactivities/Syllabes.wgt/styles/spl-word.css b/resources/library/interactivities/Syllabes.wgt/styles/spl-word.css index f280bee5..3bcf504f 100644 --- a/resources/library/interactivities/Syllabes.wgt/styles/spl-word.css +++ b/resources/library/interactivities/Syllabes.wgt/styles/spl-word.css @@ -108,7 +108,6 @@ #wgt_name{ height: 44px; - width: 200px; margin: 10px 10px 0 10px; padding: 0; float: left; @@ -117,9 +116,8 @@ color: #8c5730; } -#wgt_reload, #wgt_edit, #wgt_display{ +#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{ cursor: pointer; - width: 80px; height: 44px; margin: 10px 10px 0 0; float: right; @@ -129,7 +127,6 @@ } #wgt_display{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -138,7 +135,6 @@ } #wgt_edit{ - width: 100px; padding-left: 40px; background-image: url(../img/slate-edit.png); background-repeat: no-repeat; @@ -217,3 +213,42 @@ 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; +} + +.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 From f48c2af3a18d1765db1c7fc2bc211a76519b6a3e Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Mon, 6 Aug 2012 18:16:35 +0200 Subject: [PATCH 2/2] fixed issue 518 loading the freezed widget html page on widget creation --- src/web/UBTrapFlashController.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/web/UBTrapFlashController.cpp b/src/web/UBTrapFlashController.cpp index d066227d..25cb37e9 100644 --- a/src/web/UBTrapFlashController.cpp +++ b/src/web/UBTrapFlashController.cpp @@ -31,6 +31,8 @@ #include "board/UBBoardController.h" +#include "frameworks/UBPlatformUtils.h" + #include "ui_trapFlash.h" #include "core/memcheck.h" @@ -201,6 +203,9 @@ void UBTrapFlashController::createWidget() UBApplication::boardController->downloadURL(QUrl(selectedObject.source), QPoint(0, 0), QSize(selectedObject.width, selectedObject.height)); } + QString freezedWidgetPath = UBPlatformUtils::applicationResourcesDirectory() + "/etc/freezedWidgetWrapper.html"; + mTrapFlashUi->webView->load(QUrl::fromLocalFile(freezedWidgetPath)); + mTrapFlashDialog->hide(); }