|
|
@ -2,7 +2,8 @@ var sankoreLang = { |
|
|
|
display: "Display",
|
|
|
|
display: "Display",
|
|
|
|
edit: "Edit",
|
|
|
|
edit: "Edit",
|
|
|
|
short_desc: "Select the number \"three\".",
|
|
|
|
short_desc: "Select the number \"three\".",
|
|
|
|
add: "Add new block" |
|
|
|
add: "Add new block", |
|
|
|
|
|
|
|
enter: "Enter your condition here ..." |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
//main function
|
|
|
|
//main function
|
|
|
@ -22,15 +23,16 @@ function start(){ |
|
|
|
else
|
|
|
|
else
|
|
|
|
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"); |
|
|
@ -131,6 +133,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"); |
|
|
@ -567,7 +570,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 condition 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); |
|
|
|