|
|
@ -1,5 +1,11 @@ |
|
|
|
|
|
|
|
|
|
|
|
var sankoreLang = {display: "D'affichage", edit: "Modifier", short_desc: "Placez les photos dans l'ordre croissant.", add: "Nouveau bloc"}; |
|
|
|
var sankoreLang = { |
|
|
|
|
|
|
|
display: "D'affichage",
|
|
|
|
|
|
|
|
edit: "Modifier",
|
|
|
|
|
|
|
|
short_desc: "Placez les photos dans l'ordre croissant.",
|
|
|
|
|
|
|
|
add: "Nouveau bloc", |
|
|
|
|
|
|
|
enter: "Entrez votre texte ici ..." |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
//main function
|
|
|
|
//main function
|
|
|
|
function start(){ |
|
|
|
function start(){ |
|
|
@ -19,15 +25,16 @@ function start(){ |
|
|
|
showExample(); |
|
|
|
showExample(); |
|
|
|
|
|
|
|
|
|
|
|
//events
|
|
|
|
//events
|
|
|
|
$("body").live("mouseout",function(){ |
|
|
|
if (window.widget) { |
|
|
|
if(event.target.tagName == "BODY") |
|
|
|
window.widget.onleave = function(){ |
|
|
|
if(window.sankore) |
|
|
|
exportData(); |
|
|
|
exportData(); |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$("#display, #edit").click(function(event){ |
|
|
|
$("#display, #edit").click(function(event){ |
|
|
|
if(this.id == "display"){ |
|
|
|
if(this.id == "display"){ |
|
|
|
if(!$(this).hasClass("selected")){ |
|
|
|
if(!$(this).hasClass("selected")){ |
|
|
|
|
|
|
|
sankore.enableDropOnWidget(false); |
|
|
|
$(this).addClass("selected"); |
|
|
|
$(this).addClass("selected"); |
|
|
|
$("#display_img").removeClass("red_point").addClass("green_point"); |
|
|
|
$("#display_img").removeClass("red_point").addClass("green_point"); |
|
|
|
$("#edit_img").removeClass("green_point").addClass("red_point"); |
|
|
|
$("#edit_img").removeClass("green_point").addClass("red_point"); |
|
|
@ -72,6 +79,7 @@ function start(){ |
|
|
|
} |
|
|
|
} |
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if(!$(this).hasClass("selected")){ |
|
|
|
if(!$(this).hasClass("selected")){ |
|
|
|
|
|
|
|
sankore.enableDropOnWidget(true); |
|
|
|
$(this).addClass("selected"); |
|
|
|
$(this).addClass("selected"); |
|
|
|
$("#edit_img").removeClass("red_point").addClass("green_point"); |
|
|
|
$("#edit_img").removeClass("red_point").addClass("green_point"); |
|
|
|
$("#display_img").removeClass("green_point").addClass("red_point"); |
|
|
|
$("#display_img").removeClass("green_point").addClass("red_point"); |
|
|
@ -274,7 +282,7 @@ function addContainer(){ |
|
|
|
|
|
|
|
|
|
|
|
var close = $("<div class='close_cont'>").appendTo(container); |
|
|
|
var close = $("<div class='close_cont'>").appendTo(container); |
|
|
|
var number = $("<div class='number_cont'>"+ ($(".cont").size() + 1) +"</div>").appendTo(sub_container); |
|
|
|
var number = $("<div class='number_cont'>"+ ($(".cont").size() + 1) +"</div>").appendTo(sub_container); |
|
|
|
var text = $("<div class='text_cont' contenteditable>Enter your text here ... </div>").appendTo(sub_container); |
|
|
|
var text = $("<div class='text_cont' contenteditable>" + sankoreLang.enter + "</div>").appendTo(sub_container); |
|
|
|
|
|
|
|
|
|
|
|
$("<input type='hidden' value='1*2*3*4*5*'/>").appendTo(imgs_container); |
|
|
|
$("<input type='hidden' value='1*2*3*4*5*'/>").appendTo(imgs_container); |
|
|
|
var add_img = $("<div class='add_img'>").appendTo(imgs_container); |
|
|
|
var add_img = $("<div class='add_img'>").appendTo(imgs_container); |
|
|
|