updated 'Ordre images' app

preferencesAboutTextFull
maximXbs 12 years ago
parent 664f1fbc43
commit 862bb62cff
  1. 141
      resources/library/interactivities/Ordre images.wgt/css/basic.css
  2. BIN
      resources/library/interactivities/Ordre images.wgt/img/ar_down.png
  3. BIN
      resources/library/interactivities/Ordre images.wgt/img/ar_down_white.png
  4. BIN
      resources/library/interactivities/Ordre images.wgt/img/green_point.png
  5. BIN
      resources/library/interactivities/Ordre images.wgt/img/parameters-bg.png
  6. BIN
      resources/library/interactivities/Ordre images.wgt/img/red_point.png
  7. BIN
      resources/library/interactivities/Ordre images.wgt/img/slate-display.png
  8. BIN
      resources/library/interactivities/Ordre images.wgt/img/slate-edit.png
  9. BIN
      resources/library/interactivities/Ordre images.wgt/img/slate-help-white.png
  10. BIN
      resources/library/interactivities/Ordre images.wgt/img/slate-help.png
  11. BIN
      resources/library/interactivities/Ordre images.wgt/img/slate-toolbar-help.png
  12. BIN
      resources/library/interactivities/Ordre images.wgt/img/slate-toolbar-reload-white.png
  13. BIN
      resources/library/interactivities/Ordre images.wgt/img/slate-toolbar-reload.png
  14. BIN
      resources/library/interactivities/Ordre images.wgt/img/toolbar-edit.png
  15. BIN
      resources/library/interactivities/Ordre images.wgt/img/toolbar-help.png
  16. BIN
      resources/library/interactivities/Ordre images.wgt/img/toolbar-reload.png
  17. 19
      resources/library/interactivities/Ordre images.wgt/index.html
  18. 49
      resources/library/interactivities/Ordre images.wgt/js/script.js
  19. 19
      resources/library/interactivities/Ordre images.wgt/locales/fr/index.html
  20. 77
      resources/library/interactivities/Ordre images.wgt/locales/fr/js/script.js
  21. 19
      resources/library/interactivities/Ordre images.wgt/locales/ru/index.html
  22. 50
      resources/library/interactivities/Ordre images.wgt/locales/ru/js/script.js

