help for 'separe phrase' widget

preferencesAboutTextFull
unknown 13 years ago
parent 5b3e381441
commit 126859cd6e
  1. BIN
      resources/library/interactivities/Separe phrase.wgt/img/slate-help-white.png
  2. BIN
      resources/library/interactivities/Separe phrase.wgt/img/slate-help.png
  3. 3
      resources/library/interactivities/Separe phrase.wgt/index.html
  4. 2
      resources/library/interactivities/Separe phrase.wgt/locales/fr/index.html
  5. 4
      resources/library/interactivities/Separe phrase.wgt/locales/fr/scripts/wcontainer.js
  6. 2
      resources/library/interactivities/Separe phrase.wgt/locales/ru/index.html
  7. 4
      resources/library/interactivities/Separe phrase.wgt/locales/ru/scripts/wcontainer.js
  8. 126
      resources/library/interactivities/Separe phrase.wgt/scripts/app.js
  9. 4
      resources/library/interactivities/Separe phrase.wgt/scripts/wcontainer.js
  10. 36
      resources/library/interactivities/Separe phrase.wgt/styles/app.css
  11. 16
      resources/library/interactivities/Separe phrase.wgt/styles/master.css

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -27,7 +27,6 @@
lang = sankore.locale().substr(0,2); lang = sankore.locale().substr(0,2);
} else } else
lang = "en"; lang = "en";
lang = "fr";
if(lang != "en"){ if(lang != "en"){
returnStatus(lang); returnStatus(lang);
} }
@ -55,6 +54,7 @@
<td class="b_top_left">&nbsp;</td> <td class="b_top_left">&nbsp;</td>
<td class="b_top_center"> <td class="b_top_center">
<div id="wgt_name"></div> <div id="wgt_name"></div>
<div id="wgt_help"></div>
<div id="wgt_reload"></div> <div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div> <div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div> <div id="wgt_edit"></div>
@ -70,6 +70,7 @@
<tr> <tr>
<td class="b_center_left">&nbsp;</td> <td class="b_center_left">&nbsp;</td>
<td> <td>
<div id="help"></div>
<div id="ub-widget"> <div id="ub-widget">
</div> </div>

@ -32,6 +32,7 @@
<td class="b_top_left">&nbsp;</td> <td class="b_top_left">&nbsp;</td>
<td class="b_top_center"> <td class="b_top_center">
<div id="wgt_name"></div> <div id="wgt_name"></div>
<div id="wgt_help"></div>
<div id="wgt_reload"></div> <div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div> <div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div> <div id="wgt_edit"></div>
@ -47,6 +48,7 @@
<tr> <tr>
<td class="b_center_left">&nbsp;</td> <td class="b_center_left">&nbsp;</td>
<td> <td>
<div id="help"></div>
<div id="ub-widget"> <div id="ub-widget">
</div> </div>

@ -6,7 +6,9 @@ var sankoreLang = {
reload: "Recharger", reload: "Recharger",
slate: "ardoise", slate: "ardoise",
pad: "tablette", pad: "tablette",
none: "aucun" none: "aucun",
help: "aide",
help_content: "Ceci est un exemple de contenu de l'aide ..."
}; };
// if use the "view/edit" button or rely on the api instead // if use the "view/edit" button or rely on the api instead

@ -33,6 +33,7 @@
<td class="b_top_left">&nbsp;</td> <td class="b_top_left">&nbsp;</td>
<td class="b_top_center"> <td class="b_top_center">
<div id="wgt_name"></div> <div id="wgt_name"></div>
<div id="wgt_help"></div>
<div id="wgt_reload"></div> <div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div> <div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div> <div id="wgt_edit"></div>
@ -48,6 +49,7 @@
<tr> <tr>
<td class="b_center_left">&nbsp;</td> <td class="b_center_left">&nbsp;</td>
<td> <td>
<div id="help"></div>
<div id="ub-widget"> <div id="ub-widget">
</div> </div>

@ -6,7 +6,9 @@ var sankoreLang = {
reload: "Обновить", reload: "Обновить",
slate: "Узор", slate: "Узор",
pad: "Планшет", pad: "Планшет",
none: "Нет" none: "Нет",
help: "Помощь",
help_content: "Пример текста помощи ..."
}; };
// if use the "view/edit" button or rely on the api instead // if use the "view/edit" button or rely on the api instead

