").appendTo(container);
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 c1be852c..da2f2627 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
@@ -7,8 +7,8 @@ var sankoreLang = {
add: "Nouveau bloc",
wgt_name: "Catégoriser des images",
reload: "Recharger",
- slate: "ardoise",
- pad: "tablette"
+ slate: "Ardoise",
+ pad: "Tablette"
};
//main function
@@ -208,7 +208,7 @@ function start(){
//export
function exportData(){
var array_to_export = [];
- if($("#edit").hasClass("selected")){
+ if($("#wgt_edit").hasClass("selected")){
$(".cont").each(function(){
var cont_obj = new Object();
cont_obj.style = $(".style_select").find("option:selected").val();
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 778a3ad5..63850c45 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
@@ -208,7 +208,7 @@ function start(){
//export
function exportData(){
var array_to_export = [];
- if($("#edit").hasClass("selected")){
+ if($("#wgt_edit").hasClass("selected")){
$(".cont").each(function(){
var cont_obj = new Object();
cont_obj.style = $(".style_select").find("option:selected").val();
diff --git a/resources/library/interactivities/Cat text.wgt/css/basic.css b/resources/library/interactivities/Cat text.wgt/css/basic.css
index e8664c48..b6431c0c 100644
--- a/resources/library/interactivities/Cat text.wgt/css/basic.css
+++ b/resources/library/interactivities/Cat text.wgt/css/basic.css
@@ -96,8 +96,11 @@ body{
}
.text_cont{
- width: 100%;
+ min-width: 150px;
+ max-width: 200px;
min-height: 20px;
+ max-height: 60px;
+ overflow: hidden;
display: block;
cursor: pointer;
}
@@ -113,7 +116,8 @@ body{
}
.img_block{
- width: 150px;
+ min-width: 150px;
+ max-width: 200px;
height: 60px;
margin: 10px;
display: inline-table;
diff --git a/resources/library/interactivities/Cat text.wgt/js/script.js b/resources/library/interactivities/Cat text.wgt/js/script.js
index d054d43d..148d35c5 100644
--- a/resources/library/interactivities/Cat text.wgt/js/script.js
+++ b/resources/library/interactivities/Cat text.wgt/js/script.js
@@ -275,8 +275,8 @@ function exportData(){
cont_obj.tmp = "clear";
array_to_export.push(cont_obj);
}
-
- sankore.setPreference("categoriser_text", JSON.stringify(array_to_export));
+ if(window.sankore)
+ sankore.setPreference("categoriser_text", JSON.stringify(array_to_export));
}
//import
diff --git a/resources/library/interactivities/Choisir.wgt/config.xml b/resources/library/interactivities/Choisir.wgt/config.xml
index 97300095..ab08b9ca 100644
--- a/resources/library/interactivities/Choisir.wgt/config.xml
+++ b/resources/library/interactivities/Choisir.wgt/config.xml
@@ -3,7 +3,7 @@
xmlns:ub="http://uniboard.mnemis.com/widgets"
id="http://uniboard.mnemis.com/widgets/webbrowser"
version="1.1"
- width="900"
+ width="920"
height="400"
ub:resizable="true">
diff --git a/resources/library/interactivities/Choisir.wgt/css/basic.css b/resources/library/interactivities/Choisir.wgt/css/basic.css
index 2905fc32..d7153fe7 100644
--- a/resources/library/interactivities/Choisir.wgt/css/basic.css
+++ b/resources/library/interactivities/Choisir.wgt/css/basic.css
@@ -143,6 +143,8 @@ body{
margin-left: 10px;
margin-bottom: 10px;
width: 95%;
+ max-height: 60px;
+ overflow-x: hidden;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: small;
border: 3px solid #ccc;
@@ -158,9 +160,14 @@ body{
float: left;
padding: 5px;
margin: 10px;
- width: 100%;
+ width: 95%;
+ max-height: 60px;
+ overflow-x: hidden;
font-family: Verdana,Arial,Helvetica,sans-serif;
color: white;
+ border: 1px solid #DFDFDE;
+ border-top-left-radius: 10px;
+ border-bottom-left-radius: 10px;
}
.ansDiv{
@@ -210,6 +217,8 @@ body{
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: small;
width: 80%;
+ max-height: 45px;
+ overflow-x: hidden;
float: left;
border: 3px solid #ccc;
-webkit-border-radius: 5px;
@@ -227,9 +236,12 @@ body{
font-size: small;
font-weight: bold;
width: 80%;
+ max-height: 45px;
+ overflow-x: hidden;
float: left;
- -webkit-border-radius: 5px;
- border-radius: 5px;
+ border: 1px solid #DFDFDE;
+ border-top-left-radius: 10px;
+ border-bottom-left-radius: 10px;
color: white;
}
@@ -392,7 +404,7 @@ body{
}
.selected{
-
+
}
/*top*/
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 f376bcc8..d5672ea5 100644
--- a/resources/library/interactivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js
+++ b/resources/library/interactivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js
@@ -102,11 +102,12 @@ function init(){
}
}
- if(sankore.preference("choisir_style","")){
- changeStyle(sankore.preference("choisir_style",""));
- $(".style_select").val(sankore.preference("choisir_style",""));
- } else
- changeStyle(1)
+ if(window.sankore)
+ if(sankore.preference("choisir_style","")){
+ changeStyle(sankore.preference("choisir_style",""));
+ $(".style_select").val(sankore.preference("choisir_style",""));
+ } else
+ changeStyle(1)
$("#wgt_display, #wgt_edit").click(function(event){
if(this.id == "wgt_display"){
@@ -118,8 +119,10 @@ function init(){
$("#wgt_edit").css("display", "block");
displayData(true);
mode = true;
- sankore.setPreference("qstArrayData", JSON.stringify(questionArray));
- sankore.setPreference("choisir_style", $(".style_select").find("option:selected").val());
+ if(window.sankore){
+ sankore.setPreference("qstArrayData", JSON.stringify(questionArray));
+ sankore.setPreference("choisir_style", $(".style_select").find("option:selected").val());
+ }
}
} else {
if(!$(this).hasClass("selected")){
@@ -312,15 +315,15 @@ function init(){
if(event.target.type == "radio"){
checkingAnswers("radio", getNeededElement(questionArray, currentQstId).answers, event.target.value);
if(event.target.value == getNeededElement(questionArray, currentQstId).rightAns)
- $(event.target).next().next().find("span").css("background-color","#6c0");
+ $(event.target).next().next().css("background-color","#6c0");
else
- $(event.target).next().next().find("span").css("background-color","red");
+ $(event.target).next().next().css("background-color","red");
} else {
checkingAnswers("box", getNeededElement(questionArray, currentQstId).answers, event.target.value, event.target.checked);
if(getNeededElement(questionArray, currentQstId).rightAns.replace(/,/g,"").indexOf(event.target.value + " ", 0) != -1)
- $(event.target).next().next().find("span").css("background-color","#6c0");
+ $(event.target).next().next().css("background-color","#6c0");
else
- $(event.target).next().next().find("span").css("background-color","red");
+ $(event.target).next().next().css("background-color","red");
}
}
});
@@ -462,7 +465,7 @@ function init(){
newAnswer = $("
");
var ansInput = $("
").appendTo(newAnswer);
var ansSpan = $("
" + ansCount + ".").appendTo(newAnswer);
- var ansContent = $("
" + array[i].answers[j].text + "
").appendTo(newAnswer);
+ var ansContent = $("
" + array[i].answers[j].text + "
").appendTo(newAnswer);
newAnswer.appendTo(ansDiv);
break;
case "2":
@@ -475,7 +478,7 @@ function init(){
newAnswer = $("
");
ansInput = $("
").appendTo(newAnswer);
ansSpan = $("
" + ansCount + ".").appendTo(newAnswer);
- ansContent = $("
" + array[i].answers[j].text + "
").appendTo(newAnswer);
+ ansContent = $("
" + array[i].answers[j].text + "
").appendTo(newAnswer);
newAnswer.appendTo(ansDiv);
break;
case "3":
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 e1446eee..38cc2a34 100644
--- a/resources/library/interactivities/Choisir.wgt/locales/ru/scripts/selQuestionApp.js
+++ b/resources/library/interactivities/Choisir.wgt/locales/ru/scripts/selQuestionApp.js
@@ -102,11 +102,12 @@ function init(){
}
}
- if(sankore.preference("choisir_style","")){
- changeStyle(sankore.preference("choisir_style",""));
- $(".style_select").val(sankore.preference("choisir_style",""));
- } else
- changeStyle(1)
+ if(window.sankore)
+ if(sankore.preference("choisir_style","")){
+ changeStyle(sankore.preference("choisir_style",""));
+ $(".style_select").val(sankore.preference("choisir_style",""));
+ } else
+ changeStyle(1)
$("#wgt_display, #wgt_edit").click(function(event){
if(this.id == "wgt_display"){
@@ -118,8 +119,10 @@ function init(){
$("#wgt_edit").css("display", "block");
displayData(true);
mode = true;
- sankore.setPreference("qstArrayData", JSON.stringify(questionArray));
- sankore.setPreference("choisir_style", $(".style_select").find("option:selected").val());
+ if(window.sankore){
+ sankore.setPreference("qstArrayData", JSON.stringify(questionArray));
+ sankore.setPreference("choisir_style", $(".style_select").find("option:selected").val());
+ }
}
} else {
if(!$(this).hasClass("selected")){
@@ -312,15 +315,15 @@ function init(){
if(event.target.type == "radio"){
checkingAnswers("radio", getNeededElement(questionArray, currentQstId).answers, event.target.value);
if(event.target.value == getNeededElement(questionArray, currentQstId).rightAns)
- $(event.target).next().next().find("span").css("background-color","#6c0");
+ $(event.target).next().next().css("background-color","#6c0");
else
- $(event.target).next().next().find("span").css("background-color","red");
+ $(event.target).next().next().css("background-color","red");
} else {
checkingAnswers("box", getNeededElement(questionArray, currentQstId).answers, event.target.value, event.target.checked);
if(getNeededElement(questionArray, currentQstId).rightAns.replace(/,/g,"").indexOf(event.target.value + " ", 0) != -1)
- $(event.target).next().next().find("span").css("background-color","#6c0");
+ $(event.target).next().next().css("background-color","#6c0");
else
- $(event.target).next().next().find("span").css("background-color","red");
+ $(event.target).next().next().css("background-color","red");
}
}
});
@@ -462,7 +465,7 @@ function init(){
newAnswer = $("
");
var ansInput = $("
").appendTo(newAnswer);
var ansSpan = $("
" + ansCount + ".").appendTo(newAnswer);
- var ansContent = $("
" + array[i].answers[j].text + "
").appendTo(newAnswer);
+ var ansContent = $("
" + array[i].answers[j].text + "
").appendTo(newAnswer);
newAnswer.appendTo(ansDiv);
break;
case "2":
@@ -475,7 +478,7 @@ function init(){
newAnswer = $("
");
ansInput = $("
").appendTo(newAnswer);
ansSpan = $("
" + ansCount + ".").appendTo(newAnswer);
- ansContent = $("
" + array[i].answers[j].text + "
").appendTo(newAnswer);
+ ansContent = $("
" + array[i].answers[j].text + "
").appendTo(newAnswer);
newAnswer.appendTo(ansDiv);
break;
case "3":
diff --git a/resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js b/resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js
index e566f4b5..d2926669 100644
--- a/resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js
+++ b/resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js
@@ -102,11 +102,12 @@ function init(){
}
}
- if(sankore.preference("choisir_style","")){
- changeStyle(sankore.preference("choisir_style",""));
- $(".style_select").val(sankore.preference("choisir_style",""));
- } else
- changeStyle(1)
+ if(window.sankore)
+ if(sankore.preference("choisir_style","")){
+ changeStyle(sankore.preference("choisir_style",""));
+ $(".style_select").val(sankore.preference("choisir_style",""));
+ } else
+ changeStyle(1)
$("#wgt_display, #wgt_edit").click(function(event){
if(this.id == "wgt_display"){
@@ -118,8 +119,10 @@ function init(){
$("#wgt_edit").css("display", "block");
displayData(true);
mode = true;
- sankore.setPreference("qstArrayData", JSON.stringify(questionArray));
- sankore.setPreference("choisir_style", $(".style_select").find("option:selected").val());
+ if(window.sankore){
+ sankore.setPreference("qstArrayData", JSON.stringify(questionArray));
+ sankore.setPreference("choisir_style", $(".style_select").find("option:selected").val());
+ }
}
} else {
if(!$(this).hasClass("selected")){
@@ -312,15 +315,15 @@ function init(){
if(event.target.type == "radio"){
checkingAnswers("radio", getNeededElement(questionArray, currentQstId).answers, event.target.value);
if(event.target.value == getNeededElement(questionArray, currentQstId).rightAns)
- $(event.target).next().next().find("span").css("background-color","#6c0");
+ $(event.target).next().next().css("background-color","#6c0");
else
- $(event.target).next().next().find("span").css("background-color","red");
+ $(event.target).next().next().css("background-color","red");
} else {
checkingAnswers("box", getNeededElement(questionArray, currentQstId).answers, event.target.value, event.target.checked);
if(getNeededElement(questionArray, currentQstId).rightAns.replace(/,/g,"").indexOf(event.target.value + " ", 0) != -1)
- $(event.target).next().next().find("span").css("background-color","#6c0");
+ $(event.target).next().next().css("background-color","#6c0");
else
- $(event.target).next().next().find("span").css("background-color","red");
+ $(event.target).next().next().css("background-color","red");
}
}
});
@@ -462,7 +465,7 @@ function init(){
newAnswer = $("
");
var ansInput = $("
").appendTo(newAnswer);
var ansSpan = $("
" + ansCount + ".").appendTo(newAnswer);
- var ansContent = $("
" + array[i].answers[j].text + "
").appendTo(newAnswer);
+ var ansContent = $("
" + array[i].answers[j].text + "
").appendTo(newAnswer);
newAnswer.appendTo(ansDiv);
break;
case "2":
@@ -475,7 +478,7 @@ function init(){
newAnswer = $("
");
ansInput = $("
").appendTo(newAnswer);
ansSpan = $("
" + ansCount + ".").appendTo(newAnswer);
- ansContent = $("
" + array[i].answers[j].text + "
").appendTo(newAnswer);
+ ansContent = $("
" + array[i].answers[j].text + "
").appendTo(newAnswer);
newAnswer.appendTo(ansDiv);
break;
case "3":
diff --git a/resources/library/interactivities/Etudier.wgt/css/basic.css b/resources/library/interactivities/Etudier.wgt/css/basic.css
index da7d498b..ec2546dd 100644
--- a/resources/library/interactivities/Etudier.wgt/css/basic.css
+++ b/resources/library/interactivities/Etudier.wgt/css/basic.css
@@ -209,6 +209,11 @@ li>div{
border-radius: 10px;
}
+.real_text{
+ width: 100%;
+ height: 100%;
+}
+
.block_border{
border: 1px solid #999;
border-radius: 5px;
diff --git a/resources/library/interactivities/Etudier.wgt/js/script.js b/resources/library/interactivities/Etudier.wgt/js/script.js
index fd5852ff..1b7f9d25 100644
--- a/resources/library/interactivities/Etudier.wgt/js/script.js
+++ b/resources/library/interactivities/Etudier.wgt/js/script.js
@@ -83,7 +83,8 @@ function start(){
$(this).find(".size_up").remove();
$(this).find(".size_down").remove();
$(this).find(".resize_block").remove();
- $(this).removeAttr("contenteditable").removeClass("block_border");
+ $(this).find(".real_text").removeAttr("contenteditable");
+ $(this).removeClass("block_border");
$(this).css("position","absolute");
});
@@ -132,7 +133,8 @@ function start(){
$("
").appendTo($(this));
$("
").appendTo($(this));
$("
").appendTo($(this));
- $(this).attr("contenteditable", "true").addClass("block_border");
+ $(this).find(".real_text").attr("contenteditable", "true");
+ $(this).addClass("block_border");
});
container.find(".img_block").each(function(){
@@ -334,13 +336,13 @@ function start(){
$(".add_text").live("click", function(){
var container = $(this).parent();
- var text_block = $("
" + sankoreLang.new_txt + "
").appendTo(container);
+ var text_block = $("
" + sankoreLang.new_txt + "
").appendTo(container);
$("
").appendTo(text_block);
$("
").appendTo(text_block);
$("
").appendTo(text_block);
$("
").appendTo(text_block);
$("
").appendTo(text_block);
- text_block.attr("contenteditable", "true").addClass("block_border");
+ text_block.addClass("block_border");
});
}
@@ -359,7 +361,7 @@ function exportData(){
txt_block.h = $(this).height();
txt_block.w = $(this).width();
txt_block.fz = $(this).css("font-size");
- txt_block.val = $(this).text();
+ txt_block.val = $(this).find(".real_text").html();
cont_obj.text.push(txt_block);
});
cont_obj.imgs = [];
@@ -401,7 +403,7 @@ function importData(data){
var div = $("
").appendTo(li);
for(var j in data[i].text){
- var text_div = $("
" + data[i].text[j].val + "
");
+ var text_div = $("
" + data[i].text[j].val + "
");
text_div.draggable().css("position","absolute")
.width(data[i].text[j].w)
.height(data[i].text[j].h)
@@ -453,7 +455,7 @@ function showExample(){
var li1 = $("
");
var div1 = $("").appendTo(li1);
- $("
" + sankoreLang.text_content + "
").draggable().appendTo(div1)
+ $("
" + sankoreLang.text_content + "
").draggable().appendTo(div1)
li1.width($("#slider").width()).height($("#slider").height());
$("#slider ul").append(li1);
var li2 = $("
");
@@ -465,7 +467,7 @@ function showExample(){
var li3 = $("");
var div3 = $("").appendTo(li3);
li3.width($("#slider").width()).height($("#slider").height());
- $("
ololo
").draggable().appendTo(div3);
+ $("
" + sankoreLang.text_content + "
").draggable().appendTo(div3);
var audio_block = $("
").draggable().appendTo(div3);
$("
").appendTo(audio_block);
$("
").appendTo(audio_block);
@@ -475,7 +477,7 @@ function showExample(){
$("#slider ul").append(li3);
var li4 = $("
");
var div4 = $("").appendTo(li4);
- $("
" + sankoreLang.text_content + "
").draggable().appendTo(div4);
+ $("
" + sankoreLang.text_content + "
").draggable().appendTo(div4);
var img2 = $("
").draggable().appendTo(div4);
$("

").appendTo(img2);
var audio_block2 = $("
").draggable().appendTo(div4);
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 83a4a181..981e4775 100644
--- a/resources/library/interactivities/Etudier.wgt/locales/fr/js/script.js
+++ b/resources/library/interactivities/Etudier.wgt/locales/fr/js/script.js
@@ -83,7 +83,8 @@ function start(){
$(this).find(".size_up").remove();
$(this).find(".size_down").remove();
$(this).find(".resize_block").remove();
- $(this).removeAttr("contenteditable").removeClass("block_border");
+ $(this).find(".real_text").removeAttr("contenteditable");
+ $(this).removeClass("block_border");
$(this).css("position","absolute");
});
@@ -132,7 +133,8 @@ function start(){
$("
").appendTo($(this));
$("
").appendTo($(this));
$("
").appendTo($(this));
- $(this).attr("contenteditable", "true").addClass("block_border");
+ $(this).find(".real_text").attr("contenteditable", "true");
+ $(this).addClass("block_border");
});
container.find(".img_block").each(function(){
@@ -334,13 +336,13 @@ function start(){
$(".add_text").live("click", function(){
var container = $(this).parent();
- var text_block = $("
" + sankoreLang.new_txt + "
").appendTo(container);
+ var text_block = $("
" + sankoreLang.new_txt + "
").appendTo(container);
$("
").appendTo(text_block);
$("
").appendTo(text_block);
$("
").appendTo(text_block);
$("
").appendTo(text_block);
$("
").appendTo(text_block);
- text_block.attr("contenteditable", "true").addClass("block_border");
+ text_block.addClass("block_border");
});
}
@@ -359,7 +361,7 @@ function exportData(){
txt_block.h = $(this).height();
txt_block.w = $(this).width();
txt_block.fz = $(this).css("font-size");
- txt_block.val = $(this).text();
+ txt_block.val = $(this).find(".real_text").html();
cont_obj.text.push(txt_block);
});
cont_obj.imgs = [];
@@ -401,7 +403,7 @@ function importData(data){
var div = $("
").appendTo(li);
for(var j in data[i].text){
- var text_div = $("
" + data[i].text[j].val + "
");
+ var text_div = $("
" + data[i].text[j].val + "
");
text_div.draggable().css("position","absolute")
.width(data[i].text[j].w)
.height(data[i].text[j].h)
@@ -455,7 +457,7 @@ function showExample(){
var li1 = $("
");
var div1 = $("").appendTo(li1);
- $("
" + sankoreLang.text_content + "
").draggable().appendTo(div1)
+ $("
" + sankoreLang.text_content + "
").draggable().appendTo(div1)
li1.width($("#slider").width()).height($("#slider").height());
$("#slider ul").append(li1);
var li2 = $("
");
@@ -476,7 +478,7 @@ function showExample(){
$("#slider ul").append(li3);
var li4 = $("");
var div4 = $("").appendTo(li4);
- $("
" + sankoreLang.text_content + "
").draggable().appendTo(div4);
+ $("
" + sankoreLang.text_content + "
").draggable().appendTo(div4);
var img2 = $("
").draggable().appendTo(div4);
$("

").appendTo(img2);
var audio_block2 = $("
").draggable().appendTo(div4);