@ -3,7 +3,7 @@ html, body{
height: 100%;
margin: 0;
padding: 0;
border-radius: 50px;
border-radius: 35px;
overflow: hidden;
}
@ -28,14 +28,6 @@ body{
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{
height: 19px;
padding: 3px 0 0 0;
@ -245,57 +237,40 @@ body{
margin: 10px 10px 0 10px;
padding: 0;
float: left;
/*font-family: "Lobster13Regular";*/
font-family: Arial,Helvetica,sans-serif;
font-size: 24px;
color: #8c5730;
color: #7F613F;
text-shadow: #FFDCA9 0 1px 0;
}
#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{
cursor: pointer;
height: 44px;
margin: 10px 10px 0 0;
float: right;
/*font-family: "Lobster13Regular";*/
font-size: 24px;
color: #8c5730;
font-family: Arial,Helvetica,sans-serif;
font-size: 24px;
line-height: 32px;
}
#wgt_display{
padding-left: 40px;
background-image: url(../img/slate-edit.png);
background-repeat: no-repeat;
background-position: top 0;
padding-left: 35px;
background: url(../img/toolbar-edit.png) left -32px no-repeat;
color: white;
display: none;
}
#wgt_edit{
padding-left: 40px;
background-image: url(../img/slate-edit.png);
background-repeat: no-repeat;
background-position: top 0;
padding-left: 35px;
background: url(../img/slate-toolbar-edit.png) left top no-repeat;
color: #7F613F;
text-shadow: #FFDCA9 0 1px 0;
}
#wgt_reload{
padding-left: 40px;
background-image: url(../img/slate-toolbar-reload.png);
background-repeat: no-repeat;
background-position: top 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;
padding-left: 35px;
background: url(../img/slate-toolbar-reload.png) left top no-repeat;
color: #7F613F;
text-shadow: #FFDCA9 0 1px 0;
}
.btl_pad{
@ -330,51 +305,50 @@ body{
background-image: url(../img/pad-bottom-right.png) !important;
}
.pad_color{
color: white !important;
.without_radius{
border-radius: 0 !important;
}
.pad_reload{
background-image: url(../img/slate-toolbar-reload-white.png) !important;
.without_back{
background: none !important;
}
.pad_edit{
background-image: url(../img/slate-display.png) !important;
.pad_color{
color: #FC9 !important;
text-shadow: none !important;
}
.pad_select{
background-color: black !important;
color: white !important;
background-image: url(../img/ar_down_white.png) !important;
.pad_reload{
background: url(../img/toolbar-reload.png) left top no-repeat !important;
}
.without_radius{
border-radius: 0 !important;
.pad_edit{
background: url(../img/toolbar-edit.png) left top no-repeat !important;
}
.without_back{
background: none !important;
.pad_help{
background: url(../img/toolbar-help.png) left top no-repeat !important;
}
.none_select{
background-color: #333 !important;
.help_wood{
background: url(../img/slate-toolbar-help.png) left -32px no-repeat !important;
color: white !important;
background-image: url(../img/ar_down_white.png) !important;
text-shadow: #7F613F 0 -1px 0 !important;
}
.pad_help{
background-image: url(../img/slate-help-white.png) !important;
.help_pad{
background: url(../img/toolbar-help.png) left -32px no-repeat !important;
color: white !important;
}
#wgt_help{
padding-left: 32px;
background-image: url(../img/slate-help.png);
background-repeat: no-repeat;
background-position: top 0;
padding-left: 35px;
background: url(../img/slate-toolbar-help.png) left top no-repeat;
color: #7F613F;
text-shadow: #FFDCA9 0 1px 0;
}
#help{
width: 100%;
height: 100%;
overflow: auto;
display: none;
@ -383,5 +357,36 @@ body{
}
.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: 529 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

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

@ -51,12 +51,7 @@
<div id="wgt_help"></div>
<div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
<div id="wgt_edit"></div>
</td>
<td class="b_top_right">&nbsp;</td>
</tr>
@ -66,7 +61,17 @@
<td>
<div id="help"></div>
<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>
</td>
<td class="b_center_right">&nbsp;</td>

@ -1,5 +1,5 @@
var sankoreLang = {
display: "Display",
display: "Close",
edit: "Edit",
short_desc: "Place the pictures in ascending order.",
add: "Add new block",
@ -10,7 +10,8 @@ var sankoreLang = {
pad: "Pad",
none: "None",
help: "Help",
help_content: "This is an example of help content ..."
help_content: "This is an example of help content ...",
theme: "Theme"
};
//main function
@ -22,9 +23,11 @@ function start(){
$("#wgt_reload").text(sankoreLang.reload);
$("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content);
$(".style_select option[value='1']").text(sankoreLang.slate);
$(".style_select option[value='2']").text(sankoreLang.pad);
$(".style_select option[value='3']").text(sankoreLang.none);
$("#style_select option[value='1']").text(sankoreLang.slate);
$("#style_select option[value='2']").text(sankoreLang.pad);
$("#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(sankore.preference("odr_des_imgs","")){
@ -47,11 +50,13 @@ function start(){
$("#wgt_help").click(function(){
var tmp = $(this);
if($(this).hasClass("open")){
$(this).removeClass("help_pad").removeClass("help_wood")
$("#help").slideUp("100", function(){
tmp.removeClass("open");
$("#data").show();
});
} else {
} else {
($("#style_select").val() == 1)?$(this).removeClass("help_pad").addClass("help_wood"):$(this).removeClass("help_wood").addClass("help_pad");
$("#data").hide();
$("#help").slideDown("100", function(){
tmp.addClass("open");
@ -72,7 +77,7 @@ function start(){
exportData();
});
$(".style_select").change(function (event){
$("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@ -83,7 +88,7 @@ function start(){
sankore.enableDropOnWidget(false);
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
$(".style_select").css("display","none");
$("#parameters").css("display","none");
$(".add_block").remove();
$(".cont").each(function(){
var container = $(this);
@ -130,7 +135,7 @@ function start(){
sankore.enableDropOnWidget(true);
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
$(".style_select").css("display","block");
$("#parameters").css("display","block");
$(".cont").each(function(){
var container = $(this);
@ -214,7 +219,7 @@ function exportData(){
}
$(".cont").each(function(){
var cont_obj = new Object();
cont_obj.style = $(".style_select").find("option:selected").val();
cont_obj.style = $("#style_select").find("option:selected").val();
cont_obj.text = $(this).find(".text_cont").text();
cont_obj.right = $(this).find(".imgs_cont>input").val();
cont_obj.imgs = [];
@ -231,7 +236,7 @@ function exportData(){
if($(".cont").size() == 0){
var cont_obj = new Object();
cont_obj.style = $(".style_select").find("option:selected").val();
cont_obj.style = $("#style_select").find("option:selected").val();
cont_obj.tmp = "clear";
array_to_export.push(cont_obj);
}
@ -254,12 +259,12 @@ function importData(data){
for(var i in data){
if(data[i].tmp){
changeStyle(data[i].style);
$(".style_select").val(data[i].style);
$("#style_select").val(data[i].style);
}
else {
if(i == 0){
changeStyle(data[i].style);
$(".style_select").val(data[i].style);
$("#style_select").val(data[i].style);
}
var tmp_array = [];
var container = $("<div class='cont'>");
@ -451,10 +456,10 @@ function changeStyle(val){
$("#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");
$("#wgt_display").addClass("display_wood");
$("#style_select").val(val);
$("body, html").removeClass("without_radius").addClass("radius_ft");
break;
case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back");
@ -468,10 +473,10 @@ function changeStyle(val){
$("#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");
$("#wgt_display").removeClass("display_wood");
$("#style_select").val(val);
$("body, html").removeClass("without_radius").removeClass("radius_ft");
break;
case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad");
@ -485,10 +490,10 @@ function changeStyle(val){
$("#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");
$("#wgt_display").removeClass("display_wood");
$("#style_select").val(val);
$("body, html").addClass("without_radius").removeClass("radius_ft");
break;
}
}

@ -25,12 +25,7 @@
<div id="wgt_help"></div>
<div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
<div id="wgt_edit"></div>
</td>
<td class="b_top_right">&nbsp;</td>
</tr>
@ -40,7 +35,17 @@
<td>
<div id="help"></div>
<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>
</td>
<td class="b_center_right">&nbsp;</td>

@ -1,6 +1,6 @@
var sankoreLang = {
display: "Afficher",
display: "Fermer",
edit: "Modifier",
short_desc: "Placez les images dans l'ordre croissant.",
add: "Nouveau bloc",
@ -12,28 +12,29 @@ var sankoreLang = {
none: "aucun",
help: "Aide",
help_content: "<p><h2>Ordonner des images</h2></p>"+
"<p><h3>Classer des images dans l’ordre demandé.</h3></p>"+
"<p><h3>Classer des images dans l’ordre demandé.</h3></p>"+
"<p>La consigne indique dans quel ordre les images doivent être classées. Le classement des images s’effectue par un glisser-déposer. Une fois que toutes les images sont correctement classées, la zone se colore en vert.</p>"+
"<p>La consigne indique dans quel ordre les images doivent être classées. Le classement des images s’effectue par un glisser-déposer. Une fois que toutes les images sont correctement classées, la zone se colore en vert.</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>"+
"<ul><li>de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut aucun),</li>"+
"<li>de modifier un exercice ou d’en créer de nouveaux dans la même activité.</li></ul>"+
"<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>"+
"<li>de modifier un exercice ou d’en créer de nouveaux dans la même activité.</li></ul>"+
"<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 votre consigne ici …”,</li>"+
"<li>insérez des images dans les zones de dépôt par glisser-déposer des images à partir de votre bibliothèque,</li>"+
"<li>modifiez éventuellement l’ordre des images par un glisser-déposer de l’image concernée pour la mettre au bon endroit dans la suite.</li></ul>"+
"<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 votre consigne ici …”,</li>"+
"<li>insérez des images dans les zones de dépôt par glisser-déposer des images à partir de votre bibliothèque,</li>"+
"<li>modifiez éventuellement l’ordre des images par un glisser-déposer de l’image concernée pour la mettre au bon endroit dans la suite.</li></ul>"+
"<p>Pour ajouter une zone image, cliquez sur le gros “+” en bas.</p>"+
"<p>Pour supprimer une zone image, cliquez sur la croix située dans le coin supérieur droit de l’image.</p>"+
"<p>Pour changer d’image, cliquez sur l’icône située au milieu à droite de l’image.</p>"+
"<p>Pour ajouter une zone image, cliquez sur le gros “+” en bas.</p>"+
"<p>Pour supprimer une zone image, cliquez sur la croix située dans le coin supérieur droit de l’image.</p>"+
"<p>Pour changer d’image, cliquez sur l’icône située au milieu à droite de l’image.</p>"+
"<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
@ -45,9 +46,11 @@ function start(){
$("#wgt_reload").text(sankoreLang.reload);
$("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content);
$(".style_select option[value='1']").text(sankoreLang.slate);
$(".style_select option[value='2']").text(sankoreLang.pad);
$(".style_select option[value='3']").text(sankoreLang.none);
$("#style_select option[value='1']").text(sankoreLang.slate);
$("#style_select option[value='2']").text(sankoreLang.pad);
$("#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(sankore.preference("odr_des_imgs","")){
@ -70,11 +73,13 @@ function start(){
$("#wgt_help").click(function(){
var tmp = $(this);
if($(this).hasClass("open")){
$(this).removeClass("help_pad").removeClass("help_wood")
$("#help").slideUp("100", function(){
tmp.removeClass("open");
$("#data").show();
});
} else {
} else {
($("#style_select").val() == 1)?$(this).removeClass("help_pad").addClass("help_wood"):$(this).removeClass("help_wood").addClass("help_pad");
$("#data").hide();
$("#help").slideDown("100", function(){
tmp.addClass("open");
@ -95,7 +100,7 @@ function start(){
exportData();
});
$(".style_select").change(function (event){
$("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@ -105,7 +110,7 @@ function start(){
sankore.enableDropOnWidget(false);
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
$(".style_select").css("display","none");
$("#parameters").css("display","none");
$(".add_block").remove();
$(".cont").each(function(){
var container = $(this);
@ -151,7 +156,7 @@ function start(){
sankore.enableDropOnWidget(true);
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
$(".style_select").css("display","block");
$("#parameters").css("display","block");
$(".cont").each(function(){
var container = $(this);
@ -235,7 +240,7 @@ function exportData(){
}
$(".cont").each(function(){
var cont_obj = new Object();
cont_obj.style = $(".style_select").find("option:selected").val();
cont_obj.style = $("#style_select").find("option:selected").val();
cont_obj.text = $(this).find(".text_cont").text();
cont_obj.right = $(this).find(".imgs_cont>input").val();
cont_obj.imgs = [];
@ -252,7 +257,7 @@ function exportData(){
if($(".cont").size() == 0){
var cont_obj = new Object();
cont_obj.style = $(".style_select").find("option:selected").val();
cont_obj.style = $("#style_select").find("option:selected").val();
cont_obj.tmp = "clear";
array_to_export.push(cont_obj);
}
@ -270,11 +275,11 @@ function importData(data){
for(var i in data){
if(data[i].tmp){
changeStyle(data[i].style);
$(".style_select").val(data[i].style);
$("#style_select").val(data[i].style);
}else{
if(i == 0){
changeStyle(data[i].style);
$(".style_select").val(data[i].style);
$("#style_select").val(data[i].style);
}
var tmp_array = [];
var container = $("<div class='cont'>");
@ -465,10 +470,10 @@ function changeStyle(val){
$("#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");
$("#wgt_display").addClass("display_wood");
$("#style_select").val(val);
$("body, html").removeClass("without_radius").addClass("radius_ft");
break;
case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back");
@ -482,10 +487,10 @@ function changeStyle(val){
$("#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");
$("#wgt_display").removeClass("display_wood");
$("#style_select").val(val);
$("body, html").removeClass("without_radius").removeClass("radius_ft");
break;
case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad");
@ -499,10 +504,10 @@ function changeStyle(val){
$("#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");
$("#wgt_display").removeClass("display_wood");
$("#style_select").val(val);
$("body, html").addClass("without_radius").removeClass("radius_ft");
break;
}
}

@ -25,12 +25,7 @@
<div id="wgt_help"></div>
<div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
<div id="wgt_edit"></div>
</td>
<td class="b_top_right">&nbsp;</td>
</tr>
@ -40,7 +35,17 @@
<td>
<div id="help"></div>
<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>
</td>
<td class="b_center_right">&nbsp;</td>

@ -1,6 +1,6 @@
var sankoreLang = {
display: "Показать",
display: "Закрыть",
edit: "Изменить",
short_desc: "Расположите картинки в порядке возрастания цифр.",
add: "Новый блок",
@ -11,7 +11,8 @@ var sankoreLang = {
pad: "Планшет",
none: "Нет",
help: "Помощь",
help_content: "Пример текста помощи ..."
help_content: "Пример текста помощи ...",
theme: "Тема"
};
//main function
@ -23,9 +24,11 @@ function start(){
$("#wgt_reload").text(sankoreLang.reload);
$("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content);
$(".style_select option[value='1']").text(sankoreLang.slate);
$(".style_select option[value='2']").text(sankoreLang.pad);
$(".style_select option[value='3']").text(sankoreLang.none);
$("#style_select option[value='1']").text(sankoreLang.slate);
$("#style_select option[value='2']").text(sankoreLang.pad);
$("#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(sankore.preference("odr_des_imgs","")){
@ -48,11 +51,13 @@ function start(){
$("#wgt_help").click(function(){
var tmp = $(this);
if($(this).hasClass("open")){
$(this).removeClass("help_pad").removeClass("help_wood")
$("#help").slideUp("100", function(){
tmp.removeClass("open");
$("#data").show();
});
} else {
} else {
($("#style_select").val() == 1)?$(this).removeClass("help_pad").addClass("help_wood"):$(this).removeClass("help_wood").addClass("help_pad");
$("#data").hide();
$("#help").slideDown("100", function(){
tmp.addClass("open");
@ -73,7 +78,7 @@ function start(){
exportData();
});
$(".style_select").change(function (event){
$("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@ -83,7 +88,7 @@ function start(){
sankore.enableDropOnWidget(false);
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
$(".style_select").css("display","none");
$("#parameters").css("display","none");
$(".add_block").remove();
$(".cont").each(function(){
var container = $(this);
@ -129,7 +134,7 @@ function start(){
sankore.enableDropOnWidget(true);
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
$(".style_select").css("display","block");
$("#parameters").css("display","block");
$(".cont").each(function(){
var container = $(this);
@ -213,7 +218,7 @@ function exportData(){
}
$(".cont").each(function(){
var cont_obj = new Object();
cont_obj.style = $(".style_select").find("option:selected").val();
cont_obj.style = $("#style_select").find("option:selected").val();
cont_obj.text = $(this).find(".text_cont").text();
cont_obj.right = $(this).find(".imgs_cont>input").val();
cont_obj.imgs = [];
@ -230,7 +235,7 @@ function exportData(){
if($(".cont").size() == 0){
var cont_obj = new Object();
cont_obj.style = $(".style_select").find("option:selected").val();
cont_obj.style = $("#style_select").find("option:selected").val();
cont_obj.tmp = "clear";
array_to_export.push(cont_obj);
}
@ -248,11 +253,11 @@ function importData(data){
for(var i in data){
if(data[i].tmp){
changeStyle(data[i].style);
$(".style_select").val(data[i].style);
$("#style_select").val(data[i].style);
}else{
if(i == 0){
changeStyle(data[i].style);
$(".style_select").val(data[i].style);
$("#style_select").val(data[i].style);
}
var tmp_array = [];
var container = $("<div class='cont'>");
@ -443,10 +448,10 @@ function changeStyle(val){
$("#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");
$("#wgt_display").addClass("display_wood");
$("#style_select").val(val);
$("body, html").removeClass("without_radius").addClass("radius_ft");
break;
case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back");
@ -460,10 +465,10 @@ function changeStyle(val){
$("#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");
$("#wgt_display").removeClass("display_wood");
$("#style_select").val(val);
$("body, html").removeClass("without_radius").removeClass("radius_ft");
break;
case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad");
@ -477,10 +482,10 @@ function changeStyle(val){
$("#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");
$("#wgt_display").removeClass("display_wood");
$("#style_select").val(val);
$("body, html").addClass("without_radius").removeClass("radius_ft");
break;
}
}
@ -518,7 +523,6 @@ function onDropTarget(obj, event) {
tmp_img.attr("height",h);
tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0");
}
exportData();
}, 6)
}
else {

Loading…
Cancel
Save