@ -45,7 +45,7 @@ $(document).ready(function()
} }
} }
if(sankore.preference("spl_phrase_style","")){ if(window.sankore && sankore.preference("spl_phrase_style","")){
changeStyle(sankore.preference("spl_phrase_style","")); changeStyle(sankore.preference("spl_phrase_style",""));
$(".style_select").val(sankore.preference("spl_phrase_style","")); $(".style_select").val(sankore.preference("spl_phrase_style",""));
} else } else
@ -53,6 +53,9 @@ $(document).ready(function()
$("#wgt_display").text(sankoreLang.view); $("#wgt_display").text(sankoreLang.view);
$("#wgt_edit").text(sankoreLang.edit); $("#wgt_edit").text(sankoreLang.edit);
$("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content);
$("#wgt_display, #wgt_edit").click(function(event){ $("#wgt_display, #wgt_edit").click(function(event){
if(this.id == "wgt_display"){ if(this.id == "wgt_display"){
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
@ -74,8 +77,24 @@ $(document).ready(function()
} }
} }
}); });
$("#wgt_name").text(sankoreLang.wgt_name); $("#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(){ $("#wgt_reload").text(sankoreLang.reload).click(function(){
if($("#wgt_display").hasClass("selected")){ if($("#wgt_display").hasClass("selected")){
$("#wgt_edit").trigger("click"); $("#wgt_edit").trigger("click");
@ -118,7 +137,7 @@ $(document).ready(function()
phrase = phrase.replace( / /g, '' ); phrase = phrase.replace( / /g, '' );
// create the html // create the html
if(sankore.preference("ordSplPhrasesState", "") == "1" && flag){ if(window.sankore && sankore.preference("ordSplPhrasesState", "") == "1" && flag){
$("#mp_view").html(sankore.preference("ordSplPhrasesCode", "")); $("#mp_view").html(sankore.preference("ordSplPhrasesCode", ""));
if(sankore.preference("ordSplPhrasesAnswer", "")) if(sankore.preference("ordSplPhrasesAnswer", ""))
$("#mp_view").addClass(sankore.preference("ordSplPhrasesAnswer", "")); $("#mp_view").addClass(sankore.preference("ordSplPhrasesAnswer", ""));
@ -244,56 +263,59 @@ $(document).ready(function()
//changing the style //changing the style
function changeStyle(val){ function changeStyle(val){
switch(val){ switch(val){
case "1": case "1":
$(".b_top_left").removeClass("btl_pad").removeClass("without_back"); $(".b_top_left").removeClass("btl_pad").removeClass("without_back");
$(".b_top_center").removeClass("btc_pad").removeClass("without_back"); $(".b_top_center").removeClass("btc_pad").removeClass("without_back");
$(".b_top_right").removeClass("btr_pad").removeClass("without_back"); $(".b_top_right").removeClass("btr_pad").removeClass("without_back");
$(".b_center_left").removeClass("bcl_pad").removeClass("without_back"); $(".b_center_left").removeClass("bcl_pad").removeClass("without_back");
$(".b_center_right").removeClass("bcr_pad").removeClass("without_back"); $(".b_center_right").removeClass("bcr_pad").removeClass("without_back");
$(".b_bottom_right").removeClass("bbr_pad").removeClass("without_back"); $(".b_bottom_right").removeClass("bbr_pad").removeClass("without_back");
$(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back"); $(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back"); $(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$(".style_select").removeClass("pad_select").removeClass("none_select").val(val); $("#wgt_name").removeClass("pad_color");
$("body, html").removeClass("without_radius"); $(".style_select").removeClass("pad_select").removeClass("none_select").val(val);
break; $("body, html").removeClass("without_radius");
case "2": break;
$(".b_top_left").addClass("btl_pad").removeClass("without_back"); case "2":
$(".b_top_center").addClass("btc_pad").removeClass("without_back"); $(".b_top_left").addClass("btl_pad").removeClass("without_back");
$(".b_top_right").addClass("btr_pad").removeClass("without_back"); $(".b_top_center").addClass("btc_pad").removeClass("without_back");
$(".b_center_left").addClass("bcl_pad").removeClass("without_back"); $(".b_top_right").addClass("btr_pad").removeClass("without_back");
$(".b_center_right").addClass("bcr_pad").removeClass("without_back"); $(".b_center_left").addClass("bcl_pad").removeClass("without_back");
$(".b_bottom_right").addClass("bbr_pad").removeClass("without_back"); $(".b_center_right").addClass("bcr_pad").removeClass("without_back");
$(".b_bottom_left").addClass("bbl_pad").removeClass("without_back"); $(".b_bottom_right").addClass("bbr_pad").removeClass("without_back");
$(".b_bottom_center").addClass("bbc_pad").removeClass("without_back"); $(".b_bottom_left").addClass("bbl_pad").removeClass("without_back");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $(".b_bottom_center").addClass("bbc_pad").removeClass("without_back");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_name").addClass("pad_color"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$(".style_select").addClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("body, html").removeClass("without_radius"); $("#wgt_name").addClass("pad_color");
break; $(".style_select").addClass("pad_select").removeClass("none_select").val(val);
case "3": $("body, html").removeClass("without_radius");
$(".b_top_left").addClass("without_back").removeClass("btl_pad"); break;
$(".b_top_center").addClass("without_back").removeClass("btc_pad"); case "3":
$(".b_top_right").addClass("without_back").removeClass("btr_pad"); $(".b_top_left").addClass("without_back").removeClass("btl_pad");
$(".b_center_left").addClass("without_back").removeClass("bcl_pad"); $(".b_top_center").addClass("without_back").removeClass("btc_pad");
$(".b_center_right").addClass("without_back").removeClass("bcr_pad"); $(".b_top_right").addClass("without_back").removeClass("btr_pad");
$(".b_bottom_right").addClass("without_back").removeClass("bbr_pad"); $(".b_center_left").addClass("without_back").removeClass("bcl_pad");
$(".b_bottom_left").addClass("without_back").removeClass("bbl_pad"); $(".b_center_right").addClass("without_back").removeClass("bcr_pad");
$(".b_bottom_center").addClass("without_back").removeClass("bbc_pad"); $(".b_bottom_right").addClass("without_back").removeClass("bbr_pad");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $(".b_bottom_left").addClass("without_back").removeClass("bbl_pad");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $(".b_bottom_center").addClass("without_back").removeClass("bbc_pad");
$("#wgt_display").addClass("pad_color").addClass("pad_edit"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_name").addClass("pad_color"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$(".style_select").addClass("none_select").val(val); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("body, html").addClass("without_radius"); $("#wgt_display").addClass("pad_color").addClass("pad_edit");
break; $("#wgt_name").addClass("pad_color");
} $(".style_select").addClass("none_select").val(val);
$("body, html").addClass("without_radius");
break;
} }
}
}); });

@ -6,7 +6,9 @@ var sankoreLang = {
reload: "Reload", reload: "Reload",
slate: "Wood", slate: "Wood",
pad: "Pad", pad: "Pad",
none: "None" none: "None",
help: "Help",
help_content: "This is an example of help content ..."
}; };
// if use the "view/edit" button or rely on the api instead // if use the "view/edit" button or rely on the api instead

@ -32,12 +32,6 @@
display: inline-block; display: inline-block;
} }
#mp_edit textarea{
resize: none;
height: 60px;
}
/*new design*/ /*new design*/
.selected{ .selected{
@ -112,7 +106,6 @@
#wgt_name{ #wgt_name{
height: 44px; height: 44px;
width: 300px;
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
@ -121,9 +114,8 @@
color: #8c5730; color: #8c5730;
} }
#wgt_reload, #wgt_edit, #wgt_display{ #wgt_reload, #wgt_edit, #wgt_display, #wgt_help{
cursor: pointer; cursor: pointer;
width: 80px;
height: 44px; height: 44px;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
@ -133,7 +125,6 @@
} }
#wgt_display{ #wgt_display{
width: 100px;
padding-left: 40px; padding-left: 40px;
background-image: url(../img/slate-edit.png); background-image: url(../img/slate-edit.png);
background-repeat: no-repeat; background-repeat: no-repeat;
@ -142,7 +133,6 @@
} }
#wgt_edit{ #wgt_edit{
width: 100px;
padding-left: 40px; padding-left: 40px;
background-image: url(../img/slate-edit.png); background-image: url(../img/slate-edit.png);
background-repeat: no-repeat; background-repeat: no-repeat;
@ -235,3 +225,27 @@
color: white !important; color: white !important;
background-image: url(../img/ar_down_white.png) !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{
}

@ -4,6 +4,7 @@ html, body{
margin: 0; margin: 0;
padding: 0; padding: 0;
border-radius: 50px; border-radius: 50px;
overflow: hidden;
} }
body{ body{
@ -37,15 +38,14 @@ button{
width: 80px; width: 80px;
} }
input.percent, textarea.percent{ textarea{
width: 100%; font: 32px tahoma;
margin: 0px; padding: 0px; letter-spacing: 0.1em;
border-width: 0px; width: 98%;
min-height: 160px;
resize: vertical;
} }
.inputwrap{ .inputwrap{
border-style: solid;
border-width: 1px;
border-color: #dbdfe6;
border-top-color: #abadb3;
} }
Loading…
Cancel
Save