some widgets fixes

preferencesAboutTextFull
unknown 13 years ago
parent 332b5f8a88
commit f482d9f057
  1. 3
      resources/library/interactivities/Ass images.wgt/css/basic.css
  2. 5
      resources/library/interactivities/Ass images.wgt/index.html
  3. 9
      resources/library/interactivities/Ass images.wgt/js/script.js
  4. 8
      resources/library/interactivities/Ass sons.wgt/css/basic.css
  5. 3
      resources/library/interactivities/Ass sons.wgt/js/script.js
  6. 3
      resources/library/interactivities/Cat images.wgt/index.html
  7. 12
      resources/library/interactivities/Cat images.wgt/js/script.js
  8. 6
      resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js
  9. 2
      resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js
  10. 8
      resources/library/interactivities/Cat text.wgt/css/basic.css
  11. 4
      resources/library/interactivities/Cat text.wgt/js/script.js
  12. 2
      resources/library/interactivities/Choisir.wgt/config.xml
  13. 18
      resources/library/interactivities/Choisir.wgt/css/basic.css
  14. 29
      resources/library/interactivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js
  15. 29
      resources/library/interactivities/Choisir.wgt/locales/ru/scripts/selQuestionApp.js
  16. 29
      resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js
  17. 5
      resources/library/interactivities/Etudier.wgt/css/basic.css
  18. 20
      resources/library/interactivities/Etudier.wgt/js/script.js
  19. 18
      resources/library/interactivities/Etudier.wgt/locales/fr/js/script.js

