updated 'Ordre lettres' app

preferencesAboutTextFull
maximXbs 12 years ago
parent 0f2640efde
commit ec97931e2e
  1. 141
      resources/library/interactivities/Ordre lettres.wgt/css/basic.css
  2. BIN
      resources/library/interactivities/Ordre lettres.wgt/img/green_point.png
  3. BIN
      resources/library/interactivities/Ordre lettres.wgt/img/parameters-bg.png
  4. BIN
      resources/library/interactivities/Ordre lettres.wgt/img/red_point.png
  5. BIN
      resources/library/interactivities/Ordre lettres.wgt/img/slate-display.png
  6. BIN
      resources/library/interactivities/Ordre lettres.wgt/img/slate-edit.png
  7. BIN
      resources/library/interactivities/Ordre lettres.wgt/img/slate-help-white.png
  8. BIN
      resources/library/interactivities/Ordre lettres.wgt/img/slate-help.png
  9. BIN
      resources/library/interactivities/Ordre lettres.wgt/img/slate-toolbar-help.png
  10. BIN
      resources/library/interactivities/Ordre lettres.wgt/img/slate-toolbar-reload-white.png
  11. BIN
      resources/library/interactivities/Ordre lettres.wgt/img/slate-toolbar-reload.png
  12. BIN
      resources/library/interactivities/Ordre lettres.wgt/img/toolbar-edit.png
  13. BIN
      resources/library/interactivities/Ordre lettres.wgt/img/toolbar-help.png
  14. BIN
      resources/library/interactivities/Ordre lettres.wgt/img/toolbar-reload.png
  15. 17
      resources/library/interactivities/Ordre lettres.wgt/index.html
  16. 45
      resources/library/interactivities/Ordre lettres.wgt/js/script.js
  17. 17
      resources/library/interactivities/Ordre lettres.wgt/locales/fr/index.html
  18. 89
      resources/library/interactivities/Ordre lettres.wgt/locales/fr/js/script.js
  19. 17
      resources/library/interactivities/Ordre lettres.wgt/locales/ru/index.html
  20. 66
      resources/library/interactivities/Ordre lettres.wgt/locales/ru/js/script.js

