").appendTo(audio_block);
var source = $("
").attr("src", "");
@@ -762,10 +767,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");
@@ -779,10 +784,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");
@@ -796,10 +801,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;
}
}
@@ -850,7 +855,7 @@ function onDropAudio(obj, event) {
textData = stringToXML(textData);
var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent;
var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent;
- if(tmp_type.substr(0, 5) == "audio"){
+ if(tmp_type.substr(0, 5) == "audio"){
var audio_block = $(obj);
$(obj).find("audio").remove();
audio_block.find(":first-child").removeClass("stop").addClass("play");
diff --git a/resources/library/interactivities/Cat images.wgt/css/basic.css b/resources/library/interactivities/Cat images.wgt/css/basic.css
index 1fd13dc1..a808c635 100644
--- a/resources/library/interactivities/Cat images.wgt/css/basic.css
+++ b/resources/library/interactivities/Cat images.wgt/css/basic.css
@@ -3,7 +3,7 @@ html, body{
height: 100%;
margin: 0;
padding: 0;
- border-radius: 50px;
+ border-radius: 35px;
overflow: hidden;
}
@@ -28,14 +28,6 @@ body{
margin: 5px 10px;
}
-.green_point{
- background-image: url(../img/green_point.png);
-}
-
-.red_point{
- background-image: url(../img/red_point.png);
-}
-
#display_text, #edit_text{
height: 19px;
padding: 3px 0 0 0;
@@ -264,57 +256,40 @@ body{
margin: 10px 10px 0 10px;
padding: 0;
float: left;
- /*font-family: "Lobster13Regular";*/
+ font-family: Arial,Helvetica,sans-serif;
font-size: 24px;
- color: #8c5730;
+ color: #7F613F;
+ text-shadow: #FFDCA9 0 1px 0;
}
#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{
cursor: pointer;
- height: 44px;
margin: 10px 10px 0 0;
float: right;
- /*font-family: "Lobster13Regular";*/
- font-size: 24px;
- color: #8c5730;
+ font-family: Arial,Helvetica,sans-serif;
+ font-size: 24px;
+ line-height: 32px;
}
#wgt_display{
- padding-left: 40px;
- background-image: url(../img/slate-edit.png);
- background-repeat: no-repeat;
- background-position: top 0;
+ padding-left: 35px;
+ background: url(../img/toolbar-edit.png) left -32px no-repeat;
+ color: white;
display: none;
}
#wgt_edit{
- padding-left: 40px;
- background-image: url(../img/slate-edit.png);
- background-repeat: no-repeat;
- background-position: top 0;
+ padding-left: 35px;
+ background: url(../img/slate-toolbar-edit.png) left top no-repeat;
+ color: #7F613F;
+ text-shadow: #FFDCA9 0 1px 0;
}
#wgt_reload{
- padding-left: 40px;
- background-image: url(../img/slate-toolbar-reload.png);
- background-repeat: no-repeat;
- background-position: top 0;
-}
-
-.style_select{
- width: 120px;
- /*font-family: "Lobster13Regular";*/
- font-size: 24px;
- float: right;
- margin: 10px 20px 0 0;
- border-radius: 10px;
- background-image: url(../img/ar_down.png);
- background-color: #d4aa79;
- color: #8c5730;
- background-position: 105px 11px;
- background-repeat: no-repeat;
- -webkit-appearance: menulist-text;
- display: none;
+ padding-left: 35px;
+ background: url(../img/slate-toolbar-reload.png) left top no-repeat;
+ color: #7F613F;
+ text-shadow: #FFDCA9 0 1px 0;
}
.btl_pad{
@@ -349,51 +324,50 @@ body{
background-image: url(../img/pad-bottom-right.png) !important;
}
-.pad_color{
- color: white !important;
+.without_radius{
+ border-radius: 0 !important;
}
-.pad_reload{
- background-image: url(../img/slate-toolbar-reload-white.png) !important;
+.without_back{
+ background: none !important;
}
-.pad_edit{
- background-image: url(../img/slate-display.png) !important;
+.pad_color{
+ color: #FC9 !important;
+ text-shadow: none !important;
}
-.pad_select{
- background-color: black !important;
- color: white !important;
- background-image: url(../img/ar_down_white.png) !important;
+.pad_reload{
+ background: url(../img/toolbar-reload.png) left top no-repeat !important;
}
-.without_radius{
- border-radius: 0 !important;
+.pad_edit{
+ background: url(../img/toolbar-edit.png) left top no-repeat !important;
}
-.without_back{
- background: none !important;
+.pad_help{
+ background: url(../img/toolbar-help.png) left top no-repeat !important;
}
-.none_select{
- background-color: #333 !important;
+.help_wood{
+ background: url(../img/slate-toolbar-help.png) left -32px no-repeat !important;
color: white !important;
- background-image: url(../img/ar_down_white.png) !important;
+ text-shadow: #7F613F 0 -1px 0 !important;
}
-.pad_help{
- background-image: url(../img/slate-help-white.png) !important;
+.help_pad{
+ background: url(../img/toolbar-help.png) left -32px no-repeat !important;
+ color: white !important;
}
#wgt_help{
- padding-left: 32px;
- background-image: url(../img/slate-help.png);
- background-repeat: no-repeat;
- background-position: top 0;
+ padding-left: 35px;
+ background: url(../img/slate-toolbar-help.png) left top no-repeat;
+ color: #7F613F;
+ text-shadow: #FFDCA9 0 1px 0;
}
#help{
- width: 100%;
height: 100%;
overflow: auto;
display: none;
@@ -402,5 +376,36 @@ body{
}
.open{
-
+
+}
+
+#parameters{
+ display: none;
+ padding: 10px 20px;
+ background: url("../img/parameters-bg.png");
+ border-radius: 4px 4px 0 0;
+}
+
+.inline{
+ display: inline-block;
+ font-family: "helvetica neue";
+ font-size: 14px;
+ color: #666;
+}
+
+#parameters label {
+ font-style: italic;
+}
+
+#style_select{
+ margin-left: 10px;
+}
+
+.display_wood{
+ background: url(../img/slate-toolbar-edit.png) left -32px no-repeat !important;
+ text-shadow: #7F613F 0 -1px 0;
+}
+
+.radius_ft{
+ border-radius: 45px !important;
}
\ No newline at end of file
diff --git a/resources/library/interactivities/Cat images.wgt/img/ar_down.png b/resources/library/interactivities/Cat images.wgt/img/ar_down.png
deleted file mode 100644
index a20fab4f..00000000
Binary files a/resources/library/interactivities/Cat images.wgt/img/ar_down.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/ar_down_white.png b/resources/library/interactivities/Cat images.wgt/img/ar_down_white.png
deleted file mode 100644
index 4a1d133b..00000000
Binary files a/resources/library/interactivities/Cat images.wgt/img/ar_down_white.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/parameters-bg.png b/resources/library/interactivities/Cat images.wgt/img/parameters-bg.png
new file mode 100644
index 00000000..36f648e1
Binary files /dev/null and b/resources/library/interactivities/Cat images.wgt/img/parameters-bg.png differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/slate-display.png b/resources/library/interactivities/Cat images.wgt/img/slate-display.png
deleted file mode 100644
index 96166143..00000000
Binary files a/resources/library/interactivities/Cat images.wgt/img/slate-display.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/slate-edit.png b/resources/library/interactivities/Cat images.wgt/img/slate-edit.png
deleted file mode 100644
index 17f5fc5c..00000000
Binary files a/resources/library/interactivities/Cat images.wgt/img/slate-edit.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/slate-help-white.png b/resources/library/interactivities/Cat images.wgt/img/slate-help-white.png
deleted file mode 100644
index 7b5ebfd8..00000000
Binary files a/resources/library/interactivities/Cat images.wgt/img/slate-help-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/slate-help.png b/resources/library/interactivities/Cat images.wgt/img/slate-help.png
deleted file mode 100644
index 069052d0..00000000
Binary files a/resources/library/interactivities/Cat images.wgt/img/slate-help.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-help.png b/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-help.png
new file mode 100644
index 00000000..fb7cdeba
Binary files /dev/null and b/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-help.png differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-reload-white.png b/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-reload-white.png
deleted file mode 100644
index 78d146ec..00000000
Binary files a/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-reload-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-reload.png b/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-reload.png
index 685a5cb2..844169a9 100644
Binary files a/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-reload.png and b/resources/library/interactivities/Cat images.wgt/img/slate-toolbar-reload.png differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/toolbar-edit.png b/resources/library/interactivities/Cat images.wgt/img/toolbar-edit.png
new file mode 100644
index 00000000..daa338cd
Binary files /dev/null and b/resources/library/interactivities/Cat images.wgt/img/toolbar-edit.png differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/toolbar-help.png b/resources/library/interactivities/Cat images.wgt/img/toolbar-help.png
new file mode 100644
index 00000000..6c4454c0
Binary files /dev/null and b/resources/library/interactivities/Cat images.wgt/img/toolbar-help.png differ
diff --git a/resources/library/interactivities/Cat images.wgt/img/toolbar-reload.png b/resources/library/interactivities/Cat images.wgt/img/toolbar-reload.png
new file mode 100644
index 00000000..340d7371
Binary files /dev/null and b/resources/library/interactivities/Cat images.wgt/img/toolbar-reload.png differ
diff --git a/resources/library/interactivities/Cat images.wgt/index.html b/resources/library/interactivities/Cat images.wgt/index.html
index 688bb52f..ba84f225 100644
--- a/resources/library/interactivities/Cat images.wgt/index.html
+++ b/resources/library/interactivities/Cat images.wgt/index.html
@@ -51,12 +51,7 @@
-
-
-
-
-
-
+
@@ -66,7 +61,17 @@
diff --git a/resources/library/interactivities/Cat images.wgt/js/script.js b/resources/library/interactivities/Cat images.wgt/js/script.js
index ecf2d8aa..cf2f6d0c 100644
--- a/resources/library/interactivities/Cat images.wgt/js/script.js
+++ b/resources/library/interactivities/Cat images.wgt/js/script.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- display: "Display",
+ display: "Close",
edit: "Edit",
first_desc: "Odd numbers",
second_desc: "Even numbers",
@@ -11,7 +11,8 @@ var sankoreLang = {
pad: "Pad",
none: "None",
help: "Help",
- help_content: "This is an example of help content ..."
+ help_content: "This is an example of help content ...",
+ theme: "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("categoriser_images","")){
@@ -47,11 +50,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 {
+ } 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");
@@ -72,7 +77,7 @@ function start(){
exportData();
});
- $(".style_select").change(function (event){
+ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@@ -81,7 +86,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
- $(".style_select").css("display","none");
+ $("#parameters").css("display","none");
if(window.sankore)
sankore.enableDropOnWidget(false);
$(".add_block").remove();
@@ -152,7 +157,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
if(window.sankore)
sankore.enableDropOnWidget(true);
$(".cont").each(function(){
@@ -234,7 +239,7 @@ function exportData(){
if($("#wgt_edit").hasClass("selected")){
$(".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.mode = "edit";
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
@@ -258,7 +263,7 @@ function exportData(){
} else {
$(".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.mode = "display";
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
@@ -292,7 +297,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);
}
@@ -307,11 +312,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);
}
if(data[i].mode == "edit"){
var tmp_array = [];
@@ -625,10 +630,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");
@@ -642,10 +647,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");
@@ -659,10 +664,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;
}
}
diff --git a/resources/library/interactivities/Cat images.wgt/locales/fr/index.html b/resources/library/interactivities/Cat images.wgt/locales/fr/index.html
index 7d188794..d8c5b635 100644
--- a/resources/library/interactivities/Cat images.wgt/locales/fr/index.html
+++ b/resources/library/interactivities/Cat images.wgt/locales/fr/index.html
@@ -25,12 +25,7 @@
-
-
-
-
-
-
+
@@ -40,7 +35,17 @@
diff --git a/resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js b/resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js
index aad7172e..5b20fcd1 100644
--- a/resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js
+++ b/resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- display: "Afficher",
+ display: "Fermer",
edit: "Modifier",
first_desc: "Les nombres impairs",
second_desc: "Les nombres pairs",
@@ -12,25 +12,26 @@ var sankoreLang = {
none: "aucun",
help: "Aide",
help_content: "
Catégoriser des images "+
-"
Classer des images en fonction de la dénomination de la catégorie. "+
+ "
Classer des images en fonction de la dénomination de la catégorie. "+
-"
L’activité s’effectue par un glisser-déposer de l’image dans la catégorie correspondante. Tant que toutes les images d’une catégorie ne sont pas classées, la zone reste rouge. Une fois que toutes les images sont classées dans la bonne catégorie, la zone se colore en vert.
"+
-"
Le bouton “Recharger” réinitialise les exercices.
"+
+ "
L’activité s’effectue par un glisser-déposer de l’image dans la catégorie correspondante. Tant que toutes les images d’une catégorie ne sont pas classées, la zone reste rouge. Une fois que toutes les images sont classées dans la bonne catégorie, la zone se colore en vert.
"+
+ "
Le bouton “Recharger” réinitialise les exercices.
"+
-"
Le bouton “Modifier” vous permet :
"+
-"
de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut aucun) , "+
-"de modifier un exercice ou d’en créer de nouveaux dans la même activité. "+
+ "
Le bouton “Modifier” vous permet :
"+
+ "
de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut aucun) , "+
+ "de modifier un exercice ou d’en créer de nouveaux dans la même activité. "+
-"
En mode édition, pour créer un nouvel exercice, cliquez sur “Nouveau bloc” en bas, une zone bleue apparaît, c’est une catégorie, puis
"+
-"
insérez le nom de la catégorie (par exemple “fruits”, “légumes”, “mammifères”...) en cliquant dans le champ de texte “Saisir le nom de la catégorie ici …”, "+
-"insérez des images dans la catégorie par glisser-déposer des images à partir de votre bibliothèque, "+
-"ajoutez ensuite une catégorie (ou plusieurs) en cliquant sur le signe “+” situé à droite de la catégorie, complétez par son nom et ajoutez des images. "+
-"
Pour supprimer une image, cliquez sur la croix située dans le coin supérieur droit de l’image.
"+
-"
Pour supprimer une catégorie, cliquez sur le signe “-” situé à droite de celle-ci.
"+
+ "
En mode édition, pour créer un nouvel exercice, cliquez sur “Nouveau bloc” en bas, une zone bleue apparaît, c’est une catégorie, puis
"+
+ "
insérez le nom de la catégorie (par exemple “fruits”, “légumes”, “mammifères”...) en cliquant dans le champ de texte “Saisir le nom de la catégorie ici …”, "+
+ "insérez des images dans la catégorie par glisser-déposer des images à partir de votre bibliothèque, "+
+ "ajoutez ensuite une catégorie (ou plusieurs) en cliquant sur le signe “+” situé à droite de la catégorie, complétez par son nom et ajoutez des images. "+
+ "
Pour supprimer une image, cliquez sur la croix située dans le coin supérieur droit de l’image.
"+
+ "
Pour supprimer une catégorie, cliquez sur le signe “-” situé à droite de celle-ci.
"+
-"
Pour supprimer un exercice, cliquez sur la croix à gauche du numéro de l’exercice.
"+
+ "
Pour supprimer un exercice, cliquez sur la croix à gauche du numéro de l’exercice.
"+
-"
Le bouton “Afficher” vous permet d’utiliser l’activité.
"
+ "
Le bouton “Afficher” vous permet d’utiliser l’activité.
",
+ theme: "Thème"
};
//main function
@@ -42,9 +43,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("categoriser_images","")){
@@ -66,11 +69,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 {
+ } 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");
@@ -91,7 +96,7 @@ function start(){
exportData();
});
- $(".style_select").change(function (event){
+ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@@ -100,7 +105,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
- $(".style_select").css("display","none");
+ $("#parameters").css("display","none");
sankore.enableDropOnWidget(false);
$(".add_block").remove();
$(".cont").each(function(){
@@ -170,7 +175,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
sankore.enableDropOnWidget(true);
$(".cont").each(function(){
var container = $(this);
@@ -251,7 +256,7 @@ function exportData(){
if($("#wgt_edit").hasClass("selected")){
$(".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.mode = "edit";
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
@@ -275,7 +280,7 @@ function exportData(){
} else {
$(".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.mode = "display";
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
@@ -309,7 +314,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);
}
@@ -324,11 +329,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);
}
if(data[i].mode == "edit"){
var tmp_array = [];
@@ -656,10 +661,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");
@@ -673,10 +678,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");
@@ -690,10 +695,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;
}
}
diff --git a/resources/library/interactivities/Cat images.wgt/locales/ru/index.html b/resources/library/interactivities/Cat images.wgt/locales/ru/index.html
index 10f242f8..66f8ca12 100644
--- a/resources/library/interactivities/Cat images.wgt/locales/ru/index.html
+++ b/resources/library/interactivities/Cat images.wgt/locales/ru/index.html
@@ -26,11 +26,6 @@
-
-
-
-
-
@@ -40,7 +35,17 @@
diff --git a/resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js b/resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js
index dc92f1e6..06844011 100644
--- a/resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js
+++ b/resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- display: "Показать",
+ display: "Закрыть",
edit: "Изменить",
first_desc: "Нечетные числа",
second_desc: "Четные числа",
@@ -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("categoriser_images","")){
@@ -47,11 +50,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 {
+ } 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");
@@ -72,7 +77,7 @@ function start(){
exportData();
});
- $(".style_select").change(function (event){
+ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@@ -81,7 +86,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
- $(".style_select").css("display","none");
+ $("#parameters").css("display","none");
sankore.enableDropOnWidget(false);
$(".add_block").remove();
$(".cont").each(function(){
@@ -151,7 +156,7 @@ function start(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
sankore.enableDropOnWidget(true);
$(".cont").each(function(){
var container = $(this);
@@ -232,7 +237,7 @@ function exportData(){
if($("#wgt_edit").hasClass("selected")){
$(".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.mode = "edit";
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
@@ -244,8 +249,7 @@ function exportData(){
$(this).find(".img_block").each(function(){
var img_obj = new Object();
img_obj.value = $(this).find("input").val();
- img_obj.link = $(this).find("img").attr("src").replace("../../","");
- ;
+ img_obj.link = $(this).find("img").attr("src").replace("../../","");
img_obj.ht = $(this).find("img").height();
img_obj.wd = $(this).find("img").width();
img_cont.imgs.push(img_obj);
@@ -257,7 +261,7 @@ function exportData(){
} else {
$(".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.mode = "display";
cont_obj.conts = [];
$(this).find(".imgs_cont").each(function(){
@@ -269,8 +273,7 @@ function exportData(){
$(this).find(".img_block").each(function(){
var img_obj = new Object();
img_obj.value = $(this).find("input").val();
- img_obj.link = $(this).find("img").attr("src").replace("../../","");
- ;
+ img_obj.link = $(this).find("img").attr("src").replace("../../","");
img_obj.ht = $(this).find("img").height();
img_obj.wd = $(this).find("img").width();
img_cont.imgs.push(img_obj);
@@ -281,8 +284,7 @@ function exportData(){
$(this).find(".all_imgs .img_block").each(function(){
var img = new Object();
img.value = $(this).find("input").val();
- img.link = $(this).find("img").attr("src").replace("../../","");
- ;
+ img.link = $(this).find("img").attr("src").replace("../../","");
img.ht = $(this).find("img").height();
img.wd = $(this).find("img").width();
cont_obj.all_imgs.push(img);
@@ -293,7 +295,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);
}
@@ -308,11 +310,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);
}
if(data[i].mode == "edit"){
var tmp_array = [];
@@ -640,10 +642,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");
@@ -657,10 +659,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");
@@ -674,10 +676,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;
}
}
@@ -689,7 +691,7 @@ function returnId(){
}
//a func for checking when smth will drop
-function checkOnDrop(dest){
+function checkOnDrop(dest){
var tmp_count = dest.find("input[name='count']").val();
var tmp_mask = dest.find("input[name='mask']").val();
if(dest.find(".img_block").size() == tmp_count){
diff --git a/src/adaptors/UBImportDocument.cpp b/src/adaptors/UBImportDocument.cpp
index 0bf32c82..ca5944f3 100644
--- a/src/adaptors/UBImportDocument.cpp
+++ b/src/adaptors/UBImportDocument.cpp
@@ -171,8 +171,11 @@ UBDocumentProxy* UBImportDocument::importFile(const QFile& pFile, const QString&
return NULL;
}
-
- UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocumentFromDir(documentRootFolder, pGroup);
+ bool addTitlePage = false;
+ if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool() && !QFile(documentRootFolder+"/page000.svg").exists())
+ addTitlePage=true;
+
+ UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocumentFromDir(documentRootFolder, pGroup, "", false, addTitlePage);
UBApplication::showMessage(tr("Import successful."));
return newDocument;
}
diff --git a/src/board/UBBoardView.cpp b/src/board/UBBoardView.cpp
index a29e8e63..1d68cc8a 100644
--- a/src/board/UBBoardView.cpp
+++ b/src/board/UBBoardView.cpp
@@ -308,7 +308,6 @@ UBBoardView::event (QEvent * e)
if (gestureEvent)
{
QSwipeGesture* swipe = dynamic_cast
(gestureEvent->gesture (Qt::SwipeGesture));
-
if (swipe)
{
if (swipe->horizontalDirection () == QSwipeGesture::Left)
@@ -363,9 +362,7 @@ void UBBoardView::tabletEvent (QTabletEvent * event)
QPointF scenePos = viewportTransform ().inverted ().map (tabletPos);
qreal pressure = 1.0;
- if (((currentTool == UBStylusTool::Pen || currentTool == UBStylusTool::Line)
- && mPenPressureSensitive)
- || (currentTool == UBStylusTool::Marker && mMarkerPressureSensitive))
+ if (((currentTool == UBStylusTool::Pen || currentTool == UBStylusTool::Line) && mPenPressureSensitive) || (currentTool == UBStylusTool::Marker && mMarkerPressureSensitive))
pressure = event->pressure ();
diff --git a/src/core/UBApplication.cpp b/src/core/UBApplication.cpp
index deb11c6e..a2043121 100644
--- a/src/core/UBApplication.cpp
+++ b/src/core/UBApplication.cpp
@@ -130,6 +130,8 @@ UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSing
|| args.contains("log");
+ setupTranslators(args);
+
UBResources::resources();
if (!undoStack)
@@ -139,8 +141,6 @@ UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSing
UBSettings *settings = UBSettings::settings();
- setupTranslators(args);
-
connect(settings->appToolBarPositionedAtTop, SIGNAL(changed(QVariant)), this, SLOT(toolBarPositionChanged(QVariant)));
connect(settings->appToolBarDisplayText, SIGNAL(changed(QVariant)), this, SLOT(toolBarDisplayTextChanged(QVariant)));
updateProtoActionsState();
diff --git a/src/core/UBPersistenceManager.cpp b/src/core/UBPersistenceManager.cpp
index 7224a789..f1806705 100644
--- a/src/core/UBPersistenceManager.cpp
+++ b/src/core/UBPersistenceManager.cpp
@@ -265,7 +265,7 @@ UBDocumentProxy* UBPersistenceManager::createDocument(const QString& pGroupName,
return doc;
}
-UBDocumentProxy* UBPersistenceManager::createDocumentFromDir(const QString& pDocumentDirectory, const QString& pGroupName, const QString& pName, bool withEmptyPage)
+UBDocumentProxy* UBPersistenceManager::createDocumentFromDir(const QString& pDocumentDirectory, const QString& pGroupName, const QString& pName, bool withEmptyPage, bool addTitlePage)
{
checkIfDocumentRepositoryExists();
@@ -280,7 +280,8 @@ UBDocumentProxy* UBPersistenceManager::createDocumentFromDir(const QString& pDoc
{
doc->setMetaData(UBSettings::documentName, pName);
}
- if (withEmptyPage) createDocumentSceneAt(doc, 0);
+ if(withEmptyPage) createDocumentSceneAt(doc, 0);
+ if(addTitlePage) persistDocumentScene(doc, mSceneCache.createScene(doc, 0, false), 0);
QMap metadatas = UBMetadataDcSubsetAdaptor::load(pDocumentDirectory);
diff --git a/src/core/UBPersistenceManager.h b/src/core/UBPersistenceManager.h
index 60ce57c2..6a514bcb 100644
--- a/src/core/UBPersistenceManager.h
+++ b/src/core/UBPersistenceManager.h
@@ -47,7 +47,7 @@ class UBPersistenceManager : public QObject
static void destroy();
virtual UBDocumentProxy* createDocument(const QString& pGroupName = "", const QString& pName = "", bool withEmptyPage = true);
- virtual UBDocumentProxy* createDocumentFromDir(const QString& pDocumentDirectory, const QString& pGroupName = "", const QString& pName = "", bool withEmptyPage = false);
+ virtual UBDocumentProxy* createDocumentFromDir(const QString& pDocumentDirectory, const QString& pGroupName = "", const QString& pName = "", bool withEmptyPage = false, bool addTitlePage = false);
virtual UBDocumentProxy* persistDocumentMetadata(UBDocumentProxy* pDocumentProxy);
diff --git a/src/core/main.cpp b/src/core/main.cpp
index 28a631b7..55c4e0a8 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -129,7 +129,7 @@ int main(int argc, char *argv[])
QObject::connect(&app, SIGNAL(messageReceived(const QString&)), &app, SLOT(handleOpenMessage(const QString&)));
- qDebug() << fileToOpen;
+ qDebug() << "file name argument" << fileToOpen;
int result = app.exec(fileToOpen);
app.cleanup();
diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp
index 1b48cbf0..621dc9a4 100644
--- a/src/domain/UBGraphicsScene.cpp
+++ b/src/domain/UBGraphicsScene.cpp
@@ -582,8 +582,8 @@ bool UBGraphicsScene::inputDeviceRelease()
addItem(pStrokes);
mDrawWithCompass = false;
- }else if (mCurrentStroke)
- {
+ }
+ else if (mCurrentStroke){
UBGraphicsStrokesGroup* pStrokes = new UBGraphicsStrokesGroup();
// Remove the strokes that were just drawn here and replace them by a stroke item
@@ -629,8 +629,8 @@ bool UBGraphicsScene::inputDeviceRelease()
if (mCurrentStroke && mCurrentStroke->polygons().empty()){
delete mCurrentStroke;
+ mCurrentStroke = NULL;
}
- mCurrentStroke = NULL;
return accepted;
}
@@ -2302,10 +2302,12 @@ void UBGraphicsScene::setToolCursor(int tool)
if (mCurrentStroke && mCurrentStroke->polygons().empty()){
delete mCurrentStroke;
+ mCurrentStroke = NULL;
}
- mCurrentStroke = NULL;
+
}
-void UBGraphicsScene::initStroke(){
+void UBGraphicsScene::initStroke()
+{
mCurrentStroke = new UBGraphicsStroke();
}
diff --git a/src/domain/UBGraphicsWidgetItem.cpp b/src/domain/UBGraphicsWidgetItem.cpp
index 5bd2b725..53ecc53a 100644
--- a/src/domain/UBGraphicsWidgetItem.cpp
+++ b/src/domain/UBGraphicsWidgetItem.cpp
@@ -563,7 +563,8 @@ void UBGraphicsWidgetItem::injectInlineJavaScript()
void UBGraphicsWidgetItem::paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
- if (scene()->renderingContext() != UBGraphicsScene::Screen)
+
+ if (scene() && scene()->renderingContext() != UBGraphicsScene::Screen)
{
painter->drawPixmap(0, 0, snapshot());
}
@@ -622,52 +623,52 @@ void UBGraphicsWidgetItem::mainFrameLoadFinished (bool ok)
update(boundingRect());
}
-void UBGraphicsWidgetItem::wheelEvent(QGraphicsSceneWheelEvent *event)
-{
- if (Delegate()->weelEvent(event))
- {
- QGraphicsWebView::wheelEvent(event);
- event->accept();
- }
-}
-
-QVariant UBGraphicsWidgetItem::itemChange(GraphicsItemChange change, const QVariant &value)
-{
- if ((change == QGraphicsItem::ItemSelectedHasChanged) && scene()) {
- if (isSelected())
- scene()->setActiveWindow(this);
- else
- if(scene()->activeWindow() == this)
- scene()->setActiveWindow(0);
- }
-
- QVariant newValue = Delegate()->itemChange(change, value);
- return QGraphicsWebView::itemChange(change, newValue);
-}
-
-void UBGraphicsWidgetItem::resize(qreal w, qreal h)
-{
- UBGraphicsWidgetItem::resize(QSizeF(w, h));
-}
-
-
-void UBGraphicsWidgetItem::resize(const QSizeF & pSize)
-{
- if (pSize != size()) {
- QGraphicsWebView::setMaximumSize(pSize.width(), pSize.height());
- QGraphicsWebView::resize(pSize.width(), pSize.height());
- if (Delegate())
- Delegate()->positionHandles();
- if (scene())
- scene()->setModified(true);
- }
-}
-
-QSizeF UBGraphicsWidgetItem::size() const
-{
- return QGraphicsWebView::size();
-}
-
+void UBGraphicsWidgetItem::wheelEvent(QGraphicsSceneWheelEvent *event)
+{
+ if (Delegate()->weelEvent(event))
+ {
+ QGraphicsWebView::wheelEvent(event);
+ event->accept();
+ }
+}
+
+QVariant UBGraphicsWidgetItem::itemChange(GraphicsItemChange change, const QVariant &value)
+{
+ if ((change == QGraphicsItem::ItemSelectedHasChanged) && scene()) {
+ if (isSelected())
+ scene()->setActiveWindow(this);
+ else
+ if(scene()->activeWindow() == this)
+ scene()->setActiveWindow(0);
+ }
+
+ QVariant newValue = Delegate()->itemChange(change, value);
+ return QGraphicsWebView::itemChange(change, newValue);
+}
+
+void UBGraphicsWidgetItem::resize(qreal w, qreal h)
+{
+ UBGraphicsWidgetItem::resize(QSizeF(w, h));
+}
+
+
+void UBGraphicsWidgetItem::resize(const QSizeF & pSize)
+{
+ if (pSize != size()) {
+ QGraphicsWebView::setMaximumSize(pSize.width(), pSize.height());
+ QGraphicsWebView::resize(pSize.width(), pSize.height());
+ if (Delegate())
+ Delegate()->positionHandles();
+ if (scene())
+ scene()->setModified(true);
+ }
+}
+
+QSizeF UBGraphicsWidgetItem::size() const
+{
+ return QGraphicsWebView::size();
+}
+
UBGraphicsAppleWidgetItem::UBGraphicsAppleWidgetItem(const QUrl& pWidgetUrl, QGraphicsItem *parent)
diff --git a/src/gui/UBFeaturesWidget.cpp b/src/gui/UBFeaturesWidget.cpp
index ab965689..e5e6ab69 100644
--- a/src/gui/UBFeaturesWidget.cpp
+++ b/src/gui/UBFeaturesWidget.cpp
@@ -12,10 +12,6 @@
const char *UBFeaturesWidget::objNamePathList = "PathList";
const char *UBFeaturesWidget::objNameFeatureList = "FeatureList";
-const QString UBFeaturesNewFolderDialog::acceptText = tr("Accept");
-const QString UBFeaturesNewFolderDialog::cancelText = tr("Cancel");
-const QString UBFeaturesNewFolderDialog::labelText = tr("Enter a new folder name");
-
const QMargins FeatureListMargins(0, 0, 0, 30);
const int FeatureListBorderOffset = 10;
const char featureTypeSplitter = ':';
@@ -198,7 +194,6 @@ void UBFeaturesWidget::lockIt(bool pLock)
mActionBar->setEnabled(!pLock);
pathListView->setEnabled(!pLock);
centralWidget->setLockedExcludingAdditional(pLock);
-// pathListView->setLocked(true);
}
void UBFeaturesWidget::addToFavorite( const UBFeaturesMimeData * mimeData )
@@ -578,6 +573,9 @@ void UBFeaturesCentralWidget::scanFinished()
}
UBFeaturesNewFolderDialog::UBFeaturesNewFolderDialog(QWidget *parent) : QWidget(parent)
+ , acceptText(tr("Accept"))
+ , cancelText(tr("Cancel"))
+ , labelText(tr("Enter a new folder name"))
{
this->setStyleSheet("background:white;");
diff --git a/src/gui/UBFeaturesWidget.h b/src/gui/UBFeaturesWidget.h
index a86f6697..e4fb9775 100644
--- a/src/gui/UBFeaturesWidget.h
+++ b/src/gui/UBFeaturesWidget.h
@@ -193,9 +193,9 @@ public:
void setLockedExcludingAdditional(bool pLock);
QStackedWidget *mStackedWidget;
- UBFeaturesNavigatorWidget *mNavigator;
- UBFeatureProperties *mFeatureProperties;
- UBFeaturesWebView *webView;
+ UBFeaturesNavigatorWidget *mNavigator;
+ UBFeatureProperties *mFeatureProperties;
+ UBFeaturesWebView *webView;
QStackedWidget *mAdditionalDataContainer;
@@ -226,10 +226,6 @@ class UBFeaturesNewFolderDialog : public QWidget
Q_OBJECT
public:
- static const QString acceptText;
- static const QString cancelText;
- static const QString labelText;
-
UBFeaturesNewFolderDialog(QWidget *parent = 0);
void setRegexp(const QRegExp pRegExp);
bool validString(const QString &pStr);
@@ -249,7 +245,9 @@ private:
QRegExpValidator *mValidator;
QStringList mFileNameList;
QPushButton *acceptButton;
-
+ const QString acceptText;
+ const QString cancelText;
+ const QString labelText;
};
class UBFeaturesProgressInfo: public QWidget {