@ -107,12 +107,13 @@ body{
.text_cont{
width: 80%;
min-height: 40px;
max-height: 60px;
float: right;
overflow: auto;
background-color: #ccc;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
padding-left: 10px;
/*font-family: 'SFToontimeRegular';*/
}
.close_cont{

@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="css/basic.css"/>
<link rel="stylesheet" href="css/fonts/Lobster/stylesheet.css">
<link rel="stylesheet" href="css/fonts/SF-Toontime/stylesheet.css">
<link rel="stylesheet" href="css/fonts/SF-Toontime/stylesheet.css">
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.9.custom.min.js"></script>
<script type="text/javascript" src="js/script.js"></script>
@ -17,7 +17,8 @@
} else
lang = "en";
if(lang == "en"){
sankore.enableDropOnWidget(false);
if(window.sankore)
sankore.enableDropOnWidget(false);
start();
}
else{

@ -57,7 +57,8 @@ function start(){
$("#wgt_display, #wgt_edit").click(function(event){
if(this.id == "wgt_display"){
if(!$(this).hasClass("selected")){
sankore.enableDropOnWidget(false);
if(window.sankore)
sankore.enableDropOnWidget(false);
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
$(".style_select").css("display","none");
@ -160,7 +161,8 @@ function start(){
}
} else {
if(!$(this).hasClass("selected")){
sankore.enableDropOnWidget(true);
if(window.sankore)
sankore.enableDropOnWidget(true);
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
$(".style_select").css("display","block");
@ -307,7 +309,8 @@ function exportData(){
array_to_export.push(cont_obj);
}
sankore.setPreference("associer", JSON.stringify(array_to_export));
if(window.sankore)
sankore.setPreference("associer", JSON.stringify(array_to_export));
}
//import

@ -107,6 +107,7 @@ body{
.text_cont{
width: 80%;
min-height: 40px;
max-height: 60px;
float: right;
background-color: #999;
border-top-left-radius: 20px;
@ -211,9 +212,10 @@ body{
}
.audio_desc{
min-height: 30px;
margin: 5px 0;
float: left;
width: 73%;
max-height: 40px;
overflow-y: auto;
float: right;
margin-left: 20px;
}

@ -353,7 +353,8 @@ function exportData(){
array_to_export.push(cont_obj);
});
}
sankore.setPreference("associer_sound", JSON.stringify(array_to_export));
if(window.sankore)
sankore.setPreference("associer_sound", JSON.stringify(array_to_export));
}
//import

@ -17,7 +17,8 @@
} else
lang = "en";
if(lang == "en"){
sankore.enableDropOnWidget(false);
if(window.sankore)
sankore.enableDropOnWidget(false);
start();
}
else{

@ -61,7 +61,8 @@ function start(){
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
$(".style_select").css("display","none");
sankore.enableDropOnWidget(false);
if(window.sankore)
sankore.enableDropOnWidget(false);
$(".add_block").remove();
$(".cont").each(function(){
var container = $(this);
@ -131,7 +132,8 @@ function start(){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
$(".style_select").css("display","block");
sankore.enableDropOnWidget(true);
if(window.sankore)
sankore.enableDropOnWidget(true);
$(".cont").each(function(){
var container = $(this);
@ -208,7 +210,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();
@ -273,8 +275,8 @@ function exportData(){
cont_obj.tmp = "clear";
array_to_export.push(cont_obj);
}
sankore.setPreference("categoriser_images", JSON.stringify(array_to_export));
if(window.sankore)
sankore.setPreference("categoriser_images", JSON.stringify(array_to_export));
}
//import

@ -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();

@ -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();

@ -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;

@ -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

@ -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">

@ -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;
}

@ -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 = $("<div class='newAnswer'>");
var ansInput = $("<input type='radio' name='" + counter + "' value='" + array[i].answers[j].value + "' " + local_state + " style='float: left; margin-right: 10px;'/>").appendTo(newAnswer);
var ansSpan = $("<span class='ansSpanDisplay'>" + ansCount + ".</span>").appendTo(newAnswer);
var ansContent = $("<div class='ansContentDisplay'><span id='answerText' " + local_color + ">" + array[i].answers[j].text + "</span></div>").appendTo(newAnswer);
var ansContent = $("<div class='ansContentDisplay' " + local_color + "><span id='answerText'>" + array[i].answers[j].text + "</span></div>").appendTo(newAnswer);
newAnswer.appendTo(ansDiv);
break;
case "2":
@ -475,7 +478,7 @@ function init(){
newAnswer = $("<div class='newAnswer'>");
ansInput = $("<input type='checkbox' value='" + array[i].answers[j].value + "' " + local_state + " style='float: left; margin-right: 10px;'/>").appendTo(newAnswer);
ansSpan = $("<span class='ansSpanDisplay'>" + ansCount + ".</span>").appendTo(newAnswer);
ansContent = $("<div class='ansContentDisplay'><span id='answerText' " + local_color + ">" + array[i].answers[j].text + "</span></div>").appendTo(newAnswer);
ansContent = $("<div class='ansContentDisplay' " + local_color + "><span id='answerText'>" + array[i].answers[j].text + "</span></div>").appendTo(newAnswer);
newAnswer.appendTo(ansDiv);
break;
case "3":

@ -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 = $("<div class='newAnswer'>");
var ansInput = $("<input type='radio' name='" + counter + "' value='" + array[i].answers[j].value + "' " + local_state + " style='float: left; margin-right: 10px;'/>").appendTo(newAnswer);
var ansSpan = $("<span class='ansSpanDisplay'>" + ansCount + ".</span>").appendTo(newAnswer);
var ansContent = $("<div class='ansContentDisplay'><span id='answerText' " + local_color + ">" + array[i].answers[j].text + "</span></div>").appendTo(newAnswer);
var ansContent = $("<div class='ansContentDisplay' " + local_color + "><span id='answerText'>" + array[i].answers[j].text + "</span></div>").appendTo(newAnswer);
newAnswer.appendTo(ansDiv);
break;
case "2":
@ -475,7 +478,7 @@ function init(){
newAnswer = $("<div class='newAnswer'>");
ansInput = $("<input type='checkbox' value='" + array[i].answers[j].value + "' " + local_state + " style='float: left; margin-right: 10px;'/>").appendTo(newAnswer);
ansSpan = $("<span class='ansSpanDisplay'>" + ansCount + ".</span>").appendTo(newAnswer);
ansContent = $("<div class='ansContentDisplay'><span id='answerText' " + local_color + ">" + array[i].answers[j].text + "</span></div>").appendTo(newAnswer);
ansContent = $("<div class='ansContentDisplay' " + local_color + "><span id='answerText'>" + array[i].answers[j].text + "</span></div>").appendTo(newAnswer);
newAnswer.appendTo(ansDiv);
break;
case "3":

@ -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 = $("<div class='newAnswer'>");
var ansInput = $("<input type='radio' name='" + counter + "' value='" + array[i].answers[j].value + "' " + local_state + " style='float: left; margin-right: 10px;'/>").appendTo(newAnswer);
var ansSpan = $("<span class='ansSpanDisplay'>" + ansCount + ".</span>").appendTo(newAnswer);
var ansContent = $("<div class='ansContentDisplay'><span id='answerText' " + local_color + ">" + array[i].answers[j].text + "</span></div>").appendTo(newAnswer);
var ansContent = $("<div class='ansContentDisplay' " + local_color + "><span id='answerText'>" + array[i].answers[j].text + "</span></div>").appendTo(newAnswer);
newAnswer.appendTo(ansDiv);
break;
case "2":
@ -475,7 +478,7 @@ function init(){
newAnswer = $("<div class='newAnswer'>");
ansInput = $("<input type='checkbox' value='" + array[i].answers[j].value + "' " + local_state + " style='float: left; margin-right: 10px;'/>").appendTo(newAnswer);
ansSpan = $("<span class='ansSpanDisplay'>" + ansCount + ".</span>").appendTo(newAnswer);
ansContent = $("<div class='ansContentDisplay'><span id='answerText' " + local_color + ">" + array[i].answers[j].text + "</span></div>").appendTo(newAnswer);
ansContent = $("<div class='ansContentDisplay' " + local_color + "><span id='answerText'>" + array[i].answers[j].text + "</span></div>").appendTo(newAnswer);
newAnswer.appendTo(ansDiv);
break;
case "3":

@ -209,6 +209,11 @@ li>div{
border-radius: 10px;
}
.real_text{
width: 100%;
height: 100%;
}
.block_border{
border: 1px solid #999;
border-radius: 5px;

@ -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(){
$("<div class='size_up' contenteditable='false'>").appendTo($(this));
$("<div class='size_down' contenteditable='false'>").appendTo($(this));
$("<div class='resize_block' contenteditable='false'>").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 = $("<div class='text_block'>" + sankoreLang.new_txt + "</div>").appendTo(container);
var text_block = $("<div class='text_block'><div class='real_text' contenteditable='true'>" + sankoreLang.new_txt + "</div></div>").appendTo(container);
$("<div class='move_block' contenteditable='false'>").appendTo(text_block);
$("<div class='close_img' contenteditable='false'>").appendTo(text_block);
$("<div class='size_up' contenteditable='false'>").appendTo(text_block);
$("<div class='size_down' contenteditable='false'>").appendTo(text_block);
$("<div class='resize_block' contenteditable='false'>").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 = $("<div>").appendTo(li);
for(var j in data[i].text){
var text_div = $("<div class='text_block'>" + data[i].text[j].val + "</div>");
var text_div = $("<div class='text_block'><div class='real_text'>" + data[i].text[j].val + "</div></div>");
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 = $("<li>");
var div1 = $("<div>").appendTo(li1);
$("<div class='text_block'>" + sankoreLang.text_content + "</div>").draggable().appendTo(div1)
$("<div class='text_block'><div class='real_text'>" + sankoreLang.text_content + "</div></div>").draggable().appendTo(div1)
li1.width($("#slider").width()).height($("#slider").height());
$("#slider ul").append(li1);
var li2 = $("<li>");
@ -465,7 +467,7 @@ function showExample(){
var li3 = $("<li>");
var div3 = $("<div>").appendTo(li3);
li3.width($("#slider").width()).height($("#slider").height());
$("<div class='text_block'>ololo</div>").draggable().appendTo(div3);
$("<div class='text_block'><div class='real_text'>" + sankoreLang.text_content + "</div></div>").draggable().appendTo(div3);
var audio_block = $("<div class='audio_block'>").draggable().appendTo(div3);
$("<div class='play'>").appendTo(audio_block);
$("<div class='replay'>").appendTo(audio_block);
@ -475,7 +477,7 @@ function showExample(){
$("#slider ul").append(li3);
var li4 = $("<li>");
var div4 = $("<div>").appendTo(li4);
$("<div class='text_block'>" + sankoreLang.text_content + "</div>").draggable().appendTo(div4);
$("<div class='text_block'><div class='real_text'>" + sankoreLang.text_content + "</div></div>").draggable().appendTo(div4);
var img2 = $("<div class='img_block' style='text-align: center;'></div>").draggable().appendTo(div4);
$("<img src=\"objects/1.gif\" style=\"display: inline;\" height=\"120\"/>").appendTo(img2);
var audio_block2 = $("<div class='audio_block'>").draggable().appendTo(div4);

@ -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(){
$("<div class='size_up' contenteditable='false'>").appendTo($(this));
$("<div class='size_down' contenteditable='false'>").appendTo($(this));
$("<div class='resize_block' contenteditable='false'>").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 = $("<div class='text_block'>" + sankoreLang.new_txt + "</div>").appendTo(container);
var text_block = $("<div class='text_block'><div class='real_text' contenteditable='true'>" + sankoreLang.new_txt + "</div></div>").appendTo(container);
$("<div class='move_block' contenteditable='false'>").appendTo(text_block);
$("<div class='close_img' contenteditable='false'>").appendTo(text_block);
$("<div class='size_up' contenteditable='false'>").appendTo(text_block);
$("<div class='size_down' contenteditable='false'>").appendTo(text_block);
$("<div class='resize_block' contenteditable='false'>").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 = $("<div>").appendTo(li);
for(var j in data[i].text){
var text_div = $("<div class='text_block'>" + data[i].text[j].val + "</div>");
var text_div = $("<div class='text_block'><div class='real_text'>" + data[i].text[j].val + "</div></div>");
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 = $("<li>");
var div1 = $("<div>").appendTo(li1);
$("<div class='text_block'>" + sankoreLang.text_content + "</div>").draggable().appendTo(div1)
$("<div class='text_block'><div class='real_text'>" + sankoreLang.text_content + "</div></div>").draggable().appendTo(div1)
li1.width($("#slider").width()).height($("#slider").height());
$("#slider ul").append(li1);
var li2 = $("<li>");
@ -476,7 +478,7 @@ function showExample(){
$("#slider ul").append(li3);
var li4 = $("<li>");
var div4 = $("<div>").appendTo(li4);
$("<div class='text_block'>" + sankoreLang.text_content + "</div>").draggable().appendTo(div4);
$("<div class='text_block'><div class='real_text'>" + sankoreLang.text_content + "</div></div>").draggable().appendTo(div4);
var img2 = $("<div class='img_block' style='text-align: center;'></div>").draggable().appendTo(div4);
$("<img src=\"../../objects/1.gif\" style=\"display: inline;\" height=\"120\"/>").appendTo(img2);
var audio_block2 = $("<div class='audio_block'>").draggable().appendTo(div4);

Loading…
Cancel
Save