@ -3,7 +3,7 @@ html, body{
height: 100%; height: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
border-radius: 50px; border-radius: 35px;
overflow: hidden; overflow: hidden;
} }
@ -28,14 +28,6 @@ body{
margin: 5px 10px; margin: 5px 10px;
} }
.green_point{
background-image: url(../img/green_point.png);
}
.red_point{
background-image: url(../img/red_point.png);
}
#display_text, #edit_text{ #display_text, #edit_text{
height: 19px; height: 19px;
padding: 3px 0 0 0; padding: 3px 0 0 0;
@ -306,57 +298,40 @@ body{
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
/*font-family: "Lobster13Regular";*/ font-family: Arial,Helvetica,sans-serif;
font-size: 24px; font-size: 24px;
color: #8c5730; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0;
} }
#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{ #wgt_reload, #wgt_edit, #wgt_display, #wgt_help{
cursor: pointer; cursor: pointer;
height: 44px;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
/*font-family: "Lobster13Regular";*/ font-family: Arial,Helvetica,sans-serif;
font-size: 24px; font-size: 24px;
color: #8c5730; line-height: 32px;
} }
#wgt_display{ #wgt_display{
padding-left: 40px; padding-left: 35px;
background-image: url(../img/slate-edit.png); background: url(../img/toolbar-edit.png) left -32px no-repeat;
background-repeat: no-repeat; color: white;
background-position: top 0;
display: none; display: none;
} }
#wgt_edit{ #wgt_edit{
padding-left: 40px; padding-left: 35px;
background-image: url(../img/slate-edit.png); background: url(../img/slate-toolbar-edit.png) left top no-repeat;
background-repeat: no-repeat; color: #7F613F;
background-position: top 0; text-shadow: #FFDCA9 0 1px 0;
} }
#wgt_reload{ #wgt_reload{
padding-left: 40px; padding-left: 35px;
background-image: url(../img/slate-toolbar-reload.png); background: url(../img/slate-toolbar-reload.png) left top no-repeat;
background-repeat: no-repeat; color: #7F613F;
background-position: top 0; text-shadow: #FFDCA9 0 1px 0;
}
.style_select{
width: 120px;
/*font-family: "Lobster13Regular";*/
font-size: 24px;
float: right;
margin: 10px 20px 0 0;
border-radius: 10px;
background-image: url(../img/ar_down.png);
background-color: #d4aa79;
color: #8c5730;
background-position: 105px 11px;
background-repeat: no-repeat;
-webkit-appearance: menulist-text;
display: none;
} }
.btl_pad{ .btl_pad{
@ -391,51 +366,50 @@ body{
background-image: url(../img/pad-bottom-right.png) !important; background-image: url(../img/pad-bottom-right.png) !important;
} }
.pad_color{ .without_radius{
color: white !important; border-radius: 0 !important;
} }
.pad_reload{ .without_back{
background-image: url(../img/slate-toolbar-reload-white.png) !important; background: none !important;
} }
.pad_edit{ .pad_color{
background-image: url(../img/slate-display.png) !important; color: #FC9 !important;
text-shadow: none !important;
} }
.pad_select{ .pad_reload{
background-color: black !important; background: url(../img/toolbar-reload.png) left top no-repeat !important;
color: white !important;
background-image: url(../img/ar_down_white.png) !important;
} }
.without_radius{ .pad_edit{
border-radius: 0 !important; background: url(../img/toolbar-edit.png) left top no-repeat !important;
} }
.without_back{ .pad_help{
background: none !important; background: url(../img/toolbar-help.png) left top no-repeat !important;
} }
.none_select{ .help_wood{
background-color: #333 !important; background: url(../img/slate-toolbar-help.png) left -32px no-repeat !important;
color: white !important; color: white !important;
background-image: url(../img/ar_down_white.png) !important; text-shadow: #7F613F 0 -1px 0 !important;
} }
.pad_help{ .help_pad{
background-image: url(../img/slate-help-white.png) !important; background: url(../img/toolbar-help.png) left -32px no-repeat !important;
color: white !important;
} }
#wgt_help{ #wgt_help{
padding-left: 32px; padding-left: 35px;
background-image: url(../img/slate-help.png); background: url(../img/slate-toolbar-help.png) left top no-repeat;
background-repeat: no-repeat; color: #7F613F;
background-position: top 0; text-shadow: #FFDCA9 0 1px 0;
} }
#help{ #help{
width: 100%;
height: 100%; height: 100%;
overflow: auto; overflow: auto;
display: none; display: none;
@ -444,5 +418,36 @@ body{
} }
.open{ .open{
}
#parameters{
display: none;
padding: 10px 20px;
background: url("../img/parameters-bg.png");
border-radius: 4px 4px 0 0;
}
.inline{
display: inline-block;
font-family: "helvetica neue";
font-size: 14px;
color: #666;
}
#parameters label {
font-style: italic;
}
#style_select{
margin-left: 10px;
}
.display_wood{
background: url(../img/slate-toolbar-edit.png) left -32px no-repeat !important;
text-shadow: #7F613F 0 -1px 0;
}
.radius_ft{
border-radius: 45px !important;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 740 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

@ -52,11 +52,6 @@
<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>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</td> </td>
<td class="b_top_right">&nbsp;</td> <td class="b_top_right">&nbsp;</td>
</tr> </tr>
@ -66,7 +61,17 @@
<td> <td>
<div id="help"></div> <div id="help"></div>
<div id="data"> <div id="data">
<div id="parameters">
<div class="inline">
<label>
<select id="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</label>
</div>
</div>
</div> </div>
</td> </td>
<td class="b_center_right">&nbsp;</td> <td class="b_center_right">&nbsp;</td>

@ -1,5 +1,5 @@
var sankoreLang = { var sankoreLang = {
display: "Display", display: "Close",
edit: "Edit", edit: "Edit",
short_desc: "Listen to the sound and make the correct word.", short_desc: "Listen to the sound and make the correct word.",
add: "Add new block", add: "Add new block",
@ -11,7 +11,8 @@ var sankoreLang = {
pad: "Pad", pad: "Pad",
none: "None", none: "None",
help: "Help", help: "Help",
help_content: "This is an example of help content ..." help_content: "This is an example of help content ...",
theme: "Theme"
}; };
//main function //main function
@ -23,9 +24,11 @@ function start(){
$("#wgt_reload").text(sankoreLang.reload); $("#wgt_reload").text(sankoreLang.reload);
$("#wgt_help").text(sankoreLang.help); $("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content); $("#help").html(sankoreLang.help_content);
$(".style_select option[value='1']").text(sankoreLang.slate); $("#style_select option[value='1']").text(sankoreLang.slate);
$(".style_select option[value='2']").text(sankoreLang.pad); $("#style_select option[value='2']").text(sankoreLang.pad);
$(".style_select option[value='3']").text(sankoreLang.none); $("#style_select option[value='3']").text(sankoreLang.none);
var tmpl = $("div.inline label").html();
$("div.inline label").html(sankoreLang.theme + tmpl)
if(window.sankore){ if(window.sankore){
if(sankore.preference("associer_sound","")){ if(sankore.preference("associer_sound","")){
@ -36,7 +39,7 @@ function start(){
showExample(); showExample();
if(sankore.preference("ord_let_style","")){ if(sankore.preference("ord_let_style","")){
changeStyle(sankore.preference("ord_let_style","")); changeStyle(sankore.preference("ord_let_style",""));
$(".style_select").val(sankore.preference("ord_let_style","")); $("#style_select").val(sankore.preference("ord_let_style",""));
} else } else
changeStyle("3") changeStyle("3")
} }
@ -46,18 +49,20 @@ function start(){
if (window.widget) { if (window.widget) {
window.widget.onleave = function(){ window.widget.onleave = function(){
exportData(); exportData();
sankore.setPreference("ord_let_style", $(".style_select").find("option:selected").val()); sankore.setPreference("ord_let_style", $("#style_select").find("option:selected").val());
} }
} }
$("#wgt_help").click(function(){ $("#wgt_help").click(function(){
var tmp = $(this); var tmp = $(this);
if($(this).hasClass("open")){ if($(this).hasClass("open")){
$(this).removeClass("help_pad").removeClass("help_wood")
$("#help").slideUp("100", function(){ $("#help").slideUp("100", function(){
tmp.removeClass("open"); tmp.removeClass("open");
$("#data").show(); $("#data").show();
}); });
} else { } else {
($("#style_select").val() == 1)?$(this).removeClass("help_pad").addClass("help_wood"):$(this).removeClass("help_wood").addClass("help_pad");
$("#data").hide(); $("#data").hide();
$("#help").slideDown("100", function(){ $("#help").slideDown("100", function(){
tmp.addClass("open"); tmp.addClass("open");
@ -78,7 +83,7 @@ function start(){
exportData(); exportData();
}); });
$(".style_select").change(function (event){ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val()); changeStyle($(this).find("option:selected").val());
}) })
@ -89,7 +94,7 @@ function start(){
sankore.enableDropOnWidget(false); sankore.enableDropOnWidget(false);
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_edit").removeClass("selected"); $("#wgt_edit").removeClass("selected");
$(".style_select").css("display","none"); $("#parameters").css("display","none");
$(".add_block").remove(); $(".add_block").remove();
$(".cont").each(function(){ $(".cont").each(function(){
var container = $(this); var container = $(this);
@ -124,7 +129,7 @@ function start(){
sankore.enableDropOnWidget(true); sankore.enableDropOnWidget(true);
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_display").removeClass("selected"); $("#wgt_display").removeClass("selected");
$(".style_select").css("display","block"); $("#parameters").css("display","block");
$(".cont").each(function(){ $(".cont").each(function(){
var container = $(this); var container = $(this);
$("<div class='close_cont'>").appendTo(container); $("<div class='close_cont'>").appendTo(container);
@ -446,10 +451,10 @@ function changeStyle(val){
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color"); $("#wgt_name").removeClass("pad_color");
$(".style_select").removeClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").addClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select").val(val);
$("body, html").removeClass("without_radius").addClass("radius_ft");
break; break;
case "2": case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back"); $(".b_top_left").addClass("btl_pad").removeClass("without_back");
@ -463,10 +468,10 @@ function changeStyle(val){
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select").val(val);
$("body, html").removeClass("without_radius").removeClass("radius_ft");
break; break;
case "3": case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad"); $(".b_top_left").addClass("without_back").removeClass("btl_pad");
@ -480,10 +485,10 @@ function changeStyle(val){
$("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").addClass("without_radius"); $("#style_select").val(val);
$("body, html").addClass("without_radius").removeClass("radius_ft");
break; break;
} }
} }

@ -26,11 +26,6 @@
<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>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</td> </td>
<td class="b_top_right">&nbsp;</td> <td class="b_top_right">&nbsp;</td>
</tr> </tr>
@ -40,7 +35,17 @@
<td> <td>
<div id="help"></div> <div id="help"></div>
<div id="data"> <div id="data">
<div id="parameters">
<div class="inline">
<label>
<select id="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</label>
</div>
</div>
</div> </div>
</td> </td>
<td class="b_center_right">&nbsp;</td> <td class="b_center_right">&nbsp;</td>

@ -1,5 +1,5 @@
var sankoreLang = { var sankoreLang = {
display: "Afficher", display: "Fermer",
edit: "Modifier", edit: "Modifier",
short_desc: "Ecoutez le son et replacer les lettres dans l'ordre.", short_desc: "Ecoutez le son et replacer les lettres dans l'ordre.",
add: "Nouveau bloc", add: "Nouveau bloc",
@ -12,26 +12,27 @@ var sankoreLang = {
none: "Aucun", none: "Aucun",
help: "Aide", help: "Aide",
help_content: "<p><h2>Ordre des lettres</h2></p>"+ help_content: "<p><h2>Ordre des lettres</h2></p>"+
"<p><h3>Ordonner des lettres pour reconstituer un mot.</h3></p>"+ "<p><h3>Ordonner des lettres pour reconstituer un mot.</h3></p>"+
"<p>L’intégration d’un fichier son (facultatif) permet d’écouter le mot à reconstituer. Lorsque les lettres sont dans le bon ordre, l’interactivité se colore en vert.</p>"+ "<p>L’intégration d’un fichier son (facultatif) permet d’écouter le mot à reconstituer. Lorsque les lettres sont dans le bon ordre, l’interactivité se colore en vert.</p>"+
"<p>L’activité s’effectue par un glisser-déposer des étiquettes pour remettre les lettres en ordre.<b> NB : vous pouvez également utiliser cette activité avec des chiffres.</b></p>"+ "<p>L’activité s’effectue par un glisser-déposer des étiquettes pour remettre les lettres en ordre.<b> NB : vous pouvez également utiliser cette activité avec des chiffres.</b></p>"+
"<p>Le bouton “Recharger” réinitialise les exercices.</p>"+ "<p>Le bouton “Recharger” réinitialise les exercices.</p>"+
"<p>Le bouton “Modifier” vous permet :</p>"+ "<p>Le bouton “Modifier” vous permet :</p>"+
"<ul><li>de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut aucun),</li>"+ "<ul><li>de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut aucun),</li>"+
"<li>de déterminer le mot à reconstituer.</li></ul>"+ "<li>de déterminer le mot à reconstituer.</li></ul>"+
"<p>Pour créer un nouvel exercice, cliquez sur “Nouveau bloc” en bas, puis</p>"+ "<p>Pour créer un nouvel exercice, cliquez sur “Nouveau bloc” en bas, puis</p>"+
"<ul><li>insérez une consigne en cliquant sur le champ de texte “Saisir la consigne ici ...”,</li>"+ "<ul><li>insérez une consigne en cliquant sur le champ de texte “Saisir la consigne ici ...”,</li>"+
"<li>insérez un son dans la zone à gauche de la consigne par glisser-déposer d’un son à partir de votre bibliothèque (facultatif),</li>"+ "<li>insérez un son dans la zone à gauche de la consigne par glisser-déposer d’un son à partir de votre bibliothèque (facultatif),</li>"+
"<li>écrivez le mot souhaité à la place de “exemple”.</li></ul>"+ "<li>écrivez le mot souhaité à la place de “exemple”.</li></ul>"+
"<p>Pour supprimer un exercice, cliquez sur la croix à gauche du numéro de l’exercice.</p>"+ "<p>Pour supprimer un exercice, cliquez sur la croix à gauche du numéro de l’exercice.</p>"+
"<p>Le bouton “Afficher” vous permet d’utiliser l’activité.</p>" "<p>Le bouton “Afficher” vous permet d’utiliser l’activité.</p>",
theme: "Thème"
}; };
//main function //main function
@ -43,9 +44,11 @@ function start(){
$("#wgt_reload").text(sankoreLang.reload); $("#wgt_reload").text(sankoreLang.reload);
$("#wgt_help").text(sankoreLang.help); $("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content); $("#help").html(sankoreLang.help_content);
$(".style_select option[value='1']").text(sankoreLang.slate); $("#style_select option[value='1']").text(sankoreLang.slate);
$(".style_select option[value='2']").text(sankoreLang.pad); $("#style_select option[value='2']").text(sankoreLang.pad);
$(".style_select option[value='3']").text(sankoreLang.none); $("#style_select option[value='3']").text(sankoreLang.none);
var tmpl = $("div.inline label").html();
$("div.inline label").html(sankoreLang.theme + tmpl)
if(window.sankore){ if(window.sankore){
if(sankore.preference("associer_sound","")){ if(sankore.preference("associer_sound","")){
@ -56,7 +59,7 @@ function start(){
showExample(); showExample();
if(sankore.preference("ord_let_style","")){ if(sankore.preference("ord_let_style","")){
changeStyle(sankore.preference("ord_let_style","")); changeStyle(sankore.preference("ord_let_style",""));
$(".style_select").val(sankore.preference("ord_let_style","")); $("#style_select").val(sankore.preference("ord_let_style",""));
} else } else
changeStyle("3") changeStyle("3")
} }
@ -66,18 +69,20 @@ function start(){
if (window.widget) { if (window.widget) {
window.widget.onleave = function(){ window.widget.onleave = function(){
exportData(); exportData();
sankore.setPreference("ord_let_style", $(".style_select").find("option:selected").val()); sankore.setPreference("ord_let_style", $("#style_select").find("option:selected").val());
} }
} }
$("#wgt_help").click(function(){ $("#wgt_help").click(function(){
var tmp = $(this); var tmp = $(this);
if($(this).hasClass("open")){ if($(this).hasClass("open")){
$(this).removeClass("help_pad").removeClass("help_wood")
$("#help").slideUp("100", function(){ $("#help").slideUp("100", function(){
tmp.removeClass("open"); tmp.removeClass("open");
$("#data").show(); $("#data").show();
}); });
} else { } else {
($("#style_select").val() == 1)?$(this).removeClass("help_pad").addClass("help_wood"):$(this).removeClass("help_wood").addClass("help_pad");
$("#data").hide(); $("#data").hide();
$("#help").slideDown("100", function(){ $("#help").slideDown("100", function(){
tmp.addClass("open"); tmp.addClass("open");
@ -98,7 +103,7 @@ function start(){
exportData(); exportData();
}); });
$(".style_select").change(function (event){ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val()); changeStyle($(this).find("option:selected").val());
}) })
@ -109,7 +114,7 @@ function start(){
sankore.enableDropOnWidget(false); sankore.enableDropOnWidget(false);
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_edit").removeClass("selected"); $("#wgt_edit").removeClass("selected");
$(".style_select").css("display","none"); $("#parameters").css("display","none");
$(".add_block").remove(); $(".add_block").remove();
$(".cont").each(function(){ $(".cont").each(function(){
var container = $(this); var container = $(this);
@ -133,7 +138,11 @@ function start(){
tmp_array = shuffle(tmp_array); tmp_array = shuffle(tmp_array);
for(var i = 0; i<tmp_array.length;i++) for(var i = 0; i<tmp_array.length;i++)
tmp_array[i].appendTo(ul_cont); tmp_array[i].appendTo(ul_cont);
ul_cont.sortable({revert: true, placeholder: "highlight", update: checkResult}); ul_cont.sortable({
revert: true,
placeholder: "highlight",
update: checkResult
});
}); });
$(this).css("display", "none"); $(this).css("display", "none");
$("#wgt_edit").css("display", "block"); $("#wgt_edit").css("display", "block");
@ -144,7 +153,7 @@ function start(){
sankore.enableDropOnWidget(true); sankore.enableDropOnWidget(true);
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_display").removeClass("selected"); $("#wgt_display").removeClass("selected");
$(".style_select").css("display","block"); $("#parameters").css("display","block");
$(".cont").each(function(){ $(".cont").each(function(){
var container = $(this); var container = $(this);
$("<div class='close_cont'>").appendTo(container); $("<div class='close_cont'>").appendTo(container);
@ -300,7 +309,7 @@ function importData(data){
var audio_block = $("<div class='audio_block'>").appendTo(text); var audio_block = $("<div class='audio_block'>").appendTo(text);
$("<div class='play'>").appendTo(audio_block); $("<div class='play'>").appendTo(audio_block);
$("<div class='replay'>").appendTo(audio_block); $("<div class='replay'>").appendTo(audio_block);
var source = $("<source/>").attr("src", "../../" + data[i].audio); var source = $("<source/>").attr("src", data[i].audio);
var audio = $("<audio>").appendTo(audio_block); var audio = $("<audio>").appendTo(audio_block);
audio.append(source); audio.append(source);
$("<input type='hidden'/>").appendTo(audio_block); $("<input type='hidden'/>").appendTo(audio_block);
@ -326,7 +335,10 @@ function importData(data){
for(j = 0; j<tmp_array.length;j++) for(j = 0; j<tmp_array.length;j++)
tmp_array[j].appendTo(imgs_container); tmp_array[j].appendTo(imgs_container);
imgs_container.sortable({revert: true, placeholder: "highlight"}).bind('sortupdate', function(event, ui) { imgs_container.sortable({
revert: true,
placeholder: "highlight"
}).bind('sortupdate', function(event, ui) {
checkResult(event); checkResult(event);
}); });
if(data[i].cur_answer) if(data[i].cur_answer)
@ -347,7 +359,7 @@ function showExample(){
var audio_block = $("<div class='audio_block'>").appendTo(text); var audio_block = $("<div class='audio_block'>").appendTo(text);
$("<div class='play'>").appendTo(audio_block); $("<div class='play'>").appendTo(audio_block);
$("<div class='replay'>").appendTo(audio_block); $("<div class='replay'>").appendTo(audio_block);
var source = $("<source/>").attr("src", "objects/beep.mp3"); var source = $("<source/>").attr("src", "objects/exemple.mp3");
var audio = $("<audio>").appendTo(audio_block); var audio = $("<audio>").appendTo(audio_block);
audio.append(source); audio.append(source);
$("<input type='hidden'/>").appendTo(audio_block); $("<input type='hidden'/>").appendTo(audio_block);
@ -363,7 +375,10 @@ function showExample(){
tmp_array = shuffle(tmp_array); tmp_array = shuffle(tmp_array);
for(var i = 0; i<tmp_array.length;i++) for(var i = 0; i<tmp_array.length;i++)
tmp_array[i].appendTo(imgs_container); tmp_array[i].appendTo(imgs_container);
imgs_container.sortable({revert: true, placeholder: "highlight"}).bind('sortupdate', function(event, ui) { imgs_container.sortable({
revert: true,
placeholder: "highlight"
}).bind('sortupdate', function(event, ui) {
checkResult(event); checkResult(event);
}); });
} }
@ -460,10 +475,10 @@ function changeStyle(val){
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color"); $("#wgt_name").removeClass("pad_color");
$(".style_select").removeClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").addClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select").val(val);
$("body, html").removeClass("without_radius").addClass("radius_ft");
break; break;
case "2": case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back"); $(".b_top_left").addClass("btl_pad").removeClass("without_back");
@ -477,10 +492,10 @@ function changeStyle(val){
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select").val(val);
$("body, html").removeClass("without_radius").removeClass("radius_ft");
break; break;
case "3": case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad"); $(".b_top_left").addClass("without_back").removeClass("btl_pad");
@ -494,10 +509,10 @@ function changeStyle(val){
$("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").addClass("without_radius"); $("#style_select").val(val);
$("body, html").addClass("without_radius").removeClass("radius_ft");
break; break;
} }
} }

@ -26,11 +26,6 @@
<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>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</td> </td>
<td class="b_top_right">&nbsp;</td> <td class="b_top_right">&nbsp;</td>
</tr> </tr>
@ -40,7 +35,17 @@
<td> <td>
<div id="help"></div> <div id="help"></div>
<div id="data"> <div id="data">
<div id="parameters">
<div class="inline">
<label>
<select id="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</label>
</div>
</div>
</div> </div>
</td> </td>
<td class="b_center_right">&nbsp;</td> <td class="b_center_right">&nbsp;</td>

@ -1,5 +1,5 @@
var sankoreLang = { var sankoreLang = {
display: "Показать", display: "Закрыть",
edit: "Изменить", edit: "Изменить",
short_desc: "Прослушайте звук и составьте корректное слово.", short_desc: "Прослушайте звук и составьте корректное слово.",
add: "Новый блок", add: "Новый блок",
@ -11,10 +11,10 @@ var sankoreLang = {
pad: "Планшет", pad: "Планшет",
none: "Нет", none: "Нет",
help: "Помощь", help: "Помощь",
help_content: "Пример текста помощи ..." help_content: "Пример текста помощи ...",
theme: "Тема"
}; };
//main function //main function
function start(){ function start(){
@ -24,9 +24,11 @@ function start(){
$("#wgt_reload").text(sankoreLang.reload); $("#wgt_reload").text(sankoreLang.reload);
$("#wgt_help").text(sankoreLang.help); $("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content); $("#help").html(sankoreLang.help_content);
$(".style_select option[value='1']").text(sankoreLang.slate); $("#style_select option[value='1']").text(sankoreLang.slate);
$(".style_select option[value='2']").text(sankoreLang.pad); $("#style_select option[value='2']").text(sankoreLang.pad);
$(".style_select option[value='3']").text(sankoreLang.none); $("#style_select option[value='3']").text(sankoreLang.none);
var tmpl = $("div.inline label").html();
$("div.inline label").html(sankoreLang.theme + tmpl)
if(window.sankore){ if(window.sankore){
if(sankore.preference("associer_sound","")){ if(sankore.preference("associer_sound","")){
@ -37,7 +39,7 @@ function start(){
showExample(); showExample();
if(sankore.preference("ord_let_style","")){ if(sankore.preference("ord_let_style","")){
changeStyle(sankore.preference("ord_let_style","")); changeStyle(sankore.preference("ord_let_style",""));
$(".style_select").val(sankore.preference("ord_let_style","")); $("#style_select").val(sankore.preference("ord_let_style",""));
} else } else
changeStyle("3") changeStyle("3")
} }
@ -47,18 +49,20 @@ function start(){
if (window.widget) { if (window.widget) {
window.widget.onleave = function(){ window.widget.onleave = function(){
exportData(); exportData();
sankore.setPreference("ord_let_style", $(".style_select").find("option:selected").val()); sankore.setPreference("ord_let_style", $("#style_select").find("option:selected").val());
} }
} }
$("#wgt_help").click(function(){ $("#wgt_help").click(function(){
var tmp = $(this); var tmp = $(this);
if($(this).hasClass("open")){ if($(this).hasClass("open")){
$(this).removeClass("help_pad").removeClass("help_wood")
$("#help").slideUp("100", function(){ $("#help").slideUp("100", function(){
tmp.removeClass("open"); tmp.removeClass("open");
$("#data").show(); $("#data").show();
}); });
} else { } else {
($("#style_select").val() == 1)?$(this).removeClass("help_pad").addClass("help_wood"):$(this).removeClass("help_wood").addClass("help_pad");
$("#data").hide(); $("#data").hide();
$("#help").slideDown("100", function(){ $("#help").slideDown("100", function(){
tmp.addClass("open"); tmp.addClass("open");
@ -79,7 +83,7 @@ function start(){
exportData(); exportData();
}); });
$(".style_select").change(function (event){ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val()); changeStyle($(this).find("option:selected").val());
}) })
@ -90,7 +94,7 @@ function start(){
sankore.enableDropOnWidget(false); sankore.enableDropOnWidget(false);
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_edit").removeClass("selected"); $("#wgt_edit").removeClass("selected");
$(".style_select").css("display","none"); $("#parameters").css("display","none");
$(".add_block").remove(); $(".add_block").remove();
$(".cont").each(function(){ $(".cont").each(function(){
var container = $(this); var container = $(this);
@ -114,7 +118,11 @@ function start(){
tmp_array = shuffle(tmp_array); tmp_array = shuffle(tmp_array);
for(var i = 0; i<tmp_array.length;i++) for(var i = 0; i<tmp_array.length;i++)
tmp_array[i].appendTo(ul_cont); tmp_array[i].appendTo(ul_cont);
ul_cont.sortable({revert: true, placeholder: "highlight", update: checkResult}); ul_cont.sortable({
revert: true,
placeholder: "highlight",
update: checkResult
});
}); });
$(this).css("display", "none"); $(this).css("display", "none");
$("#wgt_edit").css("display", "block"); $("#wgt_edit").css("display", "block");
@ -125,7 +133,7 @@ function start(){
sankore.enableDropOnWidget(true); sankore.enableDropOnWidget(true);
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_display").removeClass("selected"); $("#wgt_display").removeClass("selected");
$(".style_select").css("display","block"); $("#parameters").css("display","block");
$(".cont").each(function(){ $(".cont").each(function(){
var container = $(this); var container = $(this);
$("<div class='close_cont'>").appendTo(container); $("<div class='close_cont'>").appendTo(container);
@ -281,7 +289,7 @@ function importData(data){
var audio_block = $("<div class='audio_block'>").appendTo(text); var audio_block = $("<div class='audio_block'>").appendTo(text);
$("<div class='play'>").appendTo(audio_block); $("<div class='play'>").appendTo(audio_block);
$("<div class='replay'>").appendTo(audio_block); $("<div class='replay'>").appendTo(audio_block);
var source = $("<source/>").attr("src", "../../" + data[i].audio); var source = $("<source/>").attr("src", data[i].audio);
var audio = $("<audio>").appendTo(audio_block); var audio = $("<audio>").appendTo(audio_block);
audio.append(source); audio.append(source);
$("<input type='hidden'/>").appendTo(audio_block); $("<input type='hidden'/>").appendTo(audio_block);
@ -307,7 +315,10 @@ function importData(data){
for(j = 0; j<tmp_array.length;j++) for(j = 0; j<tmp_array.length;j++)
tmp_array[j].appendTo(imgs_container); tmp_array[j].appendTo(imgs_container);
imgs_container.sortable({revert: true, placeholder: "highlight"}).bind('sortupdate', function(event, ui) { imgs_container.sortable({
revert: true,
placeholder: "highlight"
}).bind('sortupdate', function(event, ui) {
checkResult(event); checkResult(event);
}); });
if(data[i].cur_answer) if(data[i].cur_answer)
@ -328,7 +339,7 @@ function showExample(){
var audio_block = $("<div class='audio_block'>").appendTo(text); var audio_block = $("<div class='audio_block'>").appendTo(text);
$("<div class='play'>").appendTo(audio_block); $("<div class='play'>").appendTo(audio_block);
$("<div class='replay'>").appendTo(audio_block); $("<div class='replay'>").appendTo(audio_block);
var source = $("<source/>").attr("src", "objects/beep.mp3"); var source = $("<source/>").attr("src", "objects/exemple.mp3");
var audio = $("<audio>").appendTo(audio_block); var audio = $("<audio>").appendTo(audio_block);
audio.append(source); audio.append(source);
$("<input type='hidden'/>").appendTo(audio_block); $("<input type='hidden'/>").appendTo(audio_block);
@ -344,7 +355,10 @@ function showExample(){
tmp_array = shuffle(tmp_array); tmp_array = shuffle(tmp_array);
for(var i = 0; i<tmp_array.length;i++) for(var i = 0; i<tmp_array.length;i++)
tmp_array[i].appendTo(imgs_container); tmp_array[i].appendTo(imgs_container);
imgs_container.sortable({revert: true, placeholder: "highlight"}).bind('sortupdate', function(event, ui) { imgs_container.sortable({
revert: true,
placeholder: "highlight"
}).bind('sortupdate', function(event, ui) {
checkResult(event); checkResult(event);
}); });
} }
@ -441,10 +455,10 @@ function changeStyle(val){
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color"); $("#wgt_name").removeClass("pad_color");
$(".style_select").removeClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").addClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select").val(val);
$("body, html").removeClass("without_radius").addClass("radius_ft");
break; break;
case "2": case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back"); $(".b_top_left").addClass("btl_pad").removeClass("without_back");
@ -458,10 +472,10 @@ function changeStyle(val){
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select").val(val);
$("body, html").removeClass("without_radius").removeClass("radius_ft");
break; break;
case "3": case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad"); $(".b_top_left").addClass("without_back").removeClass("btl_pad");
@ -475,10 +489,10 @@ function changeStyle(val){
$("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").addClass("without_radius"); $("#style_select").val(val);
$("body, html").addClass("without_radius").removeClass("radius_ft");
break; break;
} }
} }

Loading…
Cancel
Save