|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
|
|
|
|
|
var sankoreLang = { |
|
|
|
|
display: "Показать",
|
|
|
|
|
display: "Закрыть",
|
|
|
|
|
edit: "Изменить",
|
|
|
|
|
short_desc: "Расположите картинки в порядке возрастания цифр.",
|
|
|
|
|
add: "Новый блок", |
|
|
|
@ -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("odr_des_imgs","")){ |
|
|
|
@ -48,11 +51,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 { |
|
|
|
|
($("#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"); |
|
|
|
@ -73,7 +78,7 @@ function start(){ |
|
|
|
|
exportData(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$(".style_select").change(function (event){ |
|
|
|
|
$("#style_select").change(function (event){ |
|
|
|
|
changeStyle($(this).find("option:selected").val()); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
@ -83,7 +88,7 @@ function start(){ |
|
|
|
|
sankore.enableDropOnWidget(false); |
|
|
|
|
$(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); |
|
|
|
@ -129,7 +134,7 @@ function start(){ |
|
|
|
|
sankore.enableDropOnWidget(true); |
|
|
|
|
$(this).addClass("selected"); |
|
|
|
|
$("#wgt_display").removeClass("selected"); |
|
|
|
|
$(".style_select").css("display","block"); |
|
|
|
|
$("#parameters").css("display","block"); |
|
|
|
|
$(".cont").each(function(){ |
|
|
|
|
var container = $(this); |
|
|
|
|
|
|
|
|
@ -213,7 +218,7 @@ function exportData(){ |
|
|
|
|
} |
|
|
|
|
$(".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.text = $(this).find(".text_cont").text(); |
|
|
|
|
cont_obj.right = $(this).find(".imgs_cont>input").val(); |
|
|
|
|
cont_obj.imgs = []; |
|
|
|
@ -230,7 +235,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); |
|
|
|
|
} |
|
|
|
@ -248,11 +253,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); |
|
|
|
|
} |
|
|
|
|
var tmp_array = []; |
|
|
|
|
var container = $("<div class='cont'>"); |
|
|
|
@ -443,10 +448,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"); |
|
|
|
@ -460,10 +465,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"); |
|
|
|
@ -477,10 +482,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; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -518,7 +523,6 @@ function onDropTarget(obj, event) { |
|
|
|
|
tmp_img.attr("height",h); |
|
|
|
|
tmp_img.css("margin",(120 - tmp_img.height())/2 + "px 0"); |
|
|
|
|
} |
|
|
|
|
exportData(); |
|
|
|
|
}, 6) |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|