").attr("src", "");
@@ -762,10 +767,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");
@@ -779,10 +784,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");
@@ -796,10 +801,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;
}
}
@@ -850,7 +855,7 @@ function onDropAudio(obj, event) {
textData = stringToXML(textData);
var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent;
var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent;
- if(tmp_type.substr(0, 5) == "audio"){
+ if(tmp_type.substr(0, 5) == "audio"){
var audio_block = $(obj);
$(obj).find("audio").remove();
audio_block.find(":first-child").removeClass("stop").addClass("play");
diff --git a/resources/library/interactivities/Balance.wgt/js/help_fr-template.js b/resources/library/interactivities/Balance.wgt/js/help_fr-template.js
deleted file mode 100644
index c49c0759..00000000
--- a/resources/library/interactivities/Balance.wgt/js/help_fr-template.js
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/resources/library/interactivities/Cadran.wgt/js/help_fr-template.js b/resources/library/interactivities/Cadran.wgt/js/help_fr-template.js
deleted file mode 100644
index e7d800e0..00000000
--- a/resources/library/interactivities/Cadran.wgt/js/help_fr-template.js
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/resources/library/interactivities/Calcul.wgt/i18n/Messages_fr.properties b/resources/library/interactivities/Calcul.wgt/i18n/Messages_fr.properties
index f89c9066..a99defe0 100644
--- a/resources/library/interactivities/Calcul.wgt/i18n/Messages_fr.properties
+++ b/resources/library/interactivities/Calcul.wgt/i18n/Messages_fr.properties
@@ -1,7 +1,7 @@
fr.njin.i18n.document.title = Calcul rapide
fr.njin.i18n.toolbar.edit = Modifier
-fr.njin.i18n.toolbar.view = Editer
+fr.njin.i18n.toolbar.view = Afficher
fr.njin.i18n.toolbar.reload = Recharger
fr.njin.i18n.toolbar.help = Aide
diff --git a/resources/library/interactivities/Calcul.wgt/js/help_fr-template.js b/resources/library/interactivities/Calcul.wgt/js/help_fr-template.js
index b179daa3..e0a0d31e 100644
--- a/resources/library/interactivities/Calcul.wgt/js/help_fr-template.js
+++ b/resources/library/interactivities/Calcul.wgt/js/help_fr-template.js
@@ -1 +1,16 @@
-
L’interactivité permet d’additionner, de soustraire ou de multiplier des nombres. Le but est d’effectuer l’opération en inscrivant le résultat. Une fois la réponse saisie, le bouton “v” permet de vérifier la réponse. L’interactivité vérifie la réponse en passant l'opération en vert ou en rouge.
Une fois la série effectuée. L'interactivité affiche les calculs effectués.
Le bouton “Recharger” génère automatiquement de nouveaux calculs.
Le résultat des opérations n’est pas à inscrire dans le mode "Edition", il est calculé automatiquement par l‘interactivité.
diff --git a/resources/library/interactivities/Cat images.wgt/css/basic.css b/resources/library/interactivities/Cat images.wgt/css/basic.css
index 1fd13dc1..a808c635 100644
--- a/resources/library/interactivities/Cat images.wgt/css/basic.css
+++ b/resources/library/interactivities/Cat images.wgt/css/basic.css
@@ -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;
@@ -264,57 +256,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{
@@ -349,51 +324,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;
@@ -402,5 +376,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;
}
\ No newline at end of file
diff --git a/resources/library/interactivities/Cat images.wgt/img/ar_down.png b/resources/library/interactivities/Cat images.wgt/img/ar_down.png
deleted file mode 100644
index a20fab4f..00000000
Binary files a/resources/library/interactivities/Cat images.wgt/img/ar_down.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/ar_down_white.png b/resources/library/interactivities/Cat images.wgt/img/ar_down_white.png
deleted file mode 100644
index 4a1d133b..00000000
Binary files a/resources/library/interactivities/Cat images.wgt/img/ar_down_white.png and /dev/null differ
diff --git a/resources/library/interactivities/Memory.wgt/css/images/parameters-bg.png b/resources/library/interactivities/Cat images.wgt/img/parameters-bg.png
similarity index 100%
rename from resources/library/interactivities/Memory.wgt/css/images/parameters-bg.png
rename to resources/library/interactivities/Cat images.wgt/img/parameters-bg.png
diff --git a/resources/library/interactivities/Cat images.wgt/img/slate-display.png b/resources/library/interactivities/Cat images.wgt/img/slate-display.png
deleted file mode 100644
index 96166143..00000000
Binary files a/resources/library/interactivities/Cat images.wgt/img/slate-display.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/slate-edit.png b/resources/library/interactivities/Cat images.wgt/img/slate-edit.png
deleted file mode 100644
index 17f5fc5c..00000000
Binary files a/resources/library/interactivities/Cat images.wgt/img/slate-edit.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/slate-help-white.png b/resources/library/interactivities/Cat images.wgt/img/slate-help-white.png
deleted file mode 100644
index 7b5ebfd8..00000000
Binary files a/resources/library/interactivities/Cat images.wgt/img/slate-help-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/slate-help.png b/resources/library/interactivities/Cat images.wgt/img/slate-help.png
deleted file mode 100644
index 069052d0..00000000
Binary files a/resources/library/interactivities/Cat images.wgt/img/slate-help.png and /dev/null differ
diff --git a/resources/library/interactivities/Memory.wgt/css/images/slate-toolbar-help.png b/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-help.png
similarity index 100%
rename from resources/library/interactivities/Memory.wgt/css/images/slate-toolbar-help.png
rename to resources/library/interactivities/Cat images.wgt/img/slate-toolbar-help.png
diff --git a/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-reload-white.png b/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-reload-white.png
deleted file mode 100644
index 78d146ec..00000000
Binary files a/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-reload-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-reload.png b/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-reload.png
index 685a5cb2..844169a9 100644
Binary files a/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-reload.png and b/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-reload.png differ
diff --git a/resources/library/interactivities/Memory.wgt/css/images/toolbar-edit.png b/resources/library/interactivities/Cat images.wgt/img/toolbar-edit.png
similarity index 100%
rename from resources/library/interactivities/Memory.wgt/css/images/toolbar-edit.png
rename to resources/library/interactivities/Cat images.wgt/img/toolbar-edit.png
diff --git a/resources/library/interactivities/Memory.wgt/css/images/toolbar-help.png b/resources/library/interactivities/Cat images.wgt/img/toolbar-help.png
similarity index 100%
rename from resources/library/interactivities/Memory.wgt/css/images/toolbar-help.png
rename to resources/library/interactivities/Cat images.wgt/img/toolbar-help.png
diff --git a/resources/library/interactivities/Memory.wgt/css/images/toolbar-reload.png b/resources/library/interactivities/Cat images.wgt/img/toolbar-reload.png
similarity index 100%
rename from resources/library/interactivities/Memory.wgt/css/images/toolbar-reload.png
rename to resources/library/interactivities/Cat images.wgt/img/toolbar-reload.png
diff --git a/resources/library/interactivities/Cat images.wgt/index.html b/resources/library/interactivities/Cat images.wgt/index.html
index 688bb52f..ba84f225 100644
--- a/resources/library/interactivities/Cat images.wgt/index.html
+++ b/resources/library/interactivities/Cat images.wgt/index.html
@@ -51,12 +51,7 @@
diff --git a/resources/library/interactivities/Cat images.wgt/js/script.js b/resources/library/interactivities/Cat images.wgt/js/script.js
index 441c3ea1..cf2f6d0c 100644
--- a/resources/library/interactivities/Cat images.wgt/js/script.js
+++ b/resources/library/interactivities/Cat images.wgt/js/script.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- display: "Display",
+ display: "Close",
edit: "Edit",
first_desc: "Odd numbers",
second_desc: "Even numbers",
@@ -11,7 +11,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
@@ -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("categoriser_images","")){
@@ -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());
})
@@ -81,7 +86,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
- $(".style_select").css("display","none");
+ $("#parameters").css("display","none");
if(window.sankore)
sankore.enableDropOnWidget(false);
$(".add_block").remove();
@@ -112,7 +117,7 @@ function start(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -152,7 +157,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
if(window.sankore)
sankore.enableDropOnWidget(true);
$(".cont").each(function(){
@@ -234,7 +239,7 @@ function exportData(){
if($("#wgt_edit").hasClass("selected")){
$(".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.mode = "edit";
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
@@ -258,7 +263,7 @@ function exportData(){
} else {
$(".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.mode = "display";
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
@@ -292,7 +297,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);
}
@@ -307,11 +312,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);
}
if(data[i].mode == "edit"){
var tmp_array = [];
@@ -341,7 +346,7 @@ function importData(data){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -413,12 +418,11 @@ function importData(data){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
- });
- checkCorrectness(imgs_container);
+ });
}
all_imgs = $("
").appendTo(container);
@@ -458,6 +462,7 @@ function importData(data){
}
});
container.appendTo("#data");
+ checkCorrectness(all_imgs);
}
}
}
@@ -520,7 +525,7 @@ function showExample(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -531,7 +536,7 @@ function showExample(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -561,9 +566,9 @@ function addCategory(obj){
$("
").appendTo(imgs_container);
$("
").appendTo(imgs_container);
imgs_container.attr("ondragenter", "return false;")
- .attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;")
- .attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;")
- .attr("ondrop", "$(this).css(\"background-color\",\"\"); return onDropTarget(this,event);");
+ .attr("ondragleave", "$(this).css(\"background-color\",\"#e6f6ff\"); return false;")
+ .attr("ondragover", "$(this).css(\"background-color\",\"#c3e9ff\"); return false;")
+ .attr("ondrop", "$(this).css(\"background-color\",\"#e6f6ff\"); return onDropTarget(this,event);");
}
//add new container
@@ -625,10 +630,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");
@@ -642,10 +647,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");
@@ -659,10 +664,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;
}
}
@@ -686,8 +691,7 @@ function returnId(){
}
//a func for checking when smth will drop
-function checkOnDrop(dest, source){
- dest.append(source);
+function checkOnDrop(dest){
var tmp_count = dest.find("input[name='count']").val();
var tmp_mask = dest.find("input[name='mask']").val();
if(dest.find(".img_block").size() == tmp_count){
@@ -697,47 +701,35 @@ function checkOnDrop(dest, source){
tmp_right = false;
});
if(tmp_right)
- dest.removeClass("def_cont")
- .removeClass("red_cont")
- .addClass("green_cont");
+ dest.removeClass("def_cont").removeClass("red_cont").addClass("green_cont");
else
- dest.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont");
} else
- dest.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont");
}
//checking source on correctness
function checkCorrectness(source){
if(!source.hasClass("all_imgs")){
- var tmp_count = source.find("input[name='count']").val();
- var tmp_mask = source.find("input[name='mask']").val();
- if(source.find(".img_block").size() == tmp_count){
- var tmp_right = true;
- source.find(".img_block").each(function(){
- if($(this).find("input").val() != tmp_mask)
- tmp_right = false;
- });
-
- if(tmp_right)
- source.removeClass("def_cont")
- .removeClass("red_cont")
- .addClass("green_cont");
- else
- source.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
- } else if(source.find(".img_block").size() == 0)
- source.addClass("def_cont")
- .removeClass("green_cont")
- .removeClass("red_cont");
- else
- source.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ if(source.parent().find(".all_imgs").find(".img_block").size() == 0){
+ source.parent().find(".imgs_cont").each(function(){
+ checkOnDrop($(this))
+ })
+ } else {
+ source.parent().find(".imgs_cont").each(function(){
+ $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont");
+ })
+ }
+ } else {
+ if(source.find(".img_block").size() > 0){
+ source.parent().find(".imgs_cont").each(function(){
+ $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont");
+ })
+ } else {
+ source.parent().find(".imgs_cont").each(function(){
+ checkOnDrop($(this))
+ })
+ }
}
}
diff --git a/resources/library/interactivities/Cat images.wgt/locales/fr/index.html b/resources/library/interactivities/Cat images.wgt/locales/fr/index.html
index 7d188794..d8c5b635 100644
--- a/resources/library/interactivities/Cat images.wgt/locales/fr/index.html
+++ b/resources/library/interactivities/Cat images.wgt/locales/fr/index.html
@@ -25,12 +25,7 @@
-
-
-
-
-
-
+
@@ -40,7 +35,17 @@
diff --git a/resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js b/resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js
index 4b2ff920..5b20fcd1 100644
--- a/resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js
+++ b/resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- display: "Afficher",
+ display: "Fermer",
edit: "Modifier",
first_desc: "Les nombres impairs",
second_desc: "Les nombres pairs",
@@ -10,8 +10,28 @@ var sankoreLang = {
slate: "ardoise",
pad: "tablette",
none: "aucun",
- help: "aide",
- help_content: "Ceci est un exemple de contenu de l'aide ..."
+ help: "Aide",
+ help_content: "
Catégoriser des images "+
+ "
Classer des images en fonction de la dénomination de la catégorie. "+
+
+ "
L’activité s’effectue par un glisser-déposer de l’image dans la catégorie correspondante. Tant que toutes les images d’une catégorie ne sont pas classées, la zone reste rouge. Une fois que toutes les images sont classées dans la bonne catégorie, la zone se colore en vert.
"+
+ "
Le bouton “Recharger” réinitialise les exercices.
"+
+
+ "
Le bouton “Modifier” vous permet :
"+
+ "
de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut aucun) , "+
+ "de modifier un exercice ou d’en créer de nouveaux dans la même activité. "+
+
+ "
En mode édition, pour créer un nouvel exercice, cliquez sur “Nouveau bloc” en bas, une zone bleue apparaît, c’est une catégorie, puis
"+
+ "
insérez le nom de la catégorie (par exemple “fruits”, “légumes”, “mammifères”...) en cliquant dans le champ de texte “Saisir le nom de la catégorie ici …”, "+
+ "insérez des images dans la catégorie par glisser-déposer des images à partir de votre bibliothèque, "+
+ "ajoutez ensuite une catégorie (ou plusieurs) en cliquant sur le signe “+” situé à droite de la catégorie, complétez par son nom et ajoutez des images. "+
+ "
Pour supprimer une image, cliquez sur la croix située dans le coin supérieur droit de l’image.
"+
+ "
Pour supprimer une catégorie, cliquez sur le signe “-” situé à droite de celle-ci.
"+
+
+ "
Pour supprimer un exercice, cliquez sur la croix à gauche du numéro de l’exercice.
"+
+
+ "
Le bouton “Afficher” vous permet d’utiliser l’activité.
",
+ theme: "Thème"
};
//main function
@@ -23,9 +43,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("categoriser_images","")){
@@ -47,11 +69,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 +96,7 @@ function start(){
exportData();
});
- $(".style_select").change(function (event){
+ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@@ -81,7 +105,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
- $(".style_select").css("display","none");
+ $("#parameters").css("display","none");
sankore.enableDropOnWidget(false);
$(".add_block").remove();
$(".cont").each(function(){
@@ -111,7 +135,7 @@ function start(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -151,7 +175,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
sankore.enableDropOnWidget(true);
$(".cont").each(function(){
var container = $(this);
@@ -232,7 +256,7 @@ function exportData(){
if($("#wgt_edit").hasClass("selected")){
$(".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.mode = "edit";
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
@@ -256,7 +280,7 @@ function exportData(){
} else {
$(".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.mode = "display";
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
@@ -290,7 +314,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);
}
@@ -305,11 +329,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);
}
if(data[i].mode == "edit"){
var tmp_array = [];
@@ -339,7 +363,7 @@ function importData(data){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -411,7 +435,7 @@ function importData(data){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -456,6 +480,7 @@ function importData(data){
}
});
container.appendTo("#data");
+ checkCorrectness(all_imgs);
}
}
}
@@ -518,7 +543,7 @@ function showExample(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -529,7 +554,7 @@ function showExample(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -559,9 +584,9 @@ function addCategory(obj){
$("
").appendTo(imgs_container);
$("
").appendTo(imgs_container);
imgs_container.attr("ondragenter", "return false;")
- .attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;")
- .attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;")
- .attr("ondrop", "$(this).css(\"background-color\",\"\"); return onDropTarget(this,event);");
+ .attr("ondragleave", "$(this).css(\"background-color\",\"#e6f6ff\"); return false;")
+ .attr("ondragover", "$(this).css(\"background-color\",\"#c3e9ff\"); return false;")
+ .attr("ondrop", "$(this).css(\"background-color\",\"#e6f6ff\"); return onDropTarget(this,event);");
}
//add new container
@@ -580,9 +605,9 @@ function addContainer(){
$("
").appendTo(imgs_container);
$("
").appendTo(imgs_container);
imgs_container.attr("ondragenter", "return false;")
- .attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;")
- .attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;")
- .attr("ondrop", "$(this).css(\"background-color\",\"\"); return onDropTarget(this,event);");
+ .attr("ondragleave", "$(this).css(\"background-color\",\"#e6f6ff\"); return false;")
+ .attr("ondragover", "$(this).css(\"background-color\",\"#c3e9ff\"); return false;")
+ .attr("ondrop", "$(this).css(\"background-color\",\"#e6f6ff\"); return onDropTarget(this,event);");
container.insertBefore($(".add_block"));
}
@@ -636,10 +661,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");
@@ -653,10 +678,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");
@@ -670,10 +695,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;
}
}
@@ -685,8 +710,7 @@ function returnId(){
}
//a func for checking when smth will drop
-function checkOnDrop(dest, source){
- dest.append(source);
+function checkOnDrop(dest){
var tmp_count = dest.find("input[name='count']").val();
var tmp_mask = dest.find("input[name='mask']").val();
if(dest.find(".img_block").size() == tmp_count){
@@ -696,47 +720,35 @@ function checkOnDrop(dest, source){
tmp_right = false;
});
if(tmp_right)
- dest.removeClass("def_cont")
- .removeClass("red_cont")
- .addClass("green_cont");
+ dest.removeClass("def_cont").removeClass("red_cont").addClass("green_cont");
else
- dest.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont");
} else
- dest.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont");
}
//checking source on correctness
function checkCorrectness(source){
if(!source.hasClass("all_imgs")){
- var tmp_count = source.find("input[name='count']").val();
- var tmp_mask = source.find("input[name='mask']").val();
- if(source.find(".img_block").size() == tmp_count){
- var tmp_right = true;
- source.find(".img_block").each(function(){
- if($(this).find("input").val() != tmp_mask)
- tmp_right = false;
- });
-
- if(tmp_right)
- source.removeClass("def_cont")
- .removeClass("red_cont")
- .addClass("green_cont");
- else
- source.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
- } else if(source.find(".img_block").size() == 0)
- source.addClass("def_cont")
- .removeClass("green_cont")
- .removeClass("red_cont");
- else
- source.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ if(source.parent().find(".all_imgs").find(".img_block").size() == 0){
+ source.parent().find(".imgs_cont").each(function(){
+ checkOnDrop($(this))
+ })
+ } else {
+ source.parent().find(".imgs_cont").each(function(){
+ $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont");
+ })
+ }
+ } else {
+ if(source.find(".img_block").size() > 0){
+ source.parent().find(".imgs_cont").each(function(){
+ $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont");
+ })
+ } else {
+ source.parent().find(".imgs_cont").each(function(){
+ checkOnDrop($(this))
+ })
+ }
}
}
diff --git a/resources/library/interactivities/Cat images.wgt/locales/ru/index.html b/resources/library/interactivities/Cat images.wgt/locales/ru/index.html
index 10f242f8..66f8ca12 100644
--- a/resources/library/interactivities/Cat images.wgt/locales/ru/index.html
+++ b/resources/library/interactivities/Cat images.wgt/locales/ru/index.html
@@ -26,11 +26,6 @@
-
-
-
-
-
@@ -40,7 +35,17 @@
diff --git a/resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js b/resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js
index 367e5630..06844011 100644
--- a/resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js
+++ b/resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- display: "Показать",
+ display: "Закрыть",
edit: "Изменить",
first_desc: "Нечетные числа",
second_desc: "Четные числа",
@@ -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("categoriser_images","")){
@@ -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());
})
@@ -81,7 +86,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
- $(".style_select").css("display","none");
+ $("#parameters").css("display","none");
sankore.enableDropOnWidget(false);
$(".add_block").remove();
$(".cont").each(function(){
@@ -111,7 +116,7 @@ function start(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -151,7 +156,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
sankore.enableDropOnWidget(true);
$(".cont").each(function(){
var container = $(this);
@@ -232,7 +237,7 @@ function exportData(){
if($("#wgt_edit").hasClass("selected")){
$(".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.mode = "edit";
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
@@ -244,8 +249,7 @@ function exportData(){
$(this).find(".img_block").each(function(){
var img_obj = new Object();
img_obj.value = $(this).find("input").val();
- img_obj.link = $(this).find("img").attr("src").replace("../../","");
- ;
+ img_obj.link = $(this).find("img").attr("src").replace("../../","");
img_obj.ht = $(this).find("img").height();
img_obj.wd = $(this).find("img").width();
img_cont.imgs.push(img_obj);
@@ -257,7 +261,7 @@ function exportData(){
} else {
$(".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.mode = "display";
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
@@ -269,8 +273,7 @@ function exportData(){
$(this).find(".img_block").each(function(){
var img_obj = new Object();
img_obj.value = $(this).find("input").val();
- img_obj.link = $(this).find("img").attr("src").replace("../../","");
- ;
+ img_obj.link = $(this).find("img").attr("src").replace("../../","");
img_obj.ht = $(this).find("img").height();
img_obj.wd = $(this).find("img").width();
img_cont.imgs.push(img_obj);
@@ -281,8 +284,7 @@ function exportData(){
$(this).find(".all_imgs .img_block").each(function(){
var img = new Object();
img.value = $(this).find("input").val();
- img.link = $(this).find("img").attr("src").replace("../../","");
- ;
+ img.link = $(this).find("img").attr("src").replace("../../","");
img.ht = $(this).find("img").height();
img.wd = $(this).find("img").width();
cont_obj.all_imgs.push(img);
@@ -293,7 +295,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);
}
@@ -308,11 +310,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);
}
if(data[i].mode == "edit"){
var tmp_array = [];
@@ -342,7 +344,7 @@ function importData(data){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -414,7 +416,7 @@ function importData(data){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -459,6 +461,7 @@ function importData(data){
}
});
container.appendTo("#data");
+ checkCorrectness(all_imgs);
}
}
}
@@ -521,7 +524,7 @@ function showExample(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -532,7 +535,7 @@ function showExample(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -562,9 +565,9 @@ function addCategory(obj){
$("
").appendTo(imgs_container);
$("
").appendTo(imgs_container);
imgs_container.attr("ondragenter", "return false;")
- .attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;")
- .attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;")
- .attr("ondrop", "$(this).css(\"background-color\",\"\"); return onDropTarget(this,event);");
+ .attr("ondragleave", "$(this).css(\"background-color\",\"#e6f6ff\"); return false;")
+ .attr("ondragover", "$(this).css(\"background-color\",\"#c3e9ff\"); return false;")
+ .attr("ondrop", "$(this).css(\"background-color\",\"#e6f6ff\"); return onDropTarget(this,event);");
}
//add new container
@@ -583,9 +586,9 @@ function addContainer(){
$("
").appendTo(imgs_container);
$("
").appendTo(imgs_container);
imgs_container.attr("ondragenter", "return false;")
- .attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;")
- .attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;")
- .attr("ondrop", "$(this).css(\"background-color\",\"\"); return onDropTarget(this,event);");
+ .attr("ondragleave", "$(this).css(\"background-color\",\"#e6f6ff\"); return false;")
+ .attr("ondragover", "$(this).css(\"background-color\",\"#c3e9ff\"); return false;")
+ .attr("ondrop", "$(this).css(\"background-color\",\"#e6f6ff\"); return onDropTarget(this,event);");
container.insertBefore($(".add_block"));
}
@@ -639,10 +642,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");
@@ -656,10 +659,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");
@@ -673,10 +676,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;
}
}
@@ -688,8 +691,7 @@ function returnId(){
}
//a func for checking when smth will drop
-function checkOnDrop(dest, source){
- dest.append(source);
+function checkOnDrop(dest){
var tmp_count = dest.find("input[name='count']").val();
var tmp_mask = dest.find("input[name='mask']").val();
if(dest.find(".img_block").size() == tmp_count){
@@ -699,47 +701,35 @@ function checkOnDrop(dest, source){
tmp_right = false;
});
if(tmp_right)
- dest.removeClass("def_cont")
- .removeClass("red_cont")
- .addClass("green_cont");
+ dest.removeClass("def_cont").removeClass("red_cont").addClass("green_cont");
else
- dest.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont");
} else
- dest.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont");
}
//checking source on correctness
function checkCorrectness(source){
if(!source.hasClass("all_imgs")){
- var tmp_count = source.find("input[name='count']").val();
- var tmp_mask = source.find("input[name='mask']").val();
- if(source.find(".img_block").size() == tmp_count){
- var tmp_right = true;
- source.find(".img_block").each(function(){
- if($(this).find("input").val() != tmp_mask)
- tmp_right = false;
- });
-
- if(tmp_right)
- source.removeClass("def_cont")
- .removeClass("red_cont")
- .addClass("green_cont");
- else
- source.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
- } else if(source.find(".img_block").size() == 0)
- source.addClass("def_cont")
- .removeClass("green_cont")
- .removeClass("red_cont");
- else
- source.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ if(source.parent().find(".all_imgs").find(".img_block").size() == 0){
+ source.parent().find(".imgs_cont").each(function(){
+ checkOnDrop($(this))
+ })
+ } else {
+ source.parent().find(".imgs_cont").each(function(){
+ $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont");
+ })
+ }
+ } else {
+ if(source.find(".img_block").size() > 0){
+ source.parent().find(".imgs_cont").each(function(){
+ $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont");
+ })
+ } else {
+ source.parent().find(".imgs_cont").each(function(){
+ checkOnDrop($(this))
+ })
+ }
}
}
diff --git a/resources/library/interactivities/Cat text.wgt/css/basic.css b/resources/library/interactivities/Cat text.wgt/css/basic.css
index e73ae42c..849093d5 100644
--- a/resources/library/interactivities/Cat text.wgt/css/basic.css
+++ b/resources/library/interactivities/Cat text.wgt/css/basic.css
@@ -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;
@@ -286,57 +278,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{
@@ -371,51 +346,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;
@@ -424,5 +398,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;
}
\ No newline at end of file
diff --git a/resources/library/interactivities/Cat text.wgt/img/ar_down.png b/resources/library/interactivities/Cat text.wgt/img/ar_down.png
deleted file mode 100644
index a20fab4f..00000000
Binary files a/resources/library/interactivities/Cat text.wgt/img/ar_down.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat text.wgt/img/ar_down_white.png b/resources/library/interactivities/Cat text.wgt/img/ar_down_white.png
deleted file mode 100644
index 4a1d133b..00000000
Binary files a/resources/library/interactivities/Cat text.wgt/img/ar_down_white.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat text.wgt/img/green_point.png b/resources/library/interactivities/Cat text.wgt/img/green_point.png
deleted file mode 100644
index a2a44680..00000000
Binary files a/resources/library/interactivities/Cat text.wgt/img/green_point.png and /dev/null differ
diff --git a/resources/library/interactivities/Morpion.wgt/css/images/parameters-bg.png b/resources/library/interactivities/Cat text.wgt/img/parameters-bg.png
similarity index 100%
rename from resources/library/interactivities/Morpion.wgt/css/images/parameters-bg.png
rename to resources/library/interactivities/Cat text.wgt/img/parameters-bg.png
diff --git a/resources/library/interactivities/Cat text.wgt/img/red_point.png b/resources/library/interactivities/Cat text.wgt/img/red_point.png
deleted file mode 100644
index f6daa19a..00000000
Binary files a/resources/library/interactivities/Cat text.wgt/img/red_point.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat text.wgt/img/slate-display.png b/resources/library/interactivities/Cat text.wgt/img/slate-display.png
deleted file mode 100644
index 96166143..00000000
Binary files a/resources/library/interactivities/Cat text.wgt/img/slate-display.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat text.wgt/img/slate-edit.png b/resources/library/interactivities/Cat text.wgt/img/slate-edit.png
deleted file mode 100644
index 17f5fc5c..00000000
Binary files a/resources/library/interactivities/Cat text.wgt/img/slate-edit.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat text.wgt/img/slate-help-white.png b/resources/library/interactivities/Cat text.wgt/img/slate-help-white.png
deleted file mode 100644
index 7b5ebfd8..00000000
Binary files a/resources/library/interactivities/Cat text.wgt/img/slate-help-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat text.wgt/img/slate-help.png b/resources/library/interactivities/Cat text.wgt/img/slate-help.png
deleted file mode 100644
index 069052d0..00000000
Binary files a/resources/library/interactivities/Cat text.wgt/img/slate-help.png and /dev/null differ
diff --git a/resources/library/interactivities/Morpion.wgt/css/images/slate-toolbar-help.png b/resources/library/interactivities/Cat text.wgt/img/slate-toolbar-help.png
similarity index 100%
rename from resources/library/interactivities/Morpion.wgt/css/images/slate-toolbar-help.png
rename to resources/library/interactivities/Cat text.wgt/img/slate-toolbar-help.png
diff --git a/resources/library/interactivities/Cat text.wgt/img/slate-toolbar-reload-white.png b/resources/library/interactivities/Cat text.wgt/img/slate-toolbar-reload-white.png
deleted file mode 100644
index 78d146ec..00000000
Binary files a/resources/library/interactivities/Cat text.wgt/img/slate-toolbar-reload-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat text.wgt/img/slate-toolbar-reload.png b/resources/library/interactivities/Cat text.wgt/img/slate-toolbar-reload.png
index 685a5cb2..844169a9 100644
Binary files a/resources/library/interactivities/Cat text.wgt/img/slate-toolbar-reload.png and b/resources/library/interactivities/Cat text.wgt/img/slate-toolbar-reload.png differ
diff --git a/resources/library/interactivities/Morpion.wgt/css/images/toolbar-edit.png b/resources/library/interactivities/Cat text.wgt/img/toolbar-edit.png
similarity index 100%
rename from resources/library/interactivities/Morpion.wgt/css/images/toolbar-edit.png
rename to resources/library/interactivities/Cat text.wgt/img/toolbar-edit.png
diff --git a/resources/library/interactivities/Morpion.wgt/css/images/toolbar-help.png b/resources/library/interactivities/Cat text.wgt/img/toolbar-help.png
similarity index 100%
rename from resources/library/interactivities/Morpion.wgt/css/images/toolbar-help.png
rename to resources/library/interactivities/Cat text.wgt/img/toolbar-help.png
diff --git a/resources/library/interactivities/Morpion.wgt/css/images/toolbar-reload.png b/resources/library/interactivities/Cat text.wgt/img/toolbar-reload.png
similarity index 100%
rename from resources/library/interactivities/Morpion.wgt/css/images/toolbar-reload.png
rename to resources/library/interactivities/Cat text.wgt/img/toolbar-reload.png
diff --git a/resources/library/interactivities/Cat text.wgt/index.html b/resources/library/interactivities/Cat text.wgt/index.html
index 688bb52f..9dddb48e 100644
--- a/resources/library/interactivities/Cat text.wgt/index.html
+++ b/resources/library/interactivities/Cat text.wgt/index.html
@@ -16,6 +16,7 @@
lang = sankore.locale().substr(0,2);
} else
lang = "en";
+ lang = "fr";
if(lang == "en"){
if(window.sankore)
sankore.enableDropOnWidget(false);
@@ -51,12 +52,7 @@
-
-
-
-
-
-
+
@@ -66,7 +62,17 @@
diff --git a/resources/library/interactivities/Cat text.wgt/js/script.js b/resources/library/interactivities/Cat text.wgt/js/script.js
index 12653ac4..a53fc178 100644
--- a/resources/library/interactivities/Cat text.wgt/js/script.js
+++ b/resources/library/interactivities/Cat text.wgt/js/script.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- display: "Display",
+ display: "Close",
edit: "Edit",
first_desc: "Fruits",
second_desc: "Vegetables",
@@ -17,7 +17,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
@@ -29,9 +30,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("categoriser_text","")){
@@ -53,11 +56,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");
@@ -78,7 +83,7 @@ function start(){
exportData();
});
- $(".style_select").change(function (event){
+ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@@ -87,7 +92,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(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);
@@ -120,7 +125,7 @@ function start(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -160,7 +165,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
$(".cont").each(function(){
var container = $(this);
@@ -244,7 +249,7 @@ function exportData(){
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
var img_cont = new Object();
- cont_obj.style = $(".style_select").find("option:selected").val();
+ cont_obj.style = $("#style_select").find("option:selected").val();
img_cont.mask = $(this).find("input[name='mask']").val();
img_cont.count = $(this).find(".img_block").size();
img_cont.text = $(this).find(".cat_desc").val();
@@ -266,7 +271,7 @@ function exportData(){
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
var img_cont = new Object();
- cont_obj.style = $(".style_select").find("option:selected").val();
+ cont_obj.style = $("#style_select").find("option:selected").val();
img_cont.mask = $(this).find("input[name='mask']").val();
img_cont.count = $(this).find("input[name='count']").val();
img_cont.text = $(this).find(".cat_desc").val();
@@ -292,7 +297,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);
}
@@ -307,12 +312,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);
}
if(data[i].mode == "edit"){
var tmp_array = [];
@@ -339,7 +344,7 @@ function importData(data){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -410,12 +415,11 @@ function importData(data){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
- });
- checkCorrectness(imgs_container);
+ });
}
all_imgs = $("
").appendTo(container);
@@ -452,7 +456,8 @@ function importData(data){
}
}
}
- });
+ });
+ checkCorrectness(all_imgs);
}
}
}
@@ -516,7 +521,7 @@ function showExample(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -527,7 +532,7 @@ function showExample(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -642,10 +647,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");
@@ -659,10 +664,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");
@@ -676,17 +681,16 @@ 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;
}
}
//a func for checking when smth will drop
-function checkOnDrop(dest, source){
- dest.append(source);
+function checkOnDrop(dest){
var tmp_count = dest.find("input[name='count']").val();
var tmp_mask = dest.find("input[name='mask']").val();
if(dest.find(".img_block").size() == tmp_count){
@@ -696,46 +700,34 @@ function checkOnDrop(dest, source){
tmp_right = false;
});
if(tmp_right)
- dest.removeClass("def_cont")
- .removeClass("red_cont")
- .addClass("green_cont");
+ dest.removeClass("def_cont").removeClass("red_cont").addClass("green_cont");
else
- dest.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont");
} else
- dest.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont");
}
//checking source on correctness
function checkCorrectness(source){
if(!source.hasClass("all_imgs")){
- var tmp_count = source.find("input[name='count']").val();
- var tmp_mask = source.find("input[name='mask']").val();
- if(source.find(".img_block").size() == tmp_count){
- var tmp_right = true;
- source.find(".img_block").each(function(){
- if($(this).find("input").val() != tmp_mask)
- tmp_right = false;
- });
-
- if(tmp_right)
- source.removeClass("def_cont")
- .removeClass("red_cont")
- .addClass("green_cont");
- else
- source.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
- } else if(source.find(".img_block").size() == 0)
- source.addClass("def_cont")
- .removeClass("green_cont")
- .removeClass("red_cont");
- else
- source.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ if(source.parent().find(".all_imgs").find(".img_block").size() == 0){
+ source.parent().find(".imgs_cont").each(function(){
+ checkOnDrop($(this))
+ })
+ } else {
+ source.parent().find(".imgs_cont").each(function(){
+ $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont");
+ })
+ }
+ } else {
+ if(source.find(".img_block").size() > 0){
+ source.parent().find(".imgs_cont").each(function(){
+ $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont");
+ })
+ } else {
+ source.parent().find(".imgs_cont").each(function(){
+ checkOnDrop($(this))
+ })
+ }
}
}
diff --git a/resources/library/interactivities/Cat text.wgt/locales/fr/index.html b/resources/library/interactivities/Cat text.wgt/locales/fr/index.html
index 3636c4ab..d8651420 100644
--- a/resources/library/interactivities/Cat text.wgt/locales/fr/index.html
+++ b/resources/library/interactivities/Cat text.wgt/locales/fr/index.html
@@ -25,12 +25,7 @@
-
-
-
-
-
-
+
@@ -40,7 +35,17 @@
diff --git a/resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js b/resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js
index 2170c2f4..90cbd71c 100644
--- a/resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js
+++ b/resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- display: "Afficher",
+ display: "Fermer",
edit: "Modifier",
first_desc: "Fruits",
second_desc: "Légumes",
@@ -16,8 +16,30 @@ var sankoreLang = {
slate: "ardoise",
pad: "tablette",
none: "aucun",
- help: "aide",
- help_content: "Ceci est un exemple de contenu de l'aide ..."
+ help: "Aide",
+ help_content: "
Catégoriser des textes "+
+ "
Classer des étiquettes de mots en fonction de la dénomination de la catégorie. "+
+
+ "
L’activité s’effectue par un glisser-déposer de l’étiquette de mots dans la catégorie correspondante. Tant que toutes les étiquettes de mots ne sont pas classées, la zone reste rouge. Une fois que toutes les étiquettes de mots sont classées dans la bonne catégorie, la zone se colore en vert.
"+
+
+ "
Le bouton “Recharger” réinitialise les exercices.
"+
+
+ "
Le bouton “Modifier” vous permet :
"+
+ "
de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut aucun), "+
+ "de modifier un exercice ou d’en créer de nouveaux dans la même activité. "+
+
+ "
En mode édition, pour créer un nouvel exercice, cliquez sur “Nouveau bloc” en bas, une zone bleue apparaît, c’est une catégorie, puis.
"+
+ "
insérez le nom de la catégorie (par exemple “fruits”, “légumes”, “mammifères”...) en cliquant dans le champ de texte “Saisir le nom de la catégorie ici …”, "+
+ "cliquez sur le gros “+” situé à gauche de la catégorie ce qui vous permet de rajouter des étiquettes de mots, "+
+ "entrez des mots dans ces étiquettes, "+
+ "ajoutez ensuite une catégorie (ou plusieurs) en cliquant sur le signe “+” situé à droite de la catégorie, complétez par son nom et ajoutez des étiquettes de mots. "+
+ "
Pour supprimer une étiquette de mots, cliquez sur la croix située dans le coin supérieur droit de celle-ci.
"+
+ "
Pour supprimer une catégorie, cliquez sur le signe “-” situé à droite de celle-ci.
"+
+
+ "
Pour supprimer un exercice, cliquez sur la croix à gauche du numéro de l’exercice.
"+
+
+ "
Le bouton “Afficher” vous permet d’utiliser l’activité.
",
+ theme: "Thème"
};
//main function
@@ -29,9 +51,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("categoriser_text","")){
@@ -53,11 +77,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");
@@ -78,7 +104,7 @@ function start(){
exportData();
});
- $(".style_select").change(function (event){
+ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@@ -87,7 +113,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(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);
@@ -120,7 +146,7 @@ function start(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -160,7 +186,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
$(".cont").each(function(){
var container = $(this);
@@ -244,7 +270,7 @@ function exportData(){
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
var img_cont = new Object();
- cont_obj.style = $(".style_select").find("option:selected").val();
+ cont_obj.style = $("#style_select").find("option:selected").val();
img_cont.mask = $(this).find("input[name='mask']").val();
img_cont.count = $(this).find(".img_block").size();
img_cont.text = $(this).find(".cat_desc").val();
@@ -266,7 +292,7 @@ function exportData(){
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
var img_cont = new Object();
- cont_obj.style = $(".style_select").find("option:selected").val();
+ cont_obj.style = $("#style_select").find("option:selected").val();
img_cont.mask = $(this).find("input[name='mask']").val();
img_cont.count = $(this).find("input[name='count']").val();
img_cont.text = $(this).find(".cat_desc").val();
@@ -292,7 +318,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);
}
@@ -307,12 +333,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);
}
if(data[i].mode == "edit"){
var tmp_array = [];
@@ -339,7 +365,7 @@ function importData(data){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -410,7 +436,7 @@ function importData(data){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -452,7 +478,8 @@ function importData(data){
}
}
}
- });
+ });
+ checkCorrectness(all_imgs);
}
}
}
@@ -516,7 +543,7 @@ function showExample(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -527,7 +554,7 @@ function showExample(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -642,10 +669,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");
@@ -659,10 +686,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");
@@ -676,17 +703,16 @@ 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;
}
}
//a func for checking when smth will drop
-function checkOnDrop(dest, source){
- dest.append(source);
+function checkOnDrop(dest){
var tmp_count = dest.find("input[name='count']").val();
var tmp_mask = dest.find("input[name='mask']").val();
if(dest.find(".img_block").size() == tmp_count){
@@ -696,46 +722,34 @@ function checkOnDrop(dest, source){
tmp_right = false;
});
if(tmp_right)
- dest.removeClass("def_cont")
- .removeClass("red_cont")
- .addClass("green_cont");
+ dest.removeClass("def_cont").removeClass("red_cont").addClass("green_cont");
else
- dest.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont");
} else
- dest.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont");
}
//checking source on correctness
function checkCorrectness(source){
if(!source.hasClass("all_imgs")){
- var tmp_count = source.find("input[name='count']").val();
- var tmp_mask = source.find("input[name='mask']").val();
- if(source.find(".img_block").size() == tmp_count){
- var tmp_right = true;
- source.find(".img_block").each(function(){
- if($(this).find("input").val() != tmp_mask)
- tmp_right = false;
- });
-
- if(tmp_right)
- source.removeClass("def_cont")
- .removeClass("red_cont")
- .addClass("green_cont");
- else
- source.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
- } else if(source.find(".img_block").size() == 0)
- source.addClass("def_cont")
- .removeClass("green_cont")
- .removeClass("red_cont");
- else
- source.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ if(source.parent().find(".all_imgs").find(".img_block").size() == 0){
+ source.parent().find(".imgs_cont").each(function(){
+ checkOnDrop($(this))
+ })
+ } else {
+ source.parent().find(".imgs_cont").each(function(){
+ $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont");
+ })
+ }
+ } else {
+ if(source.find(".img_block").size() > 0){
+ source.parent().find(".imgs_cont").each(function(){
+ $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont");
+ })
+ } else {
+ source.parent().find(".imgs_cont").each(function(){
+ checkOnDrop($(this))
+ })
+ }
}
}
diff --git a/resources/library/interactivities/Cat text.wgt/locales/ru/index.html b/resources/library/interactivities/Cat text.wgt/locales/ru/index.html
index 27c62f8d..561bec51 100644
--- a/resources/library/interactivities/Cat text.wgt/locales/ru/index.html
+++ b/resources/library/interactivities/Cat text.wgt/locales/ru/index.html
@@ -25,12 +25,7 @@
-
-
-
-
-
-
+
@@ -40,7 +35,17 @@
diff --git a/resources/library/interactivities/Cat text.wgt/locales/ru/js/script.js b/resources/library/interactivities/Cat text.wgt/locales/ru/js/script.js
index dade5268..7a4ac961 100644
--- a/resources/library/interactivities/Cat text.wgt/locales/ru/js/script.js
+++ b/resources/library/interactivities/Cat text.wgt/locales/ru/js/script.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- display: "Показать",
+ display: "Закрыть",
edit: "Изменить",
first_desc: "Фрукты",
second_desc: "Овощи",
@@ -17,7 +17,8 @@ var sankoreLang = {
pad: "Планшет",
none: "Нет",
help: "Помощь",
- help_content: "Пример текста помощи ..."
+ help_content: "Пример текста помощи ...",
+ theme: "Тема"
};
//main function
@@ -29,9 +30,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("categoriser_text","")){
@@ -53,11 +56,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");
@@ -78,7 +83,7 @@ function start(){
exportData();
});
- $(".style_select").change(function (event){
+ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@@ -87,7 +92,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(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);
@@ -120,7 +125,7 @@ function start(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -160,7 +165,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
$(".cont").each(function(){
var container = $(this);
@@ -244,7 +249,7 @@ function exportData(){
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
var img_cont = new Object();
- cont_obj.style = $(".style_select").find("option:selected").val();
+ cont_obj.style = $("#style_select").find("option:selected").val();
img_cont.mask = $(this).find("input[name='mask']").val();
img_cont.count = $(this).find(".img_block").size();
img_cont.text = $(this).find(".cat_desc").val();
@@ -266,7 +271,7 @@ function exportData(){
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
var img_cont = new Object();
- cont_obj.style = $(".style_select").find("option:selected").val();
+ cont_obj.style = $("#style_select").find("option:selected").val();
img_cont.mask = $(this).find("input[name='mask']").val();
img_cont.count = $(this).find("input[name='count']").val();
img_cont.text = $(this).find(".cat_desc").val();
@@ -292,7 +297,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);
}
@@ -307,12 +312,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);
}
if(data[i].mode == "edit"){
var tmp_array = [];
@@ -339,7 +344,7 @@ function importData(data){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -410,7 +415,7 @@ function importData(data){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -452,7 +457,8 @@ function importData(data){
}
}
}
- });
+ });
+ checkCorrectness(all_imgs);
}
}
}
@@ -516,7 +522,7 @@ function showExample(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -527,7 +533,7 @@ function showExample(){
drop: function(event, ui) {
if($(ui.draggable).parent().parent().html() == $(this).parent().html()){
var tmp_ui = $(ui.draggable).parent();
- checkOnDrop($(this), $(ui.draggable));
+ $(this).append($(ui.draggable));
checkCorrectness(tmp_ui);
}
}
@@ -642,10 +648,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");
@@ -659,10 +665,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");
@@ -676,17 +682,16 @@ 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;
}
}
//a func for checking when smth will drop
-function checkOnDrop(dest, source){
- dest.append(source);
+function checkOnDrop(dest){
var tmp_count = dest.find("input[name='count']").val();
var tmp_mask = dest.find("input[name='mask']").val();
if(dest.find(".img_block").size() == tmp_count){
@@ -696,46 +701,34 @@ function checkOnDrop(dest, source){
tmp_right = false;
});
if(tmp_right)
- dest.removeClass("def_cont")
- .removeClass("red_cont")
- .addClass("green_cont");
+ dest.removeClass("def_cont").removeClass("red_cont").addClass("green_cont");
else
- dest.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont");
} else
- dest.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont");
}
//checking source on correctness
function checkCorrectness(source){
if(!source.hasClass("all_imgs")){
- var tmp_count = source.find("input[name='count']").val();
- var tmp_mask = source.find("input[name='mask']").val();
- if(source.find(".img_block").size() == tmp_count){
- var tmp_right = true;
- source.find(".img_block").each(function(){
- if($(this).find("input").val() != tmp_mask)
- tmp_right = false;
- });
-
- if(tmp_right)
- source.removeClass("def_cont")
- .removeClass("red_cont")
- .addClass("green_cont");
- else
- source.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
- } else if(source.find(".img_block").size() == 0)
- source.addClass("def_cont")
- .removeClass("green_cont")
- .removeClass("red_cont");
- else
- source.removeClass("def_cont")
- .removeClass("green_cont")
- .addClass("red_cont");
+ if(source.parent().find(".all_imgs").find(".img_block").size() == 0){
+ source.parent().find(".imgs_cont").each(function(){
+ checkOnDrop($(this))
+ })
+ } else {
+ source.parent().find(".imgs_cont").each(function(){
+ $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont");
+ })
+ }
+ } else {
+ if(source.find(".img_block").size() > 0){
+ source.parent().find(".imgs_cont").each(function(){
+ $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont");
+ })
+ } else {
+ source.parent().find(".imgs_cont").each(function(){
+ checkOnDrop($(this))
+ })
+ }
}
}
\ No newline at end of file
diff --git a/resources/library/interactivities/Choisir.wgt/css/basic.css b/resources/library/interactivities/Choisir.wgt/css/basic.css
index b40b8bb7..ad7c7371 100644
--- a/resources/library/interactivities/Choisir.wgt/css/basic.css
+++ b/resources/library/interactivities/Choisir.wgt/css/basic.css
@@ -16,7 +16,7 @@ html, body{
height: 100%;
margin: 0;
padding: 0;
- border-radius: 50px;
+ border-radius: 35px;
overflow: hidden;
}
@@ -471,57 +471,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(../images/slate-edit.png);
- background-repeat: no-repeat;
- background-position: top 0;
+ padding-left: 35px;
+ background: url(../images/toolbar-edit.png) left -32px no-repeat;
+ color: white;
display: none;
}
#wgt_edit{
- padding-left: 40px;
- background-image: url(../images/slate-edit.png);
- background-repeat: no-repeat;
- background-position: top 0;
+ padding-left: 35px;
+ background: url(../images/slate-toolbar-edit.png) left top no-repeat;
+ color: #7F613F;
+ text-shadow: #FFDCA9 0 1px 0;
}
#wgt_reload{
- padding-left: 40px;
- background-image: url(../images/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(../images/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(../images/slate-toolbar-reload.png) left top no-repeat;
+ color: #7F613F;
+ text-shadow: #FFDCA9 0 1px 0;
}
.btl_pad{
@@ -556,51 +539,50 @@ body{
background-image: url(../images/pad-bottom-right.png) !important;
}
-.pad_color{
- color: white !important;
+.without_radius{
+ border-radius: 0 !important;
}
-.pad_reload{
- background-image: url(../images/slate-toolbar-reload-white.png) !important;
+.without_back{
+ background: none !important;
}
-.pad_edit{
- background-image: url(../images/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(../images/ar_down_white.png) !important;
+.pad_reload{
+ background: url(../images/toolbar-reload.png) left top no-repeat !important;
}
-.without_radius{
- border-radius: 0 !important;
+.pad_edit{
+ background: url(../images/toolbar-edit.png) left top no-repeat !important;
}
-.without_back{
- background: none !important;
+.pad_help{
+ background: url(../images/toolbar-help.png) left top no-repeat !important;
}
-.none_select{
- background-color: #333 !important;
+.help_wood{
+ background: url(../images/slate-toolbar-help.png) left -32px no-repeat !important;
color: white !important;
- background-image: url(../images/ar_down_white.png) !important;
+ text-shadow: #7F613F 0 -1px 0 !important;
}
-.pad_help{
- background-image: url(../images/slate-help-white.png) !important;
+.help_pad{
+ background: url(../images/toolbar-help.png) left -32px no-repeat !important;
+ color: white !important;
}
#wgt_help{
- padding-left: 32px;
- background-image: url(../images/slate-help.png);
- background-repeat: no-repeat;
- background-position: top 0;
+ padding-left: 35px;
+ background: url(../images/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;
@@ -609,5 +591,36 @@ body{
}
.open{
-
+
+}
+
+#parameters{
+ display: none;
+ padding: 10px 20px;
+ background: url("../images/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(../images/slate-toolbar-edit.png) left -32px no-repeat !important;
+ text-shadow: #7F613F 0 -1px 0;
+}
+
+.radius_ft{
+ border-radius: 45px !important;
}
\ No newline at end of file
diff --git a/resources/library/interactivities/Choisir.wgt/images/ar_down.png b/resources/library/interactivities/Choisir.wgt/images/ar_down.png
deleted file mode 100644
index a20fab4f..00000000
Binary files a/resources/library/interactivities/Choisir.wgt/images/ar_down.png and /dev/null differ
diff --git a/resources/library/interactivities/Choisir.wgt/images/ar_down_white.png b/resources/library/interactivities/Choisir.wgt/images/ar_down_white.png
deleted file mode 100644
index 4a1d133b..00000000
Binary files a/resources/library/interactivities/Choisir.wgt/images/ar_down_white.png and /dev/null differ
diff --git a/resources/library/interactivities/Choisir.wgt/images/parameters-bg.png b/resources/library/interactivities/Choisir.wgt/images/parameters-bg.png
new file mode 100644
index 00000000..36f648e1
Binary files /dev/null and b/resources/library/interactivities/Choisir.wgt/images/parameters-bg.png differ
diff --git a/resources/library/interactivities/Choisir.wgt/images/slate-display.png b/resources/library/interactivities/Choisir.wgt/images/slate-display.png
deleted file mode 100644
index 96166143..00000000
Binary files a/resources/library/interactivities/Choisir.wgt/images/slate-display.png and /dev/null differ
diff --git a/resources/library/interactivities/Choisir.wgt/images/slate-edit.png b/resources/library/interactivities/Choisir.wgt/images/slate-edit.png
deleted file mode 100644
index 17f5fc5c..00000000
Binary files a/resources/library/interactivities/Choisir.wgt/images/slate-edit.png and /dev/null differ
diff --git a/resources/library/interactivities/Choisir.wgt/images/slate-help-white.png b/resources/library/interactivities/Choisir.wgt/images/slate-help-white.png
deleted file mode 100644
index 7b5ebfd8..00000000
Binary files a/resources/library/interactivities/Choisir.wgt/images/slate-help-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Choisir.wgt/images/slate-help.png b/resources/library/interactivities/Choisir.wgt/images/slate-help.png
deleted file mode 100644
index 069052d0..00000000
Binary files a/resources/library/interactivities/Choisir.wgt/images/slate-help.png and /dev/null differ
diff --git a/resources/library/interactivities/Choisir.wgt/images/slate-toolbar-help.png b/resources/library/interactivities/Choisir.wgt/images/slate-toolbar-help.png
new file mode 100644
index 00000000..fb7cdeba
Binary files /dev/null and b/resources/library/interactivities/Choisir.wgt/images/slate-toolbar-help.png differ
diff --git a/resources/library/interactivities/Choisir.wgt/images/slate-toolbar-reload-white.png b/resources/library/interactivities/Choisir.wgt/images/slate-toolbar-reload-white.png
deleted file mode 100644
index 78d146ec..00000000
Binary files a/resources/library/interactivities/Choisir.wgt/images/slate-toolbar-reload-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Choisir.wgt/images/slate-toolbar-reload.png b/resources/library/interactivities/Choisir.wgt/images/slate-toolbar-reload.png
index 685a5cb2..844169a9 100644
Binary files a/resources/library/interactivities/Choisir.wgt/images/slate-toolbar-reload.png and b/resources/library/interactivities/Choisir.wgt/images/slate-toolbar-reload.png differ
diff --git a/resources/library/interactivities/Choisir.wgt/images/toolbar-edit.png b/resources/library/interactivities/Choisir.wgt/images/toolbar-edit.png
new file mode 100644
index 00000000..daa338cd
Binary files /dev/null and b/resources/library/interactivities/Choisir.wgt/images/toolbar-edit.png differ
diff --git a/resources/library/interactivities/Choisir.wgt/images/toolbar-help.png b/resources/library/interactivities/Choisir.wgt/images/toolbar-help.png
new file mode 100644
index 00000000..6c4454c0
Binary files /dev/null and b/resources/library/interactivities/Choisir.wgt/images/toolbar-help.png differ
diff --git a/resources/library/interactivities/Choisir.wgt/images/toolbar-reload.png b/resources/library/interactivities/Choisir.wgt/images/toolbar-reload.png
new file mode 100644
index 00000000..340d7371
Binary files /dev/null and b/resources/library/interactivities/Choisir.wgt/images/toolbar-reload.png differ
diff --git a/resources/library/interactivities/Choisir.wgt/index.html b/resources/library/interactivities/Choisir.wgt/index.html
index 5d5bc7cd..9c9a371e 100644
--- a/resources/library/interactivities/Choisir.wgt/index.html
+++ b/resources/library/interactivities/Choisir.wgt/index.html
@@ -54,12 +54,7 @@ and open the template in the editor.
-
-
-
-
-
-
+
@@ -69,7 +64,17 @@ and open the template in the editor.
diff --git a/resources/library/interactivities/Choisir.wgt/locales/fr/index.html b/resources/library/interactivities/Choisir.wgt/locales/fr/index.html
index cafbc283..4336853c 100644
--- a/resources/library/interactivities/Choisir.wgt/locales/fr/index.html
+++ b/resources/library/interactivities/Choisir.wgt/locales/fr/index.html
@@ -29,12 +29,7 @@ and open the template in the editor.
-
-
-
-
-
-
+
@@ -44,7 +39,17 @@ and open the template in the editor.
diff --git a/resources/library/interactivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js b/resources/library/interactivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js
index 4ba41239..6c976c50 100644
--- a/resources/library/interactivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js
+++ b/resources/library/interactivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js
@@ -15,7 +15,7 @@
var sankoreLang = {
edit: "Modifier",
- display:"Afficher",
+ display:"Fermer",
question:"La question",
example_question:"Ceci est un exemple de question",
answer:"Ceci est une réponse possible",
@@ -40,8 +40,29 @@ var sankoreLang = {
slate: "ardoise",
pad: "tablette",
none: "aucun",
- help: "aide",
- help_content: "Ceci est un exemple de contenu de l'aide ..."
+ help: "Aide",
+ help_content: "
Choisir "+
+"
Question à choix multiples (QCM). "+
+
+"
Une question est posée avec plusieurs choix de réponses possibles. Le but est de choisir la bonne réponse.
"+
+
+"
Le bouton “Recharger” réinitialise les exercices.
"+
+
+"
Le bouton “Modifier” vous permet :
"+
+"
de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut aucun), "+
+"de modifier un exercice ou d’en créer de nouveaux dans la même activité. "+
+
+"
En mode édition, pour créer un nouvel exercice, cliquez sur “Ajouter une nouvelle question …”, puis.
"+
+"
insérez la question en cliquant sur le champ de texte “Saisir la question ici ...”, "+
+"cliquez sur ”Options” pour choisir l’affichage des propositions (une seule bonne réponse, plusieurs bonnes réponses, liste déroulante). Cliquez sur “Fermer”, "+
+"cliquez sur ”Ajouter une proposition” et saisissez la proposition dans le champ de texte, "+
+"définissez la ou les propositions correctes en cliquant sur la case à cocher à gauche des bonnes réponses. "+
+"Pour supprimer une proposition, cliquez sur la croix située à droite de celle-ci. "+
+
+"
Pour supprimer un exercice, cliquez sur la croix à droite du numéro de ”Options”.
"+
+
+"
Le bouton “Afficher” vous permet d’utiliser l’activité.
",
+theme: "Thème"
};
var questionArray;
@@ -65,10 +86,11 @@ function init(){
$("#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)
//popup message
var popupText = $("").appendTo("#data");
@@ -81,37 +103,40 @@ function init(){
//import saved data
if(window.sankore){
- if(sankore.preference("qstArrayData","") && sankore.preference("qstArrayData","") != "[]"){
- questionArray = jQuery.parseJSON(sankore.preference("qstArrayData",""));
- for(var i in questionArray){
- addQstBlock(questionArray[i].id, questionArray[i].text, questionArray[i].type,"style='display: none;'");
- for(var j in questionArray[i].answers)
- addAnsBlock(questionArray[i].answers[j].id, questionArray[i].id, questionArray[i].answers[j].text, true, questionArray[i].rightAns, questionArray[i].type);
- }
- displayData(true);
- }
- else{
- displayData(false);
- begin = false;
+ if(sankore.preference("qstArrayData","") && sankore.preference("qstArrayData","") != "[]")
+ questionArray = jQuery.parseJSON(sankore.preference("qstArrayData",""));
+ else
+ questionArray = jQuery.parseJSON('[{"text":"' + sankoreLang.example_question + '","type":"1","id":538,"rightAns":"2","answers":[{"id":953,"text":"' + sankoreLang.answer + ' 1.","value":1,"state":"","was":false},{"id":526,"text":"' + sankoreLang.answer + ' 2.","value":2,"state":"","was":false},{"id":473,"text":"' + sankoreLang.answer + ' 3.","value":3,"state":"","was":false}]}]');
+
+ for(i in questionArray){
+ addQstBlock(questionArray[i].id, questionArray[i].text, questionArray[i].type,"style='display: none;'");
+ for(j in questionArray[i].answers)
+ addAnsBlock(questionArray[i].answers[j].id, questionArray[i].id, questionArray[i].answers[j].text, true, questionArray[i].rightAns, questionArray[i].type);
}
+ displayData();
}
else{
- displayData(false);
- begin = false;
+ questionArray = jQuery.parseJSON('[{"text":"' + sankoreLang.example_question + '","type":"1","id":538,"rightAns":"2","answers":[{"id":953,"text":"' + sankoreLang.answer + ' 1.","value":1,"state":"","was":false},{"id":526,"text":"' + sankoreLang.answer + ' 2.","value":2,"state":"","was":false},{"id":473,"text":"' + sankoreLang.answer + ' 3.","value":3,"state":"","was":false}]}]');
+ for(i in questionArray){
+ addQstBlock(questionArray[i].id, questionArray[i].text, questionArray[i].type,"style='display: none;'");
+ for(j in questionArray[i].answers)
+ addAnsBlock(questionArray[i].answers[j].id, questionArray[i].id, questionArray[i].answers[j].text, true, questionArray[i].rightAns, questionArray[i].type);
+ }
+ displayData();
}
//saving widget data into sankore object for a correct import
if (window.widget) {
window.widget.onleave = function(){
sankore.setPreference("qstArrayData", JSON.stringify(questionArray));
- sankore.setPreference("choisir_style", $(".style_select").find("option:selected").val());
+ sankore.setPreference("choisir_style", $("#style_select").find("option:selected").val());
}
}
if(window.sankore)
if(sankore.preference("choisir_style","")){
changeStyle(sankore.preference("choisir_style",""));
- $(".style_select").val(sankore.preference("choisir_style",""));
+ $("#style_select").val(sankore.preference("choisir_style",""));
} else
changeStyle("3")
@@ -120,21 +145,21 @@ function init(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
- $(".style_select").css("display","none");
+ $("#parameters").css("display","none");
$(this).css("display", "none");
$("#wgt_edit").css("display", "block");
displayData(true);
mode = true;
if(window.sankore){
sankore.setPreference("qstArrayData", JSON.stringify(questionArray));
- sankore.setPreference("choisir_style", $(".style_select").find("option:selected").val());
+ sankore.setPreference("choisir_style", $("#style_select").find("option:selected").val());
}
}
} else {
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
$(this).css("display", "none");
$("#wgt_display").css("display", "block");
editData();
@@ -142,15 +167,17 @@ function init(){
}
}
});
-
+
$("#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");
@@ -169,10 +196,10 @@ function init(){
}
});
- $(".style_select option[value='1']").text(sankoreLang.slate);
- $(".style_select option[value='2']").text(sankoreLang.pad);
+ $("#style_select option[value='1']").text(sankoreLang.slate);
+ $("#style_select option[value='2']").text(sankoreLang.pad);
- $(".style_select").change(function (event){
+ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@@ -432,10 +459,10 @@ function init(){
//toggle button click trigger
//toggleButton.trigger("click");
//show data in display mode
- function displayData(flag){
+ function displayData(){
$("#addQstDiv").hide();
$(".qstDiv").hide();
- addToPage(questionArray, flag);
+ addToPage(questionArray);
}
//set widget in edit mode
@@ -453,8 +480,7 @@ function init(){
}
// show questions and answers in display mode
- function addToPage(array, flag){
- if(flag){
+ function addToPage(array){
var counter = 1;
for(var i in array){
@@ -520,25 +546,6 @@ function init(){
counter++;
}
begin = false;
- } else {
- counter = 1;
- qstDiv = $("
");
- spanOptConn = $("
").appendTo(qstDiv);
- qstNumber = $("
" + sankoreLang.question + " " + counter + " ").appendTo(spanOptConn);
- qstContent = $("
" + sankoreLang.example_question + "
").appendTo(qstDiv);
- ansDiv = $("
").appendTo(qstDiv);
-
- ansCount = 1;
- for(j = 0; j < 3; j++){
- newAnswer = $("
");
- ansInput = $("
").appendTo(newAnswer);
- ansSpan = $("
" + ansCount + ". ").appendTo(newAnswer);
- ansContent = $("
" + sankoreLang.answer + " " + ansCount + ".
").appendTo(newAnswer);
- newAnswer.appendTo(ansDiv);
- ansCount++;
- }
- qstDiv.appendTo("#data");
- }
}
}
@@ -743,10 +750,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");
@@ -760,10 +767,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");
@@ -777,10 +784,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;
}
}
\ No newline at end of file
diff --git a/resources/library/interactivities/Choisir.wgt/locales/ru/index.html b/resources/library/interactivities/Choisir.wgt/locales/ru/index.html
index cafbc283..4336853c 100644
--- a/resources/library/interactivities/Choisir.wgt/locales/ru/index.html
+++ b/resources/library/interactivities/Choisir.wgt/locales/ru/index.html
@@ -29,12 +29,7 @@ and open the template in the editor.
-
-
-
-
-
-
+
@@ -44,7 +39,17 @@ and open the template in the editor.
diff --git a/resources/library/interactivities/Choisir.wgt/locales/ru/scripts/selQuestionApp.js b/resources/library/interactivities/Choisir.wgt/locales/ru/scripts/selQuestionApp.js
index 62980f84..5c75cf3a 100644
--- a/resources/library/interactivities/Choisir.wgt/locales/ru/scripts/selQuestionApp.js
+++ b/resources/library/interactivities/Choisir.wgt/locales/ru/scripts/selQuestionApp.js
@@ -15,7 +15,7 @@
var sankoreLang = {
edit: "Изменить",
- display:"Показать",
+ display:"Закрыть",
question:"Вопрос",
example_question:"Это пример вопроса",
answer:"Это пример ответа",
@@ -41,7 +41,8 @@ var sankoreLang = {
pad: "Планшет",
none: "Нет",
help: "Помощь",
- help_content: "Пример текста помощи ..."
+ help_content: "Пример текста помощи ...",
+ theme: "Тема"
};
var questionArray;
@@ -65,10 +66,11 @@ function init(){
$("#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)
//popup message
var popupText = $("").appendTo("#data");
@@ -81,37 +83,40 @@ function init(){
//import saved data
if(window.sankore){
- if(sankore.preference("qstArrayData","") && sankore.preference("qstArrayData","") != "[]"){
- questionArray = jQuery.parseJSON(sankore.preference("qstArrayData",""));
- for(var i in questionArray){
- addQstBlock(questionArray[i].id, questionArray[i].text, questionArray[i].type,"style='display: none;'");
- for(var j in questionArray[i].answers)
- addAnsBlock(questionArray[i].answers[j].id, questionArray[i].id, questionArray[i].answers[j].text, true, questionArray[i].rightAns, questionArray[i].type);
- }
- displayData(true);
- }
- else{
- displayData(false);
- begin = false;
+ if(sankore.preference("qstArrayData","") && sankore.preference("qstArrayData","") != "[]")
+ questionArray = jQuery.parseJSON(sankore.preference("qstArrayData",""));
+ else
+ questionArray = jQuery.parseJSON('[{"text":"' + sankoreLang.example_question + '","type":"1","id":538,"rightAns":"2","answers":[{"id":953,"text":"' + sankoreLang.answer + ' 1.","value":1,"state":"","was":false},{"id":526,"text":"' + sankoreLang.answer + ' 2.","value":2,"state":"","was":false},{"id":473,"text":"' + sankoreLang.answer + ' 3.","value":3,"state":"","was":false}]}]');
+
+ for(i in questionArray){
+ addQstBlock(questionArray[i].id, questionArray[i].text, questionArray[i].type,"style='display: none;'");
+ for(j in questionArray[i].answers)
+ addAnsBlock(questionArray[i].answers[j].id, questionArray[i].id, questionArray[i].answers[j].text, true, questionArray[i].rightAns, questionArray[i].type);
}
+ displayData();
}
else{
- displayData(false);
- begin = false;
+ questionArray = jQuery.parseJSON('[{"text":"' + sankoreLang.example_question + '","type":"1","id":538,"rightAns":"2","answers":[{"id":953,"text":"' + sankoreLang.answer + ' 1.","value":1,"state":"","was":false},{"id":526,"text":"' + sankoreLang.answer + ' 2.","value":2,"state":"","was":false},{"id":473,"text":"' + sankoreLang.answer + ' 3.","value":3,"state":"","was":false}]}]');
+ for(i in questionArray){
+ addQstBlock(questionArray[i].id, questionArray[i].text, questionArray[i].type,"style='display: none;'");
+ for(j in questionArray[i].answers)
+ addAnsBlock(questionArray[i].answers[j].id, questionArray[i].id, questionArray[i].answers[j].text, true, questionArray[i].rightAns, questionArray[i].type);
+ }
+ displayData();
}
//saving widget data into sankore object for a correct import
if (window.widget) {
window.widget.onleave = function(){
sankore.setPreference("qstArrayData", JSON.stringify(questionArray));
- sankore.setPreference("choisir_style", $(".style_select").find("option:selected").val());
+ sankore.setPreference("choisir_style", $("#style_select").find("option:selected").val());
}
}
if(window.sankore)
if(sankore.preference("choisir_style","")){
changeStyle(sankore.preference("choisir_style",""));
- $(".style_select").val(sankore.preference("choisir_style",""));
+ $("#style_select").val(sankore.preference("choisir_style",""));
} else
changeStyle("3")
@@ -120,21 +125,21 @@ function init(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
- $(".style_select").css("display","none");
+ $("#parameters").css("display","none");
$(this).css("display", "none");
$("#wgt_edit").css("display", "block");
displayData(true);
mode = true;
if(window.sankore){
sankore.setPreference("qstArrayData", JSON.stringify(questionArray));
- sankore.setPreference("choisir_style", $(".style_select").find("option:selected").val());
+ sankore.setPreference("choisir_style", $("#style_select").find("option:selected").val());
}
}
} else {
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
$(this).css("display", "none");
$("#wgt_display").css("display", "block");
editData();
@@ -146,11 +151,13 @@ function init(){
$("#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");
@@ -169,10 +176,10 @@ function init(){
}
});
- $(".style_select option[value='1']").text(sankoreLang.slate);
- $(".style_select option[value='2']").text(sankoreLang.pad);
+ $("#style_select option[value='1']").text(sankoreLang.slate);
+ $("#style_select option[value='2']").text(sankoreLang.pad);
- $(".style_select").change(function (event){
+ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@@ -432,10 +439,10 @@ function init(){
//toggle button click trigger
//toggleButton.trigger("click");
//show data in display mode
- function displayData(flag){
+ function displayData(){
$("#addQstDiv").hide();
$(".qstDiv").hide();
- addToPage(questionArray, flag);
+ addToPage(questionArray);
}
//set widget in edit mode
@@ -453,8 +460,7 @@ function init(){
}
// show questions and answers in display mode
- function addToPage(array, flag){
- if(flag){
+ function addToPage(array){
var counter = 1;
for(var i in array){
@@ -520,25 +526,6 @@ function init(){
counter++;
}
begin = false;
- } else {
- counter = 1;
- qstDiv = $("
");
- spanOptConn = $("
").appendTo(qstDiv);
- qstNumber = $("
" + sankoreLang.question + " " + counter + " ").appendTo(spanOptConn);
- qstContent = $("
" + sankoreLang.example_question + "
").appendTo(qstDiv);
- ansDiv = $("
").appendTo(qstDiv);
-
- ansCount = 1;
- for(j = 0; j < 3; j++){
- newAnswer = $("
");
- ansInput = $("
").appendTo(newAnswer);
- ansSpan = $("
" + ansCount + ". ").appendTo(newAnswer);
- ansContent = $("
" + sankoreLang.answer + " " + ansCount + ".
").appendTo(newAnswer);
- newAnswer.appendTo(ansDiv);
- ansCount++;
- }
- qstDiv.appendTo("#data");
- }
}
}
@@ -743,10 +730,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");
@@ -760,10 +747,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");
@@ -777,10 +764,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;
}
}
\ No newline at end of file
diff --git a/resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js b/resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js
index b1f64e10..e04f2e83 100644
--- a/resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js
+++ b/resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js
@@ -15,7 +15,7 @@
var sankoreLang = {
edit: "Edit",
- display:"Display",
+ display:"Close",
question:"Question",
example_question:"This is an example of the question",
answer:"This is one possible answer",
@@ -41,7 +41,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"
};
var questionArray;
@@ -65,10 +66,11 @@ function init(){
$("#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)
//popup message
var popupText = $("").appendTo("#data");
@@ -81,37 +83,40 @@ function init(){
//import saved data
if(window.sankore){
- if(sankore.preference("qstArrayData","") && sankore.preference("qstArrayData","") != "[]"){
- questionArray = jQuery.parseJSON(sankore.preference("qstArrayData",""));
- for(var i in questionArray){
- addQstBlock(questionArray[i].id, questionArray[i].text, questionArray[i].type,"style='display: none;'");
- for(var j in questionArray[i].answers)
- addAnsBlock(questionArray[i].answers[j].id, questionArray[i].id, questionArray[i].answers[j].text, true, questionArray[i].rightAns, questionArray[i].type);
- }
- displayData(true);
- }
- else{
- displayData(false);
- begin = false;
+ if(sankore.preference("qstArrayData","") && sankore.preference("qstArrayData","") != "[]")
+ questionArray = jQuery.parseJSON(sankore.preference("qstArrayData",""));
+ else
+ questionArray = jQuery.parseJSON('[{"text":"' + sankoreLang.example_question + '","type":"1","id":538,"rightAns":"2","answers":[{"id":953,"text":"' + sankoreLang.answer + ' 1.","value":1,"state":"","was":false},{"id":526,"text":"' + sankoreLang.answer + ' 2.","value":2,"state":"","was":false},{"id":473,"text":"' + sankoreLang.answer + ' 3.","value":3,"state":"","was":false}]}]');
+
+ for(i in questionArray){
+ addQstBlock(questionArray[i].id, questionArray[i].text, questionArray[i].type,"style='display: none;'");
+ for(j in questionArray[i].answers)
+ addAnsBlock(questionArray[i].answers[j].id, questionArray[i].id, questionArray[i].answers[j].text, true, questionArray[i].rightAns, questionArray[i].type);
}
+ displayData();
}
else{
- displayData(false);
- begin = false;
+ questionArray = jQuery.parseJSON('[{"text":"' + sankoreLang.example_question + '","type":"1","id":538,"rightAns":"2","answers":[{"id":953,"text":"' + sankoreLang.answer + ' 1.","value":1,"state":"","was":false},{"id":526,"text":"' + sankoreLang.answer + ' 2.","value":2,"state":"","was":false},{"id":473,"text":"' + sankoreLang.answer + ' 3.","value":3,"state":"","was":false}]}]');
+ for(i in questionArray){
+ addQstBlock(questionArray[i].id, questionArray[i].text, questionArray[i].type,"style='display: none;'");
+ for(j in questionArray[i].answers)
+ addAnsBlock(questionArray[i].answers[j].id, questionArray[i].id, questionArray[i].answers[j].text, true, questionArray[i].rightAns, questionArray[i].type);
+ }
+ displayData();
}
//saving widget data into sankore object for a correct import
if (window.widget) {
window.widget.onleave = function(){
sankore.setPreference("qstArrayData", JSON.stringify(questionArray));
- sankore.setPreference("choisir_style", $(".style_select").find("option:selected").val());
+ sankore.setPreference("choisir_style", $("#style_select").find("option:selected").val());
}
}
if(window.sankore)
if(sankore.preference("choisir_style","")){
changeStyle(sankore.preference("choisir_style",""));
- $(".style_select").val(sankore.preference("choisir_style",""));
+ $("#style_select").val(sankore.preference("choisir_style",""));
} else
changeStyle("3")
@@ -120,21 +125,21 @@ function init(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
- $(".style_select").css("display","none");
+ $("#parameters").css("display","none");
$(this).css("display", "none");
$("#wgt_edit").css("display", "block");
displayData(true);
mode = true;
if(window.sankore){
sankore.setPreference("qstArrayData", JSON.stringify(questionArray));
- sankore.setPreference("choisir_style", $(".style_select").find("option:selected").val());
+ sankore.setPreference("choisir_style", $("#style_select").find("option:selected").val());
}
}
} else {
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
$(this).css("display", "none");
$("#wgt_display").css("display", "block");
editData();
@@ -146,11 +151,13 @@ function init(){
$("#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");
@@ -169,10 +176,10 @@ function init(){
}
});
- $(".style_select option[value='1']").text(sankoreLang.slate);
- $(".style_select option[value='2']").text(sankoreLang.pad);
+ $("#style_select option[value='1']").text(sankoreLang.slate);
+ $("#style_select option[value='2']").text(sankoreLang.pad);
- $(".style_select").change(function (event){
+ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@@ -432,10 +439,10 @@ function init(){
//toggle button click trigger
//toggleButton.trigger("click");
//show data in display mode
- function displayData(flag){
+ function displayData(){
$("#addQstDiv").hide();
$(".qstDiv").hide();
- addToPage(questionArray, flag);
+ addToPage(questionArray);
}
//set widget in edit mode
@@ -453,8 +460,7 @@ function init(){
}
// show questions and answers in display mode
- function addToPage(array, flag){
- if(flag){
+ function addToPage(array){
var counter = 1;
for(var i in array){
@@ -520,25 +526,6 @@ function init(){
counter++;
}
begin = false;
- } else {
- counter = 1;
- qstDiv = $("
");
- spanOptConn = $("
").appendTo(qstDiv);
- qstNumber = $("
" + sankoreLang.question + " " + counter + " ").appendTo(spanOptConn);
- qstContent = $("
" + sankoreLang.example_question + "
").appendTo(qstDiv);
- ansDiv = $("
").appendTo(qstDiv);
-
- ansCount = 1;
- for(j = 0; j < 3; j++){
- newAnswer = $("
");
- ansInput = $("
").appendTo(newAnswer);
- ansSpan = $("
" + ansCount + ". ").appendTo(newAnswer);
- ansContent = $("
" + sankoreLang.answer + " " + ansCount + ".
").appendTo(newAnswer);
- newAnswer.appendTo(ansDiv);
- ansCount++;
- }
- qstDiv.appendTo("#data");
- }
}
}
@@ -743,10 +730,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");
@@ -760,10 +747,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");
@@ -777,10 +764,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;
}
}
diff --git a/resources/library/interactivities/Contraste.wgt/locales/fr/scripts/blackYellow.js b/resources/library/interactivities/Contraste.wgt/locales/fr/scripts/blackYellow.js
index 3fbfd9aa..634dde99 100644
--- a/resources/library/interactivities/Contraste.wgt/locales/fr/scripts/blackYellow.js
+++ b/resources/library/interactivities/Contraste.wgt/locales/fr/scripts/blackYellow.js
@@ -26,8 +26,26 @@ var sankoreLang = {
slate: "ardoise",
pad: "tablette",
none: "aucun",
- help: "aide",
- help_content: "Ceci est un exemple de contenu de l'aide ..."
+ help: "Aide",
+ help_content: "
Contraste "+
+"
Jeu de couleurs. "+
+
+
+"
Cette activité permet de masquer et d’afficher du texte en jouant sur la couleur de fond (jaune ou noir). Le but est de pouvoir faire apparaître des données en passant d’une couleur à l’autre.
"+
+
+"
Le bouton “Recharger” réinitialise les exercices.
"+
+
+"
Le bouton “Modifier” vous permet :
"+
+"
de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut aucun), "+
+"de modifier un exercice ou d’en créer de nouveaux dans la même activité. "+
+
+"
En mode édition, pour créer un nouvel exercice, cliquez sur “+ Ajouter” en haut, puis
"+
+"
saisissez la donnée par exemple “3x15”, "+
+"saisissez le résultat, par exemple “15” et cliquez sur “OK”. "+
+"
Pour modifier les données ou les résultats, cliquez directement sur l’exercice.
"+
+"
Pour supprimer un exercice, cliquez sur la croix en haut à droite de l’exercice.
"+
+
+"
Le bouton “Afficher” vous permet d’utiliser l’activité.
"
};
function init(){
diff --git a/resources/library/interactivities/Des.wgt/js/help_fr-template.js b/resources/library/interactivities/Des.wgt/js/help_fr-template.js
index 27bf5dac..d7d687e7 100644
--- a/resources/library/interactivities/Des.wgt/js/help_fr-template.js
+++ b/resources/library/interactivities/Des.wgt/js/help_fr-template.js
@@ -1,13 +1,16 @@
Dés
Calcul oral ou jeux divers
-
L'App dés vous permet d'afficher des faces de dés de manière aléatoire.
-
En cliquant sur la flèche ou "Lancer" vous afficher une nouvelle série de résultats.
-Avec cette App, vous pouvez notamment travailler le calcul oral avec les résultats affichés ou en jouant "au compte est bon".
-
-
Les calculs et le raisonnement peuvent être saisis sur le tableau (en dehors de l'App).
-
Le bouton "éditer" vous permet de :
+
L'interactivité “Dés” vous permet d'afficher des faces de dés de manière aléatoire.
+
+
En cliquant sur la flèche ou "Lancer" vous affichez une nouvelle série de résultats.
+
+
Les calculs et le raisonnement peuvent être saisis sur le tableau (en dehors de l'interactivité).
+
+
Le bouton “Modifier” vous permet :
- choisir le thème de l'interactivité : tablette, ardoise ou aucun (par défaut tablette),
- déterminer le nombre de dés que vous voulez utiliser pour votre activité (2-6).
-
\ No newline at end of file
+
de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut tablette),
+
de déterminer le nombre de dés que vous voulez utiliser pour votre activité (de 2 à 6).
+
+
+
Le bouton “Afficher” vous permet d’utiliser l’activité.
\ No newline at end of file
diff --git a/resources/library/interactivities/Enveloppe.wgt/js/help_fr-template.js b/resources/library/interactivities/Enveloppe.wgt/js/help_fr-template.js
index 7707dd88..17301536 100644
--- a/resources/library/interactivities/Enveloppe.wgt/js/help_fr-template.js
+++ b/resources/library/interactivities/Enveloppe.wgt/js/help_fr-template.js
@@ -1,9 +1,14 @@
Enveloppe
-
Représentation du nombre
-
Glisser les trombones un à un dans l’enveloppe. Il suffit de cliquer sur l’enveloppe pour les faire réapparaître sur la page.
-
Le bouton "éditer" vous permet de :
+
Représentation du nombre.
+
+
Glisser les trombones un à un dans l’enveloppe. Il suffit de cliquer sur l’enveloppe pour faire réapparaître les trombones sur la page. Ces derniers apparaissent dans une autre couleur.
+
+
Le bouton "Recharger" replace tous les trombones sur la page.
+
+
Le bouton “Modifier” vous permet :
- choisir le thème de l'interactivité : tablette, ardoise ou aucun (par défaut tablette),
- modifier le nombre de trombone(s).
+de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut tablette),
+de déterminer le nombre de trombone(s) souhaités.
-
Le bouton "Recharger" permet de recommencer le jeu
\ No newline at end of file
+
+
Le bouton “Afficher” vous permet d’utiliser l’activité.
\ No newline at end of file
diff --git a/resources/library/interactivities/Etudier.wgt/locales/fr/js/script.js b/resources/library/interactivities/Etudier.wgt/locales/fr/js/script.js
index 0a7b1b37..2b10962a 100644
--- a/resources/library/interactivities/Etudier.wgt/locales/fr/js/script.js
+++ b/resources/library/interactivities/Etudier.wgt/locales/fr/js/script.js
@@ -1,7 +1,7 @@
var sankoreLang = {
display: "Afficher",
edit: "Modifier",
- text_content: "Ceci est un exemple. Au lieu de ce texte, vous pouvez mettre votre propre texte ou glisser-déposer une image, un son.",
+ text_content: "Ceci est un exemple. Au lieu de ce texte, vous pouvez mettre votre propre texte ou glisser-déposer une image, un son ou une vidéo.",
new_txt: "Nouveau bloc de texte",
new_slide: "Ceci est une nouvelle diapositive.",
wgt_name: "Etudier",
@@ -9,7 +9,27 @@ var sankoreLang = {
pad: "Pad",
none: "Aucun",
help: "Aide",
- help_content: "Ceci est un exemple de contenu de l'aide ..."
+ help_content: "
Etudier "+
+"
Livret de pages. "+
+
+"
L’interactivité Etudier permet d’ajouter un livret avec des pages. Ce livret peut être enrichi avec du texte, des images, du son et des vidéos.
"+
+
+"
Le bouton “Modifier” vous permet :
"+
+"
de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut aucun), "+
+"de modifier les pages du livret. "+
+
+"
Sur chaque page, vous pouvez :
"+
+"
insérer des zones de texte avec le bouton “+T” situé en haut à gauche de l’interactivité. (pour modifier ces zones de texte, cliquez à l’intérieur et écrivez du texte), "+
+"insérer des images, sons et vidéos par glisser-déposer de fichiers depuis la bibliothèque jusqu’à l’intérieur de la page du livret, "+
+"déplacer les textes, images, sons et vidéos à l’intérieur de la page en cliquant et en déplaçant la flèche multidirectionnelle qui se situe dans le coin supérieur gauche de chaque élément, "+
+"agrandir la taille d’un élément avec la double flèche en bas à droite de celui-ci, "+
+"supprimer un élément avec la case en haut à droite de celui-ci. "+
+
+"
Pour ajouter une page, cliquez sur la flèche verte accompagnée d’un “+” se trouvant en bas à gauche et à droite.
"+
+"
Pour supprimer une page, cliquez sur la croix rouge située en haut à droite de la page.
"+
+
+"
Le bouton “Afficher” vous permet d’utiliser l’activité.
"
+
};
//some flags
diff --git a/resources/library/interactivities/Memory.wgt/js/help_fr-template.js b/resources/library/interactivities/Memory.wgt/js/help_fr-template.js
deleted file mode 100644
index 1d15950e..00000000
--- a/resources/library/interactivities/Memory.wgt/js/help_fr-template.js
+++ /dev/null
@@ -1,16 +0,0 @@
-
Memory
-
Calcul mental, jeu d’association de cartes
-
L’App Memory a pour but de faire des paires tout en mémorisant l’emplacement des différentes cartes.
-
Les cartes sont retournées face contre table de façon à ce que les images ne soient pas visibles. Le joueur découvre 2 cartes. Si elles sont identiques, elles restent découvertes. Si elles sont différentes, elles se retournent à nouveau.
-
La partie est terminée quand toutes les paires ont été trouvées.
-
-
Le bouton "éditer" vous permet de :
-
- modifier le thème de l'interactivité : tablette, ardoise ou aucun (par défaut tablette),
- choisir le nombre de cartes (4, 6 ou 8 cartes),
- sélectionner le délai d’affichage des cartes retournées,
- éditer directement une carte.
-
-
Les cartes possèdent par défaut un champ texte. Pour insérer du texte, cliquez sur cette dernière et saisissez le texte désiré. Pour ajouter une image depuis votre bibliothèque, cochez la case “utiliser une image” et utilisez le glisser-déposer. Il faut au préalable retourner la carte avec le bouton bleu.
-
Les cartes sont disposées de manière aléatoire dans le mode jeu.
-
L’App est capable d’identifier les écritures mathématiques équivalentes (signes autorisés : “+”, “*”, “-”, “/” et les parenthèses).
\ No newline at end of file
diff --git a/resources/library/interactivities/Morpion.wgt/js/help_fr-template.js b/resources/library/interactivities/Morpion.wgt/js/help_fr-template.js
deleted file mode 100644
index b42e7e98..00000000
--- a/resources/library/interactivities/Morpion.wgt/js/help_fr-template.js
+++ /dev/null
@@ -1,21 +0,0 @@
-
Morpion
-
Version calcul mental
-
-
-Les deux joueurs choisissent, répondent et font valider tour à tour une opération dans une case.
-Une fois la réponse saisie, la “coche” permet de vérifier la réponse. L’App corrige la réponse.
-Si la réponse est correcte, la case est marquée d’une croix (X) ou d’un cercle (O) selon le joueur.
-Si la réponse est fausse, l’autre joueur prend la main.
-
-
Le nom du joueur figure à gauche : JOUEUR 1 (X), JOUEUR 2 (O).
-
-
Le premier joueur qui parvient à aligner trois de ses symboles (X ou O) gagne la partie.
-
-
Le bouton "éditer" vous permet de :
-
- choisir le thème de l'interactivité : tablette, ardoise ou aucun (par défaut tablette),
- modifier les calculs que vous voulez utiliser pour votre activité.
-
-
L’App est capable d’identifier les écritures mathématiques (signes autorisés : “+”, “*”, “-”, “/” et les parenthèses).
-
-
Le bouton "Recharger" permet de recommencer le jeu.
diff --git a/resources/library/interactivities/Ordre images.wgt/locales/fr/js/script.js b/resources/library/interactivities/Ordre images.wgt/locales/fr/js/script.js
index c0620f09..ca851845 100644
--- a/resources/library/interactivities/Ordre images.wgt/locales/fr/js/script.js
+++ b/resources/library/interactivities/Ordre images.wgt/locales/fr/js/script.js
@@ -10,8 +10,30 @@ var sankoreLang = {
slate: "ardoise",
pad: "tablette",
none: "aucun",
- help: "aide",
- help_content: "Ceci est un exemple de contenu de l'aide ..."
+ help: "Aide",
+ help_content: "
Ordonner des images "+
+"
Classer des images dans l’ordre demandé. "+
+
+"
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.
"+
+
+"
Le bouton “Recharger” réinitialise les exercices.
"+
+
+"
Le bouton “Modifier” vous permet :
"+
+"
de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut aucun), "+
+"de modifier un exercice ou d’en créer de nouveaux dans la même activité. "+
+
+"
Pour créer un nouvel exercice, cliquez sur “Nouveau bloc” en bas, puis
"+
+"
insérez une consigne en cliquant sur le champ de texte “Saisir votre consigne ici …”, "+
+"insérez des images dans les zones de dépôt par glisser-déposer des images à partir de votre bibliothèque, "+
+"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. "+
+
+"
Pour ajouter une zone image, cliquez sur le gros “+” en bas.
"+
+"
Pour supprimer une zone image, cliquez sur la croix située dans le coin supérieur droit de l’image.
"+
+"
Pour changer d’image, cliquez sur l’icône située au milieu à droite de l’image.
"+
+
+"
Pour supprimer un exercice, cliquez sur la croix à gauche du numéro de l’exercice.
"+
+
+"
Le bouton “Afficher” vous permet d’utiliser l’activité.
"
};
//main function
diff --git a/resources/library/interactivities/Ordre lettres.wgt/css/basic.css b/resources/library/interactivities/Ordre lettres.wgt/css/basic.css
index 26583dd9..4573addc 100644
--- a/resources/library/interactivities/Ordre lettres.wgt/css/basic.css
+++ b/resources/library/interactivities/Ordre lettres.wgt/css/basic.css
@@ -64,12 +64,6 @@ body{
min-height: 60px;
}
-.imgs_cont{
- width: 100%;
- min-height: 62px;
- margin: 0;
-}
-
.imgs_answers_gray{
}
@@ -115,19 +109,41 @@ body{
left: 5px;
}
-.img_block{
- width: 50px;
+#sortable{
+/* width: 100%;
+ min-height: 62px;
+ margin: 0;*/
+ list-style-type: none;
+ margin: 10px 0 10px 20px;
+ padding: 0;
+}
+
+#sortable li{
+/* width: 50px;
height: 50px;
margin: 5px 10px;
cursor: pointer;
+ float: left;
display: inline-block;
position: relative;
background-color: white;
border: 1px solid #ccc;
- -moz-box-shadow: #ccc -1px 0 4px;
-webkit-box-shadow: #ccc -1px 0 4px;
box-shadow: #ccc -1px 0 4px;
+ font-size: 230%;*/
+ margin: 5px 10px;
+ display: inline-table;
+ width: 50px;
+ height: 50px;
+ background-color: white;
font-size: 230%;
+ -webkit-box-shadow: #ccc -1px 0 4px;
+ box-shadow: #ccc -1px 0 4px;
+ text-align: center;
+}
+
+.highlight {
+ background-color: #999 !important;
}
.add_block{
diff --git a/resources/library/interactivities/Ordre lettres.wgt/index.html b/resources/library/interactivities/Ordre lettres.wgt/index.html
index 1aec98d8..1ccdeec9 100644
--- a/resources/library/interactivities/Ordre lettres.wgt/index.html
+++ b/resources/library/interactivities/Ordre lettres.wgt/index.html
@@ -6,8 +6,8 @@
-
-
+
+
-
+
+
-
+
+
-
+
diff --git a/resources/library/interactivities/Ordre lettres.wgt/locales/ru/js/script.js b/resources/library/interactivities/Ordre lettres.wgt/locales/ru/js/script.js
index e9fb0b36..3377a85c 100644
--- a/resources/library/interactivities/Ordre lettres.wgt/locales/ru/js/script.js
+++ b/resources/library/interactivities/Ordre lettres.wgt/locales/ru/js/script.js
@@ -68,8 +68,8 @@ function start(){
$("#wgt_reload").click(function(){
if($("#wgt_display").hasClass("selected")){
- $("#wgt_edit").trigger("click");
- $("#wgt_display").trigger("click");
+ setTimeout('$("#wgt_display").trigger("click")', 10)
+ $("#wgt_edit").trigger("click");
} else {
$("#wgt_display").trigger("click");
}
@@ -95,7 +95,7 @@ function start(){
$(".cont").each(function(){
var container = $(this);
var tmp_array = [];
- var imgs_container = container.find(".imgs_cont");
+ var ans_container = container.find(".audio_answer");
container.find(".text_cont .audio_desc").removeAttr("contenteditable");
container.find(".audio_block").removeAttr("ondragenter")
@@ -103,19 +103,18 @@ function start(){
.removeAttr("ondragover")
.removeAttr("ondrop")
container.find(".close_cont").remove();
- var answer = imgs_container.find(".audio_answer").text();
- imgs_container.find(".audio_answer").remove();
- imgs_container.find("input").val(answer);
+ var answer = ans_container.text();
+ ans_container.prev().val(answer)
+ ans_container.remove();
+ var ul_cont = $("