diff --git a/resources/nonDistributedWidgets/Etudier.wgt/css/basic.css b/resources/nonDistributedWidgets/Etudier.wgt/css/basic.css index ba1e714c..da7d498b 100644 --- a/resources/nonDistributedWidgets/Etudier.wgt/css/basic.css +++ b/resources/nonDistributedWidgets/Etudier.wgt/css/basic.css @@ -76,6 +76,28 @@ body{ cursor: pointer; } +.size_up{ + width: 20px; + height: 20px; + background-repeat: no-repeat; + position: absolute; + background-image: url(../img/size_up.png); + top: -15px; + right: 20px; + cursor: pointer; +} + +.size_down{ + width: 20px; + height: 20px; + background-repeat: no-repeat; + position: absolute; + background-image: url(../img/size_down.png); + top: -15px; + right: 45px; + cursor: pointer; +} + .dropHere{ background-color: #ccc; } @@ -183,6 +205,8 @@ li>div{ position: absolute; top: 50px; left: 100px; + background-color: white; + border-radius: 10px; } .block_border{ diff --git a/resources/nonDistributedWidgets/Etudier.wgt/img/size_down.png b/resources/nonDistributedWidgets/Etudier.wgt/img/size_down.png new file mode 100644 index 00000000..7de2f90b Binary files /dev/null and b/resources/nonDistributedWidgets/Etudier.wgt/img/size_down.png differ diff --git a/resources/nonDistributedWidgets/Etudier.wgt/img/size_up.png b/resources/nonDistributedWidgets/Etudier.wgt/img/size_up.png new file mode 100644 index 00000000..b8462642 Binary files /dev/null and b/resources/nonDistributedWidgets/Etudier.wgt/img/size_up.png differ diff --git a/resources/nonDistributedWidgets/Etudier.wgt/img/turn_left.png b/resources/nonDistributedWidgets/Etudier.wgt/img/turn_left.png index fdf264d0..dec05d2e 100644 Binary files a/resources/nonDistributedWidgets/Etudier.wgt/img/turn_left.png and b/resources/nonDistributedWidgets/Etudier.wgt/img/turn_left.png differ diff --git a/resources/nonDistributedWidgets/Etudier.wgt/img/turn_right.png b/resources/nonDistributedWidgets/Etudier.wgt/img/turn_right.png index c0ba9ca7..d3dec5a3 100644 Binary files a/resources/nonDistributedWidgets/Etudier.wgt/img/turn_right.png and b/resources/nonDistributedWidgets/Etudier.wgt/img/turn_right.png differ diff --git a/resources/nonDistributedWidgets/Etudier.wgt/index.html b/resources/nonDistributedWidgets/Etudier.wgt/index.html index a950cea7..a2913915 100644 --- a/resources/nonDistributedWidgets/Etudier.wgt/index.html +++ b/resources/nonDistributedWidgets/Etudier.wgt/index.html @@ -48,8 +48,7 @@   -
-
+
diff --git a/resources/nonDistributedWidgets/Etudier.wgt/locales/fr/js/script.js b/resources/nonDistributedWidgets/Etudier.wgt/locales/fr/js/script.js index 024d040a..83a4a181 100644 --- a/resources/nonDistributedWidgets/Etudier.wgt/locales/fr/js/script.js +++ b/resources/nonDistributedWidgets/Etudier.wgt/locales/fr/js/script.js @@ -5,7 +5,6 @@ var sankoreLang = { new_txt: "Nouveau bloc de texte", new_slide: "Ceci est une nouvelle diapositive.", wgt_name: "Etudier", - reload: "Recharger", slate: "Bois", pad: "Pad" }; @@ -27,7 +26,6 @@ function start(){ $("#wgt_display").text(sankoreLang.display); $("#wgt_edit").text(sankoreLang.edit); $("#wgt_name").text(sankoreLang.wgt_name); - $("#wgt_reload").text(sankoreLang.reload); $(".style_select option[value='1']").text(sankoreLang.slate); $(".style_select option[value='2']").text(sankoreLang.pad); @@ -52,13 +50,12 @@ function start(){ window.widget.onleave = function(){ exportData(); sankore.setPreference("etudier_style", $(".style_select").find("option:selected").val()); + sankore.setPreference("etudier_cur_page", $("#slider").getPage()); + sankore.setPreference("etudier_left_nav", $("#prevBtn a").css("display")); + sankore.setPreference("etudier_right_nav", $("#nextBtn a").css("display")); } } - $("#wgt_reload").click(function(){ - window.location.reload(); - }); - $(".style_select").change(function (event){ changeStyle($(this).find("option:selected").val()); }) @@ -83,6 +80,8 @@ function start(){ $(this).draggable(); $(this).find(".move_block").remove(); $(this).find(".close_img").remove(); + $(this).find(".size_up").remove(); + $(this).find(".size_down").remove(); $(this).find(".resize_block").remove(); $(this).removeAttr("contenteditable").removeClass("block_border"); $(this).css("position","absolute"); @@ -130,6 +129,8 @@ function start(){ $(this).draggable("destroy"); $("
").appendTo($(this)); $("
").appendTo($(this)); + $("
").appendTo($(this)); + $("
").appendTo($(this)); $("
").appendTo($(this)); $(this).attr("contenteditable", "true").addClass("block_border"); }); @@ -169,6 +170,20 @@ function start(){ $(this).parent().remove(); }); + //increase a size of text + $(".size_up").live("click", function(){ + $(this).parent().height(""); + var fz = parseInt($(this).parent().css("font-size").replace("px", "")); + $(this).parent().css("font-size", fz+1 + "px"); + }); + + //decrease a size of text + $(".size_down").live("click", function(){ + var fz = parseInt($(this).parent().css("font-size").replace("px", "")); + fz = ((fz - 1) < 8)?8:fz-1; + $(this).parent().css("font-size", fz + "px"); + }); + //play/pause event $(".play, .stop").live("click", function(){ var tmp_audio = $(this); @@ -250,7 +265,7 @@ function start(){ var height = resize_obj.object.parent().height() - resize_obj.top + event.clientY; resize_obj.left = event.clientX; resize_obj.top = event.clientY; - resize_obj.object.parent().css("width", width).css("height",height); + resize_obj.object.parent().width(width).height(height); } else { width = resize_obj.object.parent().width() - resize_obj.left + event.clientX; height = resize_obj.object.parent().height() - resize_obj.top + event.clientY; @@ -258,8 +273,8 @@ function start(){ var img_height = resize_obj.object.parent().find("img").height() - resize_obj.top + event.clientY; resize_obj.left = event.clientX; resize_obj.top = event.clientY; - resize_obj.object.parent().css("width", width).css("height",height); - resize_obj.object.parent().find("img").css("width", img_width).css("height", img_height); + resize_obj.object.parent().width(width).height(height); + resize_obj.object.parent().find("img").width(img_width).height(img_height); } } }); @@ -322,6 +337,8 @@ function start(){ 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"); }); @@ -341,6 +358,7 @@ function exportData(){ txt_block.left = $(this).position().left; txt_block.h = $(this).height(); txt_block.w = $(this).width(); + txt_block.fz = $(this).css("font-size"); txt_block.val = $(this).text(); cont_obj.text.push(txt_block); }); @@ -389,6 +407,7 @@ function importData(data){ .height(data[i].text[j].h) .css("top", data[i].text[j].top) .css("left", data[i].text[j].left) + .css("font-size", data[i].text[j].fz) .appendTo(div); } @@ -419,11 +438,16 @@ function importData(data){ } + $(window).trigger("resize") + $("#slider").width(width).height(height).easySlider({ prevText: '', nextText: '', controlsShow: false }); + $("#slider").goToSlide(sankore.preference("etudier_cur_page","")); + $("#prevBtn a").css("display", sankore.preference("etudier_left_nav","")); + $("#nextBtn a").css("display", sankore.preference("etudier_right_nav","")); } //example @@ -497,7 +521,6 @@ function changeStyle(val){ $(".b_bottom_right").removeClass("bbr_pad"); $(".b_bottom_left").removeClass("bbl_pad"); $(".b_bottom_center").removeClass("bbc_pad"); - $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_display").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_name").removeClass("pad_color"); @@ -511,7 +534,6 @@ function changeStyle(val){ $(".b_bottom_right").addClass("bbr_pad"); $(".b_bottom_left").addClass("bbl_pad"); $(".b_bottom_center").addClass("bbc_pad"); - $("#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"); diff --git a/resources/nonDistributedWidgets/Etudier.wgt/locales/ru/index.html b/resources/nonDistributedWidgets/Etudier.wgt/locales/ru/index.html index bbf41496..67244de2 100644 --- a/resources/nonDistributedWidgets/Etudier.wgt/locales/ru/index.html +++ b/resources/nonDistributedWidgets/Etudier.wgt/locales/ru/index.html @@ -22,8 +22,7 @@   -
-
+