diff --git a/Sankore_3.1.pro b/Sankore_3.1.pro
index 5f1a5b9e..fcc3143b 100644
--- a/Sankore_3.1.pro
+++ b/Sankore_3.1.pro
@@ -11,7 +11,7 @@ CONFIG += debug_and_release \
VERSION_MAJ = 2
VERSION_MIN = 00
VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error
-VERSION_PATCH = 08
+VERSION_PATCH = 09
VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}"
VERSION = $$replace(VERSION, "\\.r", "")
diff --git a/plugins/cffadaptor/src/UBCFFAdaptor.cpp b/plugins/cffadaptor/src/UBCFFAdaptor.cpp
index 5630c01d..f5c84068 100644
--- a/plugins/cffadaptor/src/UBCFFAdaptor.cpp
+++ b/plugins/cffadaptor/src/UBCFFAdaptor.cpp
@@ -550,8 +550,8 @@ QDomElement UBCFFAdaptor::UBToCFFConverter::parsePage(const QString &pageFileNam
pageFile.close();
return QDomElement();
}
- } else if (tagname == tUBZGroup) {
- group = parseGroupPageSection(nextTopElement);
+ } else if (tagname == tUBZGroups) {
+ group = parseGroupsPageSection(nextTopElement);
if (group.isNull()) {
qDebug() << "Page doesn't contains any groups.";
pageFile.close();
@@ -634,6 +634,7 @@ QDomElement UBCFFAdaptor::UBToCFFConverter::parseSvgPageSection(const QDomElemen
else if (tagName == tUBZLine) parseUBZLine(nextElement, svgElements);
else if (tagName == tUBZPolygon) parseUBZPolygon(nextElement, svgElements);
else if (tagName == tUBZPolyline) parseUBZPolyline(nextElement, svgElements);
+ else if (tagName == tUBZGroups) parseGroupsPageSection(nextElement);
nextElement = nextElement.nextSiblingElement();
}
@@ -694,12 +695,34 @@ bool UBCFFAdaptor::UBToCFFConverter::writeExtendedIwbSection()
// extended element options
// editable, background, locked are supported for now
-QDomElement UBCFFAdaptor::UBToCFFConverter::parseGroupPageSection(const QDomElement &element)
+QDomElement UBCFFAdaptor::UBToCFFConverter::parseGroupsPageSection(const QDomElement &groupRoot)
{
// First sankore side implementation needed. TODO in Sankore 1.5
- Q_UNUSED(element)
+ if (!groupRoot.hasChildNodes()) {
+ qDebug() << "Group root is empty";
+ return QDomElement();
+ }
+
+ QDomElement groupElement = groupRoot.firstChildElement();
+
+ while (!groupElement.isNull()) {
+ QDomElement extendedElement = mDataModel->createElementNS(iwbNS, groupElement.tagName());
+ QDomElement groupChildElement = groupElement.firstChildElement();
+ while (!groupChildElement.isNull()) {
+ QDomElement extSubElement = mDataModel->createElementNS(iwbNS, groupChildElement.tagName());
+ extSubElement.setAttribute(aRef, groupChildElement.attribute(aID, QUuid().toString()));
+ extendedElement.appendChild(extSubElement);
+
+ groupChildElement = groupChildElement.nextSiblingElement();
+ }
+
+ mExtendedElements.append(extendedElement);
+
+ groupElement = groupElement.nextSiblingElement();
+ }
+
qDebug() << "parsing ubz group section";
- return QDomElement();
+ return groupRoot;
}
QString UBCFFAdaptor::UBToCFFConverter::getDstContentFolderName(const QString &elementType)
@@ -1250,6 +1273,19 @@ bool UBCFFAdaptor::UBToCFFConverter::setCFFAttribute(const QString &attributeNam
{
setGeometryFromUBZ(ubzElement, svgElement);
}
+ else
+ if (attributeName.contains(aUBZUuid))
+ {
+
+ QString parentId = ubzElement.attribute(aUBZParent);
+ QString id;
+ if (!parentId.isEmpty())
+ id = "{" + parentId + "}" + "{" + ubzElement.attribute(aUBZUuid)+"}";
+ else
+ id = "{" + ubzElement.attribute(aUBZUuid)+"}";
+
+ svgElement.setAttribute(aID, id);
+ }
else
if (attributeName.contains(aUBZHref)||attributeName.contains(aSrc))
{
@@ -1799,7 +1835,10 @@ bool UBCFFAdaptor::UBToCFFConverter::parseUBZPolygon(const QDomElement &element,
if (0 < iwbElementPart.attributes().count())
{
- QString id = QUuid::createUuid().toString();
+ QString id = svgElementPart.attribute(aUBZUuid);
+ if (id.isEmpty())
+ id = QUuid::createUuid().toString();
+
svgElementPart.setAttribute(aID, id);
iwbElementPart.setAttribute(aRef, id);
diff --git a/plugins/cffadaptor/src/UBCFFAdaptor.h b/plugins/cffadaptor/src/UBCFFAdaptor.h
index d9891460..f38d51e0 100644
--- a/plugins/cffadaptor/src/UBCFFAdaptor.h
+++ b/plugins/cffadaptor/src/UBCFFAdaptor.h
@@ -63,7 +63,7 @@ private:
QDomElement parseSvgPageSection(const QDomElement &element);
void writeQDomElementToXML(const QDomNode &node);
bool writeExtendedIwbSection();
- QDomElement parseGroupPageSection(const QDomElement &element);
+ QDomElement parseGroupsPageSection(const QDomElement &groupRoot);
bool createBackground(const QDomElement &element, QMultiMap &dstSvgList);
QString createBackgroundImage(const QDomElement &element, QSize size);
diff --git a/plugins/cffadaptor/src/UBCFFConstants.h b/plugins/cffadaptor/src/UBCFFConstants.h
index adeeb507..69de92dd 100644
--- a/plugins/cffadaptor/src/UBCFFConstants.h
+++ b/plugins/cffadaptor/src/UBCFFConstants.h
@@ -28,6 +28,7 @@ const QString tIWBPageSet = "pageset";
const QString tId = "id";
const QString tElement = "element";
const QString tUBZGroup = "group";
+const QString tUBZGroups = "groups";
const QString tUBZG = "g";
const QString tUBZPolygon = "polygon";
const QString tUBZPolyline = "polyline";
@@ -67,6 +68,7 @@ const QString aBackground = "background";
const QString aCrossedBackground = "crossed-background";
const QString aUBZType = "type";
const QString aUBZUuid = "uuid";
+const QString aUBZParent = "parent";
const QString aFill = "fill"; // IWB attribute contans color to fill
const QString aID = "id"; // ID of any svg element can be placed in to iwb section
@@ -334,8 +336,10 @@ stroke-lineshape-end \
const QString ubzElementAttributesToConvert(" \
xlink:href, \
src, \
-transform \
-");
+transform, \
+uuid \
+"
+);
// additional attributes. Have references in SVG section.
const QString svgElementAttributes(" \
@@ -376,4 +380,4 @@ struct UBItemLayerType
};
};
-#endif // UBCFFCONSTANTS_H
\ No newline at end of file
+#endif // UBCFFCONSTANTS_H
diff --git a/resources/i18n/sankore_fr.ts b/resources/i18n/sankore_fr.ts
index 6b2894cf..88f25d5a 100644
--- a/resources/i18n/sankore_fr.ts
+++ b/resources/i18n/sankore_fr.ts
@@ -377,7 +377,7 @@
Show Desktop
- Afficher le bureau
+ Bureau
Ctrl+Shift+H
@@ -1961,7 +1961,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ?
Add a link
- Ajouter un lien.web
+ Ajouter un lien web
Page: %0
diff --git a/resources/i18n/sankore_fr_CH.ts b/resources/i18n/sankore_fr_CH.ts
index 6b2894cf..88f25d5a 100644
--- a/resources/i18n/sankore_fr_CH.ts
+++ b/resources/i18n/sankore_fr_CH.ts
@@ -377,7 +377,7 @@
Show Desktop
- Afficher le bureau
+ Bureau
Ctrl+Shift+H
@@ -1961,7 +1961,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ?
Add a link
- Ajouter un lien.web
+ Ajouter un lien web
Page: %0
diff --git a/resources/library/applications/Nuancier.wgt/js/colorpicker.js b/resources/library/applications/Nuancier.wgt/js/colorpicker.js
index 0c7080ff..b5ac79ed 100644
--- a/resources/library/applications/Nuancier.wgt/js/colorpicker.js
+++ b/resources/library/applications/Nuancier.wgt/js/colorpicker.js
@@ -70,12 +70,12 @@
$("div.tools_change").removeClass("tools_compass");
window.sankore.setTool('pen');
window.sankore.setPenColor('#' + HSBToHex(hsb));
- sankore.returnStatus("PEN installed", penFlag);
+ //sankore.returnStatus("PEN installed", penFlag);
} else {
$("div.tools_change").addClass("tools_compass");
window.sankore.setTool('compass');
window.sankore.setPenColor('#' + HSBToHex(hsb));
- sankore.returnStatus("Compass installed", penFlag);
+ //sankore.returnStatus("Compass installed", penFlag);
}
},
keyDown = function (ev) {
@@ -224,12 +224,12 @@
$("div.tools_change").removeClass("tools_compass");
window.sankore.setTool('pen');
window.sankore.setPenColor('#' + HSBToHex(tmpColor.b));
- sankore.returnStatus("PEN installed", penFlag);
+ //sankore.returnStatus("PEN installed", penFlag);
} else {
$("div.tools_change").addClass("tools_compass");
window.sankore.setTool('compass');
window.sankore.setPenColor('#' + HSBToHex(tmpColor.b));
- sankore.returnStatus("Compass installed", penFlag);
+ //sankore.returnStatus("Compass installed", penFlag);
}
//$(tmpColor.a).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(tmpColor.b));
return false;
@@ -261,7 +261,7 @@
cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
penFlag = (penFlag)?false:true;
setNewColor(col, cal.get(0));
- sankore.returnStatus("startEditing()", penFlag);
+ //sankore.returnStatus("startEditing()", penFlag);
},
show = function (ev) {
var cal = $('#' + $(this).data('colorpickerId'));
@@ -604,4 +604,4 @@
ColorPickerShow: ColorPicker.showPicker,
ColorPickerSetColor: ColorPicker.setColor
});
-})(jQuery)
\ No newline at end of file
+})(jQuery)
diff --git a/resources/library/interactivities/Ass images.wgt/js/script.js b/resources/library/interactivities/Ass images.wgt/js/script.js
index c2322d84..d771579c 100644
--- a/resources/library/interactivities/Ass images.wgt/js/script.js
+++ b/resources/library/interactivities/Ass images.wgt/js/script.js
@@ -1,14 +1,14 @@
var sankoreLang = {
- display: "Close",
+ display: "Display",
edit: "Edit",
short_desc: "Select the number \"three\".",
add: "Add new block",
enter: "Enter your instruction here ...",
wgt_name: "Associate images",
reload: "Reload",
- slate: "Wood",
- pad: "Pad",
- none: "None",
+ slate: "slate",
+ pad: "pad",
+ none: "none",
help: "Help",
help_content: "This is an example of help content ...",
theme: "Theme"
diff --git a/resources/library/interactivities/Ass images.wgt/locales/fr/js/script.js b/resources/library/interactivities/Ass images.wgt/locales/fr/js/script.js
index 967256d0..3895c032 100644
--- a/resources/library/interactivities/Ass images.wgt/locales/fr/js/script.js
+++ b/resources/library/interactivities/Ass images.wgt/locales/fr/js/script.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- display: "Fermer",
+ display: "Afficher",
edit: "Modifier",
short_desc: "Sélectionner le numéro «trois».",
add: "Nouveau bloc",
diff --git a/resources/library/interactivities/Ass sons.wgt/js/script.js b/resources/library/interactivities/Ass sons.wgt/js/script.js
index 3b8f3efa..7ae359f3 100644
--- a/resources/library/interactivities/Ass sons.wgt/js/script.js
+++ b/resources/library/interactivities/Ass sons.wgt/js/script.js
@@ -1,14 +1,14 @@
var sankoreLang = {
- display: "Close",
+ display: "Display",
edit: "Edit",
short_desc: "How many signals do you hear?",
add: "Add new block",
enter: "Enter your instruction here ...",
wgt_name: "Associate to the audio",
reload: "Reload",
- slate: "Wood",
- pad: "Pad",
- none: "None",
+ slate: "slate",
+ pad: "pad",
+ none: "none",
help: "Help",
help_content: "This is an example of help content ...",
theme: "Theme"
diff --git a/resources/library/interactivities/Ass sons.wgt/locales/fr/js/script.js b/resources/library/interactivities/Ass sons.wgt/locales/fr/js/script.js
index 184c4822..1b3c594d 100644
--- a/resources/library/interactivities/Ass sons.wgt/locales/fr/js/script.js
+++ b/resources/library/interactivities/Ass sons.wgt/locales/fr/js/script.js
@@ -1,14 +1,14 @@
var sankoreLang = {
- display: "Fermer",
+ display: "Afficher",
edit: "Modifier",
short_desc: "Combien de signaux entendez-vous?",
add: "Nouveau bloc",
enter: "Saisir votre description ici ...",
wgt_name: "Associer aux sons",
reload: "Recharger",
- slate: "Bois",
- pad: "Pad",
- none: "Aucun",
+ slate: "ardoise",
+ pad: "tablette",
+ none: "aucun",
help: "Aide",
help_content: "
Associer aux sons
"+
"En mode édition, pour créer un nouvel exercice, cliquez sur “Nouveau bloc” en bas, puis
"+
- "Pour supprimer une zone image, cliquez sur la croix située dans le coin supérieur droit de l’image.
"+
- "Pour remplacer un son, glissez-déposez simplement un nouveau son.
"+
+
+"En mode édition, pour créer un nouvel exercice, cliquez sur “Nouveau bloc” en bas, puis
"+
+"Pour supprimer une zone image, cliquez sur la croix située dans le coin supérieur droit de l’image.
"+
+"Pour remplacer un son, glissez-déposez simplement un nouveau son.
"+
+
+
"Pour supprimer un exercice, cliquez sur la croix à gauche du numéro de l’exercice.
"+
diff --git a/resources/library/interactivities/Cat images.wgt/js/script.js b/resources/library/interactivities/Cat images.wgt/js/script.js
index cf2f6d0c..9c4358b4 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: "Close",
+ display: "Display",
edit: "Edit",
first_desc: "Odd numbers",
second_desc: "Even numbers",
@@ -7,9 +7,9 @@ var sankoreLang = {
add: "Add new block",
wgt_name: "Categorize images",
reload: "Reload",
- slate: "Wood",
- pad: "Pad",
- none: "None",
+ slate: "slate",
+ pad: "pad",
+ none: "none",
help: "Help",
help_content: "This is an example of help content ...",
theme: "Theme"
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 5b20fcd1..a23d77b7 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: "Fermer",
+ display: "Afficher",
edit: "Modifier",
first_desc: "Les nombres impairs",
second_desc: "Les nombres pairs",
diff --git a/resources/library/interactivities/Cat text.wgt/js/script.js b/resources/library/interactivities/Cat text.wgt/js/script.js
index a53fc178..5744ce0a 100644
--- a/resources/library/interactivities/Cat text.wgt/js/script.js
+++ b/resources/library/interactivities/Cat text.wgt/js/script.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- display: "Close",
+ display: "Display",
edit: "Edit",
first_desc: "Fruits",
second_desc: "Vegetables",
@@ -13,9 +13,9 @@ var sankoreLang = {
text: "Some text",
wgt_name: "Categorize text",
reload: "Reload",
- slate: "Wood",
- pad: "Pad",
- none: "None",
+ slate: "slate",
+ pad: "pad",
+ none: "none",
help: "Help",
help_content: "This is an example of help content ...",
theme: "Theme"
diff --git a/resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js b/resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js
index 90cbd71c..3e1395ec 100644
--- a/resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js
+++ b/resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- display: "Fermer",
+ display: "Afficher",
edit: "Modifier",
first_desc: "Fruits",
second_desc: "Légumes",
@@ -28,13 +28,14 @@ var sankoreLang = {
"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.
"+
- "Pour supprimer une étiquette de mots, cliquez sur la croix située dans le coin supérieur droit de celle-ci.
"+
- "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 :
"+
+"Pour supprimer une étiquette de mots, cliquez sur la croix située dans le coin supérieur droit de celle-ci.
"+
+"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.
"+
diff --git a/resources/library/interactivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js b/resources/library/interactivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js
index 6c976c50..720c3b5f 100644
--- a/resources/library/interactivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js
+++ b/resources/library/interactivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js
@@ -15,7 +15,7 @@
var sankoreLang = {
edit: "Modifier",
- display:"Fermer",
+ display:"Afficher",
question:"La question",
example_question:"Ceci est un exemple de question",
answer:"Ceci est une réponse possible",
@@ -52,7 +52,7 @@ var sankoreLang = {
"En mode édition, pour créer un nouvel exercice, cliquez sur “Ajouter une nouvelle question …”, puis.
"+
+"En mode édition, pour créer un nouvel exercice, cliquez sur “Ajouter une nouvelle question …”, puis :
"+
"insérez la question en cliquant sur le champ de texte “Saisir la question ici ...”, "+
"cliquez sur ”Options” pour choisir l’affichage des propositions (une seule bonne réponse, plusieurs bonnes réponses, liste déroulante). Cliquez sur “Fermer”, "+
"cliquez sur ”Ajouter une proposition” et saisissez la proposition dans le champ de texte, "+
diff --git a/resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js b/resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js
index e04f2e83..8bb552c3 100644
--- a/resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js
+++ b/resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js
@@ -15,7 +15,7 @@
var sankoreLang = {
edit: "Edit",
- display:"Close",
+ display:"Display",
question:"Question",
example_question:"This is an example of the question",
answer:"This is one possible answer",
@@ -37,9 +37,9 @@ var sankoreLang = {
a:"A",
wgt_name: "Choose the right answer",
reload: "Reload",
- slate: "Wood",
- pad: "Pad",
- none: "None",
+ slate: "slate",
+ pad: "pad",
+ none: "none",
help: "Help",
help_content: "This is an example of help content ...",
theme: "Theme"
diff --git a/resources/library/interactivities/Contraste.wgt/css/basic.css b/resources/library/interactivities/Contraste.wgt/css/basic.css
index 64323d60..90530c69 100644
--- a/resources/library/interactivities/Contraste.wgt/css/basic.css
+++ b/resources/library/interactivities/Contraste.wgt/css/basic.css
@@ -3,7 +3,7 @@ html, body{
height: 100%;
margin: 0;
padding: 0;
- border-radius: 50px;
+ border-radius: 35px;
overflow: hidden;
}
@@ -41,8 +41,6 @@ body{
height: 100%;
float: left;
background-color: black;
- -webkit-border-top-left-radius: 7px;
- -webkit-border-bottom-left-radius: 7px;
border-top-left-radius: 7px;
border-bottom-left-radius: 7px;
}
@@ -52,8 +50,6 @@ body{
height: 100%;
float: right;
background-color: yellow;
- -webkit-border-top-right-radius: 7px;
- -webkit-border-bottom-right-radius: 7px;
border-top-right-radius: 7px;
border-bottom-right-radius: 7px;
}
@@ -269,65 +265,55 @@ 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_add, #wgt_help{
+#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(../images/slate-edit.png);
- background-repeat: no-repeat;
- background-position: top 0;
+ padding-left: 35px;
+ background: url(../images/toolbar-edit.png) left -32px no-repeat;
+ color: white;
display: none;
}
#wgt_edit{
- padding-left: 40px;
- background-image: url(../images/slate-edit.png);
- background-repeat: no-repeat;
- background-position: top 0;
+ padding-left: 35px;
+ background: url(../images/slate-toolbar-edit.png) left top no-repeat;
+ color: #7F613F;
+ text-shadow: #FFDCA9 0 1px 0;
}
#wgt_reload{
- padding-left: 40px;
- background-image: url(../images/slate-toolbar-reload.png);
- background-repeat: no-repeat;
- background-position: top 0;
+ padding-left: 35px;
+ background: url(../images/slate-toolbar-reload.png) left top no-repeat;
+ color: #7F613F;
+ text-shadow: #FFDCA9 0 1px 0;
}
#wgt_add{
- padding-left: 40px;
- background-image: url(../images/plus.png);
- background-repeat: no-repeat;
- background-position: top 0;
- display: none;
+ margin-left: 10px;
+ padding-right: 10px;
+ border: 1px solid #666;
+ border-radius: 15px;
+ padding-left: 30px;
+ background: url(../images/plus.png) -2px -2px no-repeat;
+ display: inline-block;
}
-.style_select{
- width: 120px;
- /*font-family: "Lobster13Regular";*/
- font-size: 24px;
- float: right;
- margin: 10px 20px 0 0;
- border-radius: 10px;
- background-image: url(../images/ar_down.png);
- background-color: #d4aa79;
- color: #8c5730;
- background-position: 105px 11px;
- background-repeat: no-repeat;
- -webkit-appearance: menulist-text;
- display: none;
+#wgt_add:hover{
+ border-color: black;
+ cursor: pointer;
}
.btl_pad{
@@ -362,55 +348,50 @@ body{
background-image: url(../images/pad-bottom-right.png) !important;
}
-.pad_color{
- color: white !important;
-}
-
-.pad_reload{
- background-image: url(../images/slate-toolbar-reload-white.png) !important;
+.without_radius{
+ border-radius: 0 !important;
}
-.pad_edit{
- background-image: url(../images/slate-display.png) !important;
+.without_back{
+ background: none !important;
}
-.pad_add{
- background-image: url(../images/plus-white.png) !important;
+.pad_color{
+ color: #FC9 !important;
+ text-shadow: none !important;
}
-.pad_select{
- background-color: black !important;
- color: white !important;
- background-image: url(../images/ar_down_white.png) !important;
+.pad_reload{
+ background: url(../images/toolbar-reload.png) left top no-repeat !important;
}
-.without_radius{
- border-radius: 0 !important;
+.pad_edit{
+ background: url(../images/toolbar-edit.png) left top no-repeat !important;
}
-.without_back{
- background: none !important;
+.pad_help{
+ background: url(../images/toolbar-help.png) left top no-repeat !important;
}
-.none_select{
- background-color: #333 !important;
+.help_wood{
+ background: url(../images/slate-toolbar-help.png) left -32px no-repeat !important;
color: white !important;
- background-image: url(../images/ar_down_white.png) !important;
+ text-shadow: #7F613F 0 -1px 0 !important;
}
-.pad_help{
- background-image: url(../images/slate-help-white.png) !important;
+.help_pad{
+ background: url(../images/toolbar-help.png) left -32px no-repeat !important;
+ color: white !important;
}
#wgt_help{
- padding-left: 32px;
- background-image: url(../images/slate-help.png);
- background-repeat: no-repeat;
- background-position: top 0;
+ padding-left: 35px;
+ background: url(../images/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;
@@ -419,5 +400,37 @@ body{
}
.open{
-
+
+}
+
+#parameters{
+ display: none;
+ margin: 40px 0 0 0;
+ padding: 10px 20px;
+ background: url("../images/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(../images/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/Contraste.wgt/images/ar_down.png b/resources/library/interactivities/Contraste.wgt/images/ar_down.png
deleted file mode 100644
index a20fab4f..00000000
Binary files a/resources/library/interactivities/Contraste.wgt/images/ar_down.png and /dev/null differ
diff --git a/resources/library/interactivities/Contraste.wgt/images/ar_down_white.png b/resources/library/interactivities/Contraste.wgt/images/ar_down_white.png
deleted file mode 100644
index 4a1d133b..00000000
Binary files a/resources/library/interactivities/Contraste.wgt/images/ar_down_white.png and /dev/null differ
diff --git a/resources/library/interactivities/Contraste.wgt/images/parameters-bg.png b/resources/library/interactivities/Contraste.wgt/images/parameters-bg.png
new file mode 100644
index 00000000..36f648e1
Binary files /dev/null and b/resources/library/interactivities/Contraste.wgt/images/parameters-bg.png differ
diff --git a/resources/library/interactivities/Contraste.wgt/images/plus-white.png b/resources/library/interactivities/Contraste.wgt/images/plus-white.png
deleted file mode 100644
index 650983ca..00000000
Binary files a/resources/library/interactivities/Contraste.wgt/images/plus-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Contraste.wgt/images/plus.png b/resources/library/interactivities/Contraste.wgt/images/plus.png
index b8d6f764..4ed06b7c 100644
Binary files a/resources/library/interactivities/Contraste.wgt/images/plus.png and b/resources/library/interactivities/Contraste.wgt/images/plus.png differ
diff --git a/resources/library/interactivities/Contraste.wgt/images/slate-display.png b/resources/library/interactivities/Contraste.wgt/images/slate-display.png
deleted file mode 100644
index 96166143..00000000
Binary files a/resources/library/interactivities/Contraste.wgt/images/slate-display.png and /dev/null differ
diff --git a/resources/library/interactivities/Contraste.wgt/images/slate-edit.png b/resources/library/interactivities/Contraste.wgt/images/slate-edit.png
deleted file mode 100644
index 17f5fc5c..00000000
Binary files a/resources/library/interactivities/Contraste.wgt/images/slate-edit.png and /dev/null differ
diff --git a/resources/library/interactivities/Contraste.wgt/images/slate-help-white.png b/resources/library/interactivities/Contraste.wgt/images/slate-help-white.png
deleted file mode 100644
index 7b5ebfd8..00000000
Binary files a/resources/library/interactivities/Contraste.wgt/images/slate-help-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Contraste.wgt/images/slate-help.png b/resources/library/interactivities/Contraste.wgt/images/slate-help.png
deleted file mode 100644
index 069052d0..00000000
Binary files a/resources/library/interactivities/Contraste.wgt/images/slate-help.png and /dev/null differ
diff --git a/resources/library/interactivities/Contraste.wgt/images/slate-toolbar-help.png b/resources/library/interactivities/Contraste.wgt/images/slate-toolbar-help.png
new file mode 100644
index 00000000..fb7cdeba
Binary files /dev/null and b/resources/library/interactivities/Contraste.wgt/images/slate-toolbar-help.png differ
diff --git a/resources/library/interactivities/Contraste.wgt/images/slate-toolbar-reload-white.png b/resources/library/interactivities/Contraste.wgt/images/slate-toolbar-reload-white.png
deleted file mode 100644
index 78d146ec..00000000
Binary files a/resources/library/interactivities/Contraste.wgt/images/slate-toolbar-reload-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Contraste.wgt/images/slate-toolbar-reload.png b/resources/library/interactivities/Contraste.wgt/images/slate-toolbar-reload.png
index 685a5cb2..844169a9 100644
Binary files a/resources/library/interactivities/Contraste.wgt/images/slate-toolbar-reload.png and b/resources/library/interactivities/Contraste.wgt/images/slate-toolbar-reload.png differ
diff --git a/resources/library/interactivities/Contraste.wgt/images/toolbar-edit.png b/resources/library/interactivities/Contraste.wgt/images/toolbar-edit.png
new file mode 100644
index 00000000..daa338cd
Binary files /dev/null and b/resources/library/interactivities/Contraste.wgt/images/toolbar-edit.png differ
diff --git a/resources/library/interactivities/Contraste.wgt/images/toolbar-help.png b/resources/library/interactivities/Contraste.wgt/images/toolbar-help.png
new file mode 100644
index 00000000..6c4454c0
Binary files /dev/null and b/resources/library/interactivities/Contraste.wgt/images/toolbar-help.png differ
diff --git a/resources/library/interactivities/Contraste.wgt/images/toolbar-reload.png b/resources/library/interactivities/Contraste.wgt/images/toolbar-reload.png
new file mode 100644
index 00000000..340d7371
Binary files /dev/null and b/resources/library/interactivities/Contraste.wgt/images/toolbar-reload.png differ
diff --git a/resources/library/interactivities/Contraste.wgt/index.html b/resources/library/interactivities/Contraste.wgt/index.html
index 0072e219..8f20fea1 100644
--- a/resources/library/interactivities/Contraste.wgt/index.html
+++ b/resources/library/interactivities/Contraste.wgt/index.html
@@ -5,7 +5,7 @@
-
+
@@ -51,27 +51,33 @@
-
-
-
-
-
-
-
+
+
-
+
-
+
diff --git a/resources/library/interactivities/Contraste.wgt/locales/fr/index.html b/resources/library/interactivities/Contraste.wgt/locales/fr/index.html
index f2cecf06..5c74529e 100644
--- a/resources/library/interactivities/Contraste.wgt/locales/fr/index.html
+++ b/resources/library/interactivities/Contraste.wgt/locales/fr/index.html
@@ -9,7 +9,7 @@ and open the template in the editor.
-
+
@@ -31,27 +31,33 @@ and open the template in the editor.
-
-
-
-
-
-
-
+
+
-
+
-
+
diff --git a/resources/library/interactivities/Contraste.wgt/locales/fr/scripts/blackYellow.js b/resources/library/interactivities/Contraste.wgt/locales/fr/scripts/blackYellow.js
index 634dde99..aa40e63e 100644
--- a/resources/library/interactivities/Contraste.wgt/locales/fr/scripts/blackYellow.js
+++ b/resources/library/interactivities/Contraste.wgt/locales/fr/scripts/blackYellow.js
@@ -14,7 +14,7 @@
*/
var sankoreLang = {
- display: "Afficher",
+ display: "Fermer",
edit: "Modifier",
add: "Ajouter",
enter_data: "Saisir la donnée:",
@@ -28,24 +28,25 @@ var sankoreLang = {
none: "aucun",
help: "Aide",
help_content: "
Contraste "+
-"
Jeu de couleurs. "+
+ "
Jeu de couleurs. "+
-"Cette activité permet de masquer et d’afficher du texte en jouant sur la couleur de fond (jaune ou noir). Le but est de pouvoir faire apparaître des données en passant d’une couleur à l’autre.
"+
+ "Cette activité permet de masquer et d’afficher du texte en jouant sur la couleur de fond (jaune ou noir). Le but est de pouvoir faire apparaître des données en passant d’une couleur à l’autre.
"+
-"Le bouton “Recharger” réinitialise les exercices.
"+
+ "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 “+ Ajouter” en haut, puis
"+
-"saisissez la donnée par exemple “3x15”, "+
-"saisissez le résultat, par exemple “15” et cliquez sur “OK”. "+
-"Pour modifier les données ou les résultats, cliquez directement sur l’exercice.
"+
-"Pour supprimer un exercice, cliquez sur la croix en haut à droite de l’exercice.
"+
+ "En mode édition, pour créer un nouvel exercice, cliquez sur “+ Ajouter” en haut, puis
"+
+ "saisissez la donnée par exemple “3x15”, "+
+ "saisissez le résultat, par exemple “15” et cliquez sur “OK”. "+
+ "Pour modifier les données ou les résultats, cliquez directement sur l’exercice.
"+
+ "Pour supprimer un exercice, cliquez sur la croix en haut à droite de l’exercice.
"+
-"Le bouton “Afficher” vous permet d’utiliser l’activité.
"
+ "Le bouton “Afficher” vous permet d’utiliser l’activité.
",
+ theme: "Thème"
};
function init(){
@@ -61,6 +62,8 @@ function init(){
var flagForSelect = false;
var dragElement = null; //the element that must be dragging
var lang = ""; //locale language
+ var resizeFlag = true;
+
var coords = {
left:0,
top:0
@@ -82,9 +85,11 @@ function init(){
$("#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("blackYellowData","")){
@@ -109,7 +114,7 @@ function init(){
if(window.sankore){
if(sankore.preference("by_style","")){
changeStyle(sankore.preference("by_style",""));
- $(".style_select").val(sankore.preference("by_style",""));
+ $("#style_select").val(sankore.preference("by_style",""));
} else
changeStyle("3")
} else
@@ -120,9 +125,15 @@ function init(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
- $(".style_select").css("display","none");
+ $("#parameters").css("display","none");
+ var tmpwh = $(window).height();
+ var tmpww = $(window).width();
+ resizeFlag = true;
+ window.resizeTo(tmpww, tmpwh - 44)
+ $("#data").css("padding-bottom","");
+ $("#leftDiv").css("border-top-left-radius","7px");
+ $("#rightDiv").css("border-top-right-radius","7px");
$(this).css("display", "none");
- $("#wgt_add").css("display", "none");
$("#wgt_edit").css("display", "block");
mode = false;
$(".leftDiv, .rightDiv").animate({
@@ -135,7 +146,7 @@ function init(){
tmpReadyTask.width($(domElem).width())
.height($(domElem).height())
.css("position","absolute")
- .css("top",$(domElem).position().top)
+ .css("top",$(domElem).position().top - 40)
.css("left",$(domElem).position().left)
.find(".taskContainer").removeAttr("contenteditable");
@@ -146,15 +157,22 @@ function init(){
opacityChanged = false;
}
});
+
$(document).disableTextSelect();
}
} else {
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
+ tmpwh = $(window).height();
+ tmpww = $(window).width();
+ resizeFlag = true;
+ window.resizeTo(tmpww, tmpwh + 44)
+ $("#data").css("padding-bottom","42px");
+ $("#leftDiv").css("border-top-left-radius","0px");
+ $("#rightDiv").css("border-top-right-radius","0px");
$(this).css("display", "none");
- $("#wgt_add").css("display", "block");
$("#wgt_display").css("display", "block");
mode = true;
$(document).enableTextSelect();
@@ -189,12 +207,15 @@ function init(){
$("#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();
+ ($("#wgt_edit").hasClass("selected"))?$("#parameters").show():'';
});
} else {
- $("#data").hide();
+ ($("#style_select").val() == 1)?$(this).removeClass("help_pad").addClass("help_wood"):$(this).removeClass("help_wood").addClass("help_pad");
+ $("#data, #parameters").hide();
$("#help").slideDown("100", function(){
tmp.addClass("open");
});
@@ -218,10 +239,10 @@ function init(){
$(document).disableTextSelect();
});
- $(".style_select option[value='1']").text(sankoreLang.slate);
- $(".style_select option[value='2']").text(sankoreLang.pad);
+ $("#style_select option[value='1']").text(sankoreLang.slate);
+ $("#style_select option[value='2']").text(sankoreLang.pad);
- $(".style_select").change(function (event){
+ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@@ -372,12 +393,12 @@ function init(){
if((prevBottom + 15 + curHeight) < ($(window).height() - 54))
curr.css("top", prevBottom + 15 + "px");
else
- curr.css("top", "60px").css("left", prevLeft + 255 + "px");
+ curr.css("top", "100px").css("left", prevLeft + 255 + "px");
} else {
if((prevBottom + 15 + curHeight) < ($(window).height() - 54))
curr.css("top", prevBottom + 15 + "px").css("left", prevLeft + "px");
else
- curr.css("top", "60px").css("left", prevLeft + 255 + "px");
+ curr.css("top", "100px").css("left", prevLeft + 255 + "px");
}
prevBottom = curr.position().top + curr.height(),
prevLeft = curr.position().left;
@@ -390,28 +411,31 @@ function init(){
popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%");
$(window).resize(function(){
- if($("#wgt_edit").hasClass("selected")){
- if($(".editContainer").size() > 1){
- var prev = $(".editContainer:first"),
- prevBottom = prev.position().top + prev.height(),
- prevLeft = prev.position().left;
- recursionCall(prevBottom, prevLeft, prev.next());
+ if(!resizeFlag){
+ if($("#wgt_edit").hasClass("selected")){
+ if($(".editContainer").size() > 1){
+ var prev = $(".editContainer:first"),
+ prevBottom = prev.position().top + prev.height(),
+ prevLeft = prev.position().left;
+ recursionCall(prevBottom, prevLeft, prev.next());
+ }
+ } else {
+ var tmp_array = [];
+ $(".readyTask").each(function(){
+ tmp_array.push($(this));
+ });
+ orderItems(tmp_array);
}
- } else {
- var tmp_array = [];
- $(".readyTask").each(function(){
- tmp_array.push($(this));
- });
- orderItems(tmp_array);
- }
- popupBack.css("top", ($(window).height() - 138)*50/$(window).height() + "%");
- popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%");
+ popupBack.css("top", ($(window).height() - 138)*50/$(window).height() + "%");
+ popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%");
+ } else
+ resizeFlag = false;
});
if (window.widget) {
window.widget.onleave = function(){
exportToSankore();
- sankore.setPreference("by_style", $(".style_select").find("option:selected").val());
+ sankore.setPreference("by_style", $("#style_select").find("option:selected").val());
}
}
@@ -434,7 +458,7 @@ function init(){
objToExport.data2 = $(domElem).find(".readyTask").find(":last-child").text();
objToExport.width = $(domElem).width();
objToExport.height = $(domElem).height();
- objToExport.top = $(domElem).position().top;
+ objToExport.top = $(domElem).position().top - 40;
objToExport.left = $(domElem).position().left;
arrayToExport.push(objToExport);
});
@@ -493,14 +517,14 @@ function reloadItems(){
//order items
function orderItems(items){
- var bottom = 45,
+ var bottom = ($("#wgt_edit").hasClass("selected"))?85:45,
lastItemLeft = 54;
for (var i in items){
if((bottom + items[i].height()) < ($(window).height() - 54)){
items[i].css("top", bottom + 15 + "px").css("left", lastItemLeft + "px").appendTo("#data");
bottom += items[i].height() + 15;
} else {
- bottom = 60;
+ bottom = 100;
lastItemLeft += 255;
items[i].css("top", bottom + "px").css("left", lastItemLeft + "px").appendTo("#data");
bottom += items[i].height();
@@ -525,7 +549,7 @@ function shuffle( arr )
//adding a new task to the page
function addTask(expression, result){
var lastItem = $(".editContainer:last"),
- lastItemPos = lastItem.length ? lastItem.position().top : 45,
+ lastItemPos = lastItem.length ? lastItem.position().top : 85,
lastItemHeight = lastItem.length ? lastItem.height() : 0,
lastItemLeft = lastItem.length ? lastItem.position().left : 54;
var bottom = lastItemPos + lastItemHeight + 85;
@@ -537,7 +561,7 @@ function addTask(expression, result){
if(bottom < ($(window).height() - 54)){
editContent.css("top", lastItemPos + lastItemHeight + 15 + "px").css("left", lastItemLeft + "px").appendTo("#data");
} else {
- lastItemPos = 45;
+ lastItemPos = 85;
editContent.css("top", lastItemPos + 15 + "px").css("left", lastItemLeft + 255 + "px").appendTo("#data");
}
main.appendTo(editContent);
@@ -556,13 +580,12 @@ function changeStyle(val){
$(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
- $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help");
- $("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
- $("#wgt_add").removeClass("pad_color").removeClass("pad_add");
+ $("#wgt_edit").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");
@@ -574,13 +597,12 @@ function changeStyle(val){
$(".b_bottom_left").addClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").addClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload");
- $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_help").addClass("pad_color").addClass("pad_help");
- $("#wgt_display").addClass("pad_color").addClass("pad_edit");
- $("#wgt_add").addClass("pad_color").addClass("pad_add");
+ $("#wgt_edit").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");
@@ -591,14 +613,13 @@ function changeStyle(val){
$(".b_bottom_right").addClass("without_back").removeClass("bbr_pad");
$(".b_bottom_left").addClass("without_back").removeClass("bbl_pad");
$(".b_bottom_center").addClass("without_back").removeClass("bbc_pad");
+ $("#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_help").addClass("pad_color").addClass("pad_help");
- $("#wgt_display").addClass("pad_color").addClass("pad_edit");
- $("#wgt_add").addClass("pad_color").addClass("pad_add");
$("#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;
}
if($("#wgt_edit").hasClass("selected"))
diff --git a/resources/library/interactivities/Contraste.wgt/locales/ru/index.html b/resources/library/interactivities/Contraste.wgt/locales/ru/index.html
index f2cecf06..f72a635b 100644
--- a/resources/library/interactivities/Contraste.wgt/locales/ru/index.html
+++ b/resources/library/interactivities/Contraste.wgt/locales/ru/index.html
@@ -31,12 +31,6 @@ and open the template in the editor.
-
-
-
-
-
-
@@ -45,6 +39,18 @@ and open the template in the editor.
+
diff --git a/resources/library/interactivities/Contraste.wgt/locales/ru/scripts/blackYellow.js b/resources/library/interactivities/Contraste.wgt/locales/ru/scripts/blackYellow.js
index fc0eb152..15d2aff3 100644
--- a/resources/library/interactivities/Contraste.wgt/locales/ru/scripts/blackYellow.js
+++ b/resources/library/interactivities/Contraste.wgt/locales/ru/scripts/blackYellow.js
@@ -14,7 +14,7 @@
*/
var sankoreLang = {
- display: "Показать",
+ display: "Закрыть",
edit: "Изменить",
add: "Добавить",
enter_data: "Введите вопрос:",
@@ -27,7 +27,8 @@ var sankoreLang = {
pad: "планшет",
none: "нет",
help: "Помощь",
- help_content: "Пример текста помощи ..."
+ help_content: "Пример текста помощи ...",
+ theme: "Тема"
};
function init(){
@@ -43,6 +44,8 @@ function init(){
var flagForSelect = false;
var dragElement = null; //the element that must be dragging
var lang = ""; //locale language
+ var resizeFlag = true;
+
var coords = {
left:0,
top:0
@@ -64,9 +67,11 @@ function init(){
$("#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("blackYellowData","")){
@@ -91,7 +96,7 @@ function init(){
if(window.sankore){
if(sankore.preference("by_style","")){
changeStyle(sankore.preference("by_style",""));
- $(".style_select").val(sankore.preference("by_style",""));
+ $("#style_select").val(sankore.preference("by_style",""));
} else
changeStyle("3")
} else
@@ -102,9 +107,15 @@ function init(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
- $(".style_select").css("display","none");
+ $("#parameters").css("display","none");
+ var tmpwh = $(window).height();
+ var tmpww = $(window).width();
+ resizeFlag = true;
+ window.resizeTo(tmpww, tmpwh - 44)
+ $("#data").css("padding-bottom","");
+ $("#leftDiv").css("border-top-left-radius","7px");
+ $("#rightDiv").css("border-top-right-radius","7px");
$(this).css("display", "none");
- $("#wgt_add").css("display", "none");
$("#wgt_edit").css("display", "block");
mode = false;
$(".leftDiv, .rightDiv").animate({
@@ -117,7 +128,7 @@ function init(){
tmpReadyTask.width($(domElem).width())
.height($(domElem).height())
.css("position","absolute")
- .css("top",$(domElem).position().top)
+ .css("top",$(domElem).position().top - 40)
.css("left",$(domElem).position().left)
.find(".taskContainer").removeAttr("contenteditable");
@@ -128,15 +139,22 @@ function init(){
opacityChanged = false;
}
});
+
$(document).disableTextSelect();
}
} else {
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
+ tmpwh = $(window).height();
+ tmpww = $(window).width();
+ resizeFlag = true;
+ window.resizeTo(tmpww, tmpwh + 44)
+ $("#data").css("padding-bottom","42px");
+ $("#leftDiv").css("border-top-left-radius","0px");
+ $("#rightDiv").css("border-top-right-radius","0px");
$(this).css("display", "none");
- $("#wgt_add").css("display", "block");
$("#wgt_display").css("display", "block");
mode = true;
$(document).enableTextSelect();
@@ -171,12 +189,15 @@ function init(){
$("#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();
+ ($("#wgt_edit").hasClass("selected"))?$("#parameters").show():'';
});
} else {
- $("#data").hide();
+ ($("#style_select").val() == 1)?$(this).removeClass("help_pad").addClass("help_wood"):$(this).removeClass("help_wood").addClass("help_pad");
+ $("#data, #parameters").hide();
$("#help").slideDown("100", function(){
tmp.addClass("open");
});
@@ -200,10 +221,10 @@ function init(){
$(document).disableTextSelect();
});
- $(".style_select option[value='1']").text(sankoreLang.slate);
- $(".style_select option[value='2']").text(sankoreLang.pad);
+ $("#style_select option[value='1']").text(sankoreLang.slate);
+ $("#style_select option[value='2']").text(sankoreLang.pad);
- $(".style_select").change(function (event){
+ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@@ -354,12 +375,12 @@ function init(){
if((prevBottom + 15 + curHeight) < ($(window).height() - 54))
curr.css("top", prevBottom + 15 + "px");
else
- curr.css("top", "60px").css("left", prevLeft + 255 + "px");
+ curr.css("top", "100px").css("left", prevLeft + 255 + "px");
} else {
if((prevBottom + 15 + curHeight) < ($(window).height() - 54))
curr.css("top", prevBottom + 15 + "px").css("left", prevLeft + "px");
else
- curr.css("top", "60px").css("left", prevLeft + 255 + "px");
+ curr.css("top", "100px").css("left", prevLeft + 255 + "px");
}
prevBottom = curr.position().top + curr.height(),
prevLeft = curr.position().left;
@@ -372,28 +393,31 @@ function init(){
popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%");
$(window).resize(function(){
- if($("#wgt_edit").hasClass("selected")){
- if($(".editContainer").size() > 1){
- var prev = $(".editContainer:first"),
- prevBottom = prev.position().top + prev.height(),
- prevLeft = prev.position().left;
- recursionCall(prevBottom, prevLeft, prev.next());
+ if(!resizeFlag){
+ if($("#wgt_edit").hasClass("selected")){
+ if($(".editContainer").size() > 1){
+ var prev = $(".editContainer:first"),
+ prevBottom = prev.position().top + prev.height(),
+ prevLeft = prev.position().left;
+ recursionCall(prevBottom, prevLeft, prev.next());
+ }
+ } else {
+ var tmp_array = [];
+ $(".readyTask").each(function(){
+ tmp_array.push($(this));
+ });
+ orderItems(tmp_array);
}
- } else {
- var tmp_array = [];
- $(".readyTask").each(function(){
- tmp_array.push($(this));
- });
- orderItems(tmp_array);
- }
- popupBack.css("top", ($(window).height() - 138)*50/$(window).height() + "%");
- popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%");
+ popupBack.css("top", ($(window).height() - 138)*50/$(window).height() + "%");
+ popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%");
+ } else
+ resizeFlag = false;
});
if (window.widget) {
window.widget.onleave = function(){
exportToSankore();
- sankore.setPreference("by_style", $(".style_select").find("option:selected").val());
+ sankore.setPreference("by_style", $("#style_select").find("option:selected").val());
}
}
@@ -416,7 +440,7 @@ function init(){
objToExport.data2 = $(domElem).find(".readyTask").find(":last-child").text();
objToExport.width = $(domElem).width();
objToExport.height = $(domElem).height();
- objToExport.top = $(domElem).position().top;
+ objToExport.top = $(domElem).position().top - 40;
objToExport.left = $(domElem).position().left;
arrayToExport.push(objToExport);
});
@@ -475,14 +499,14 @@ function reloadItems(){
//order items
function orderItems(items){
- var bottom = 45,
+ var bottom = ($("#wgt_edit").hasClass("selected"))?85:45,
lastItemLeft = 54;
for (var i in items){
if((bottom + items[i].height()) < ($(window).height() - 54)){
items[i].css("top", bottom + 15 + "px").css("left", lastItemLeft + "px").appendTo("#data");
bottom += items[i].height() + 15;
} else {
- bottom = 60;
+ bottom = 100;
lastItemLeft += 255;
items[i].css("top", bottom + "px").css("left", lastItemLeft + "px").appendTo("#data");
bottom += items[i].height();
@@ -507,7 +531,7 @@ function shuffle( arr )
//adding a new task to the page
function addTask(expression, result){
var lastItem = $(".editContainer:last"),
- lastItemPos = lastItem.length ? lastItem.position().top : 45,
+ lastItemPos = lastItem.length ? lastItem.position().top : 85,
lastItemHeight = lastItem.length ? lastItem.height() : 0,
lastItemLeft = lastItem.length ? lastItem.position().left : 54;
var bottom = lastItemPos + lastItemHeight + 85;
@@ -519,7 +543,7 @@ function addTask(expression, result){
if(bottom < ($(window).height() - 54)){
editContent.css("top", lastItemPos + lastItemHeight + 15 + "px").css("left", lastItemLeft + "px").appendTo("#data");
} else {
- lastItemPos = 45;
+ lastItemPos = 85;
editContent.css("top", lastItemPos + 15 + "px").css("left", lastItemLeft + 255 + "px").appendTo("#data");
}
main.appendTo(editContent);
@@ -538,13 +562,12 @@ function changeStyle(val){
$(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
- $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help");
- $("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
- $("#wgt_add").removeClass("pad_color").removeClass("pad_add");
+ $("#wgt_edit").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");
@@ -556,13 +579,12 @@ function changeStyle(val){
$(".b_bottom_left").addClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").addClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload");
- $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_help").addClass("pad_color").addClass("pad_help");
- $("#wgt_display").addClass("pad_color").addClass("pad_edit");
- $("#wgt_add").addClass("pad_color").addClass("pad_add");
+ $("#wgt_edit").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");
@@ -573,14 +595,13 @@ function changeStyle(val){
$(".b_bottom_right").addClass("without_back").removeClass("bbr_pad");
$(".b_bottom_left").addClass("without_back").removeClass("bbl_pad");
$(".b_bottom_center").addClass("without_back").removeClass("bbc_pad");
+ $("#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_help").addClass("pad_color").addClass("pad_help");
- $("#wgt_display").addClass("pad_color").addClass("pad_edit");
- $("#wgt_add").addClass("pad_color").addClass("pad_add");
$("#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;
}
if($("#wgt_edit").hasClass("selected"))
diff --git a/resources/library/interactivities/Contraste.wgt/scripts/blackYellow.js b/resources/library/interactivities/Contraste.wgt/scripts/blackYellow.js
index 89e6df3f..593bde46 100644
--- a/resources/library/interactivities/Contraste.wgt/scripts/blackYellow.js
+++ b/resources/library/interactivities/Contraste.wgt/scripts/blackYellow.js
@@ -14,7 +14,7 @@
*/
var sankoreLang = {
- display: "Display",
+ display: "Close",
edit: "Edit",
add: "Add",
enter_data: "Enter data:",
@@ -23,11 +23,12 @@ var sankoreLang = {
cancel: "Cancel",
wgt_name: "Contrast",
reload: "Reload",
- slate: "wood",
+ slate: "slate",
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"
};
function init(){
@@ -43,6 +44,8 @@ function init(){
var flagForSelect = false;
var dragElement = null; //the element that must be dragging
var lang = ""; //locale language
+ var resizeFlag = true;
+
var coords = {
left:0,
top:0
@@ -64,9 +67,11 @@ function init(){
$("#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("blackYellowData","")){
@@ -91,7 +96,7 @@ function init(){
if(window.sankore){
if(sankore.preference("by_style","")){
changeStyle(sankore.preference("by_style",""));
- $(".style_select").val(sankore.preference("by_style",""));
+ $("#style_select").val(sankore.preference("by_style",""));
} else
changeStyle("3")
} else
@@ -102,9 +107,15 @@ function init(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
- $(".style_select").css("display","none");
+ $("#parameters").css("display","none");
+ var tmpwh = $(window).height();
+ var tmpww = $(window).width();
+ resizeFlag = true;
+ window.resizeTo(tmpww, tmpwh - 44)
+ $("#data").css("padding-bottom","");
+ $("#leftDiv").css("border-top-left-radius","7px");
+ $("#rightDiv").css("border-top-right-radius","7px");
$(this).css("display", "none");
- $("#wgt_add").css("display", "none");
$("#wgt_edit").css("display", "block");
mode = false;
$(".leftDiv, .rightDiv").animate({
@@ -117,7 +128,7 @@ function init(){
tmpReadyTask.width($(domElem).width())
.height($(domElem).height())
.css("position","absolute")
- .css("top",$(domElem).position().top)
+ .css("top",$(domElem).position().top - 40)
.css("left",$(domElem).position().left)
.find(".taskContainer").removeAttr("contenteditable");
@@ -128,15 +139,22 @@ function init(){
opacityChanged = false;
}
});
+
$(document).disableTextSelect();
}
} else {
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
+ tmpwh = $(window).height();
+ tmpww = $(window).width();
+ resizeFlag = true;
+ window.resizeTo(tmpww, tmpwh + 44)
+ $("#data").css("padding-bottom","42px");
+ $("#leftDiv").css("border-top-left-radius","0px");
+ $("#rightDiv").css("border-top-right-radius","0px");
$(this).css("display", "none");
- $("#wgt_add").css("display", "block");
$("#wgt_display").css("display", "block");
mode = true;
$(document).enableTextSelect();
@@ -171,12 +189,15 @@ function init(){
$("#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();
+ ($("#wgt_edit").hasClass("selected"))?$("#parameters").show():'';
});
} else {
- $("#data").hide();
+ ($("#style_select").val() == 1)?$(this).removeClass("help_pad").addClass("help_wood"):$(this).removeClass("help_wood").addClass("help_pad");
+ $("#data, #parameters").hide();
$("#help").slideDown("100", function(){
tmp.addClass("open");
});
@@ -200,10 +221,10 @@ function init(){
$(document).disableTextSelect();
});
- $(".style_select option[value='1']").text(sankoreLang.slate);
- $(".style_select option[value='2']").text(sankoreLang.pad);
+ $("#style_select option[value='1']").text(sankoreLang.slate);
+ $("#style_select option[value='2']").text(sankoreLang.pad);
- $(".style_select").change(function (event){
+ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@@ -354,12 +375,12 @@ function init(){
if((prevBottom + 15 + curHeight) < ($(window).height() - 54))
curr.css("top", prevBottom + 15 + "px");
else
- curr.css("top", "60px").css("left", prevLeft + 255 + "px");
+ curr.css("top", "100px").css("left", prevLeft + 255 + "px");
} else {
if((prevBottom + 15 + curHeight) < ($(window).height() - 54))
curr.css("top", prevBottom + 15 + "px").css("left", prevLeft + "px");
else
- curr.css("top", "60px").css("left", prevLeft + 255 + "px");
+ curr.css("top", "100px").css("left", prevLeft + 255 + "px");
}
prevBottom = curr.position().top + curr.height(),
prevLeft = curr.position().left;
@@ -372,28 +393,31 @@ function init(){
popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%");
$(window).resize(function(){
- if($("#wgt_edit").hasClass("selected")){
- if($(".editContainer").size() > 1){
- var prev = $(".editContainer:first"),
- prevBottom = prev.position().top + prev.height(),
- prevLeft = prev.position().left;
- recursionCall(prevBottom, prevLeft, prev.next());
+ if(!resizeFlag){
+ if($("#wgt_edit").hasClass("selected")){
+ if($(".editContainer").size() > 1){
+ var prev = $(".editContainer:first"),
+ prevBottom = prev.position().top + prev.height(),
+ prevLeft = prev.position().left;
+ recursionCall(prevBottom, prevLeft, prev.next());
+ }
+ } else {
+ var tmp_array = [];
+ $(".readyTask").each(function(){
+ tmp_array.push($(this));
+ });
+ orderItems(tmp_array);
}
- } else {
- var tmp_array = [];
- $(".readyTask").each(function(){
- tmp_array.push($(this));
- });
- orderItems(tmp_array);
- }
- popupBack.css("top", ($(window).height() - 138)*50/$(window).height() + "%");
- popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%");
+ popupBack.css("top", ($(window).height() - 138)*50/$(window).height() + "%");
+ popupBack.css("left", ($(window).width() - 360)*50/$(window).width() + "%");
+ } else
+ resizeFlag = false;
});
if (window.widget) {
window.widget.onleave = function(){
exportToSankore();
- sankore.setPreference("by_style", $(".style_select").find("option:selected").val());
+ sankore.setPreference("by_style", $("#style_select").find("option:selected").val());
}
}
@@ -416,7 +440,7 @@ function init(){
objToExport.data2 = $(domElem).find(".readyTask").find(":last-child").text();
objToExport.width = $(domElem).width();
objToExport.height = $(domElem).height();
- objToExport.top = $(domElem).position().top;
+ objToExport.top = $(domElem).position().top - 40;
objToExport.left = $(domElem).position().left;
arrayToExport.push(objToExport);
});
@@ -475,14 +499,14 @@ function reloadItems(){
//order items
function orderItems(items){
- var bottom = 45,
+ var bottom = ($("#wgt_edit").hasClass("selected"))?85:45,
lastItemLeft = 54;
for (var i in items){
if((bottom + items[i].height()) < ($(window).height() - 54)){
items[i].css("top", bottom + 15 + "px").css("left", lastItemLeft + "px").appendTo("#data");
bottom += items[i].height() + 15;
} else {
- bottom = 60;
+ bottom = 100;
lastItemLeft += 255;
items[i].css("top", bottom + "px").css("left", lastItemLeft + "px").appendTo("#data");
bottom += items[i].height();
@@ -507,7 +531,7 @@ function shuffle( arr )
//adding a new task to the page
function addTask(expression, result){
var lastItem = $(".editContainer:last"),
- lastItemPos = lastItem.length ? lastItem.position().top : 45,
+ lastItemPos = lastItem.length ? lastItem.position().top : 85,
lastItemHeight = lastItem.length ? lastItem.height() : 0,
lastItemLeft = lastItem.length ? lastItem.position().left : 54;
var bottom = lastItemPos + lastItemHeight + 85;
@@ -519,7 +543,7 @@ function addTask(expression, result){
if(bottom < ($(window).height() - 54)){
editContent.css("top", lastItemPos + lastItemHeight + 15 + "px").css("left", lastItemLeft + "px").appendTo("#data");
} else {
- lastItemPos = 45;
+ lastItemPos = 85;
editContent.css("top", lastItemPos + 15 + "px").css("left", lastItemLeft + 255 + "px").appendTo("#data");
}
main.appendTo(editContent);
@@ -538,13 +562,12 @@ function changeStyle(val){
$(".b_bottom_left").removeClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").removeClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
- $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help");
- $("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
- $("#wgt_add").removeClass("pad_color").removeClass("pad_add");
+ $("#wgt_edit").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");
@@ -556,13 +579,12 @@ function changeStyle(val){
$(".b_bottom_left").addClass("bbl_pad").removeClass("without_back");
$(".b_bottom_center").addClass("bbc_pad").removeClass("without_back");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload");
- $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_help").addClass("pad_color").addClass("pad_help");
- $("#wgt_display").addClass("pad_color").addClass("pad_edit");
- $("#wgt_add").addClass("pad_color").addClass("pad_add");
+ $("#wgt_edit").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");
@@ -573,14 +595,13 @@ function changeStyle(val){
$(".b_bottom_right").addClass("without_back").removeClass("bbr_pad");
$(".b_bottom_left").addClass("without_back").removeClass("bbl_pad");
$(".b_bottom_center").addClass("without_back").removeClass("bbc_pad");
+ $("#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_help").addClass("pad_color").addClass("pad_help");
- $("#wgt_display").addClass("pad_color").addClass("pad_edit");
- $("#wgt_add").addClass("pad_color").addClass("pad_add");
$("#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;
}
if($("#wgt_edit").hasClass("selected"))
diff --git a/resources/library/interactivities/Enveloppe.wgt/js/help_fr-template.js b/resources/library/interactivities/Enveloppe.wgt/js/help_fr-template.js
index 17301536..44e0fc11 100644
--- a/resources/library/interactivities/Enveloppe.wgt/js/help_fr-template.js
+++ b/resources/library/interactivities/Enveloppe.wgt/js/help_fr-template.js
@@ -8,7 +8,7 @@
Le bouton “Modifier” vous permet :
de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut tablette),
-de déterminer le nombre de trombone(s) souhaités.
+de déterminer le nombre de trombone(s) souhaité(s).
Le bouton “Afficher” vous permet d’utiliser l’activité.
\ No newline at end of file
diff --git a/resources/library/interactivities/Etudier.wgt/locales/fr/js/script.js b/resources/library/interactivities/Etudier.wgt/locales/fr/js/script.js
index 7d6c73a6..3d9d5b47 100644
--- a/resources/library/interactivities/Etudier.wgt/locales/fr/js/script.js
+++ b/resources/library/interactivities/Etudier.wgt/locales/fr/js/script.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- display: "Fermer",
+ display: "Afficher",
edit: "Modifier",
text_content: "Ceci est un exemple. Au lieu de ce texte, vous pouvez mettre votre propre texte ou glisser-déposer une image, un son ou une vidéo.",
new_txt: "Nouveau bloc de texte",
@@ -18,12 +18,14 @@ var sankoreLang = {
"de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut aucun), "+
"de modifier les pages du livret. "+
- "Sur chaque page, vous pouvez :
"+
- "insérer des zones de texte avec le bouton “+T” situé en haut à gauche de l’interactivité. (pour modifier ces zones de texte, cliquez à l’intérieur et écrivez du texte), "+
- "insérer des images, sons et vidéos par glisser-déposer de fichiers depuis la bibliothèque jusqu’à l’intérieur de la page du livret, "+
- "déplacer les textes, images, sons et vidéos à l’intérieur de la page en cliquant et en déplaçant la flèche multidirectionnelle qui se situe dans le coin supérieur gauche de chaque élément, "+
- "agrandir la taille d’un élément avec la double flèche en bas à droite de celui-ci, "+
- "supprimer un élément avec la case en haut à droite de celui-ci. "+
+
+"Sur chaque page, vous pouvez :
"+
+"insérer des zones de texte avec le bouton “+T” situé en haut à gauche de l’interactivité (pour modifier ces zones de texte, cliquez à l’intérieur et écrivez du texte), "+
+"insérer des images, sons et vidéos par glisser-déposer de fichiers depuis la bibliothèque jusqu’à l’intérieur de la page du livret, "+
+"déplacer les textes, images, sons et vidéos à l’intérieur de la page en cliquant et en déplaçant la flèche multidirectionnelle qui se situe dans le coin supérieur gauche de chaque élément, "+
+"agrandir la taille d’un élément avec la double flèche en bas à droite de celui-ci, "+
+"supprimer un élément avec la case en haut à droite de celui-ci. "+
+
"Pour ajouter une page, cliquez sur la flèche verte accompagnée d’un “+” se trouvant en bas à gauche et à droite.
"+
"Pour supprimer une page, cliquez sur la croix rouge située en haut à droite de la page.
"+
diff --git a/resources/library/interactivities/Ordre phrase.wgt/img/ar_down.png b/resources/library/interactivities/Ordre phrase.wgt/img/ar_down.png
deleted file mode 100644
index a20fab4f..00000000
Binary files a/resources/library/interactivities/Ordre phrase.wgt/img/ar_down.png and /dev/null differ
diff --git a/resources/library/interactivities/Ordre phrase.wgt/img/ar_down_white.png b/resources/library/interactivities/Ordre phrase.wgt/img/ar_down_white.png
deleted file mode 100644
index 4a1d133b..00000000
Binary files a/resources/library/interactivities/Ordre phrase.wgt/img/ar_down_white.png and /dev/null differ
diff --git a/resources/library/interactivities/Ordre phrase.wgt/img/parameters-bg.png b/resources/library/interactivities/Ordre phrase.wgt/img/parameters-bg.png
new file mode 100644
index 00000000..36f648e1
Binary files /dev/null and b/resources/library/interactivities/Ordre phrase.wgt/img/parameters-bg.png differ
diff --git a/resources/library/interactivities/Ordre phrase.wgt/img/slate-display.png b/resources/library/interactivities/Ordre phrase.wgt/img/slate-display.png
deleted file mode 100644
index 96166143..00000000
Binary files a/resources/library/interactivities/Ordre phrase.wgt/img/slate-display.png and /dev/null differ
diff --git a/resources/library/interactivities/Ordre phrase.wgt/img/slate-edit.png b/resources/library/interactivities/Ordre phrase.wgt/img/slate-edit.png
deleted file mode 100644
index 17f5fc5c..00000000
Binary files a/resources/library/interactivities/Ordre phrase.wgt/img/slate-edit.png and /dev/null differ
diff --git a/resources/library/interactivities/Ordre phrase.wgt/img/slate-help-white.png b/resources/library/interactivities/Ordre phrase.wgt/img/slate-help-white.png
deleted file mode 100644
index 7b5ebfd8..00000000
Binary files a/resources/library/interactivities/Ordre phrase.wgt/img/slate-help-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Ordre phrase.wgt/img/slate-help.png b/resources/library/interactivities/Ordre phrase.wgt/img/slate-help.png
deleted file mode 100644
index 069052d0..00000000
Binary files a/resources/library/interactivities/Ordre phrase.wgt/img/slate-help.png and /dev/null differ
diff --git a/resources/library/interactivities/Ordre phrase.wgt/img/slate-toolbar-help.png b/resources/library/interactivities/Ordre phrase.wgt/img/slate-toolbar-help.png
new file mode 100644
index 00000000..fb7cdeba
Binary files /dev/null and b/resources/library/interactivities/Ordre phrase.wgt/img/slate-toolbar-help.png differ
diff --git a/resources/library/interactivities/Ordre phrase.wgt/img/slate-toolbar-reload-white.png b/resources/library/interactivities/Ordre phrase.wgt/img/slate-toolbar-reload-white.png
deleted file mode 100644
index 78d146ec..00000000
Binary files a/resources/library/interactivities/Ordre phrase.wgt/img/slate-toolbar-reload-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Ordre phrase.wgt/img/slate-toolbar-reload.png b/resources/library/interactivities/Ordre phrase.wgt/img/slate-toolbar-reload.png
index 685a5cb2..844169a9 100644
Binary files a/resources/library/interactivities/Ordre phrase.wgt/img/slate-toolbar-reload.png and b/resources/library/interactivities/Ordre phrase.wgt/img/slate-toolbar-reload.png differ
diff --git a/resources/library/interactivities/Ordre phrase.wgt/img/toolbar-edit.png b/resources/library/interactivities/Ordre phrase.wgt/img/toolbar-edit.png
new file mode 100644
index 00000000..daa338cd
Binary files /dev/null and b/resources/library/interactivities/Ordre phrase.wgt/img/toolbar-edit.png differ
diff --git a/resources/library/interactivities/Ordre phrase.wgt/img/toolbar-help.png b/resources/library/interactivities/Ordre phrase.wgt/img/toolbar-help.png
new file mode 100644
index 00000000..6c4454c0
Binary files /dev/null and b/resources/library/interactivities/Ordre phrase.wgt/img/toolbar-help.png differ
diff --git a/resources/library/interactivities/Ordre phrase.wgt/img/toolbar-reload.png b/resources/library/interactivities/Ordre phrase.wgt/img/toolbar-reload.png
new file mode 100644
index 00000000..340d7371
Binary files /dev/null and b/resources/library/interactivities/Ordre phrase.wgt/img/toolbar-reload.png differ
diff --git a/resources/library/interactivities/Ordre phrase.wgt/index.html b/resources/library/interactivities/Ordre phrase.wgt/index.html
index 48305e39..90fcc335 100644
--- a/resources/library/interactivities/Ordre phrase.wgt/index.html
+++ b/resources/library/interactivities/Ordre phrase.wgt/index.html
@@ -60,11 +60,6 @@
-
-
-
-
-
@@ -74,7 +69,17 @@
diff --git a/resources/library/interactivities/Ordre phrase.wgt/locales/fr/index.html b/resources/library/interactivities/Ordre phrase.wgt/locales/fr/index.html
index 763aa128..ef868edb 100644
--- a/resources/library/interactivities/Ordre phrase.wgt/locales/fr/index.html
+++ b/resources/library/interactivities/Ordre phrase.wgt/locales/fr/index.html
@@ -36,11 +36,6 @@
-
-
-
-
-
@@ -50,7 +45,17 @@
diff --git a/resources/library/interactivities/Ordre phrase.wgt/locales/fr/script/template2.js b/resources/library/interactivities/Ordre phrase.wgt/locales/fr/script/template2.js
index 65cbc135..184102b8 100644
--- a/resources/library/interactivities/Ordre phrase.wgt/locales/fr/script/template2.js
+++ b/resources/library/interactivities/Ordre phrase.wgt/locales/fr/script/template2.js
@@ -26,7 +26,7 @@ function checkResponse()
*/
var sankoreLang = {
- view: "Afficher",
+ view: "Fermer",
edit: "Modifier",
example: "Cette phrase\nest un\nexemple",
wgt_name: "Ordonner des phrases",
@@ -36,23 +36,23 @@ var sankoreLang = {
none: "aucun",
help: "Aide",
help_content: "
Ordonner des phrases "+
-"
Ordonner des segments de phrases pour reconstituer le texte. "+
+ "
Ordonner des segments de phrases pour reconstituer le texte. "+
-"Des étiquettes avec des phrases sont dans le désordre. Le but est de les remettre en ordre pour avoir un texte compréhensible et correct. Lorsque le texte est en ordre, l’interactivité se colore en vert. L’activité s’effectue par un glisser-déposer des étiquettes pour remettre le texte en ordre.
"+
+ "Des étiquettes avec des phrases sont dans le désordre. Le but est de les remettre en ordre pour avoir un texte compréhensible et correct. Lorsque le texte est en ordre, l’interactivité se colore en vert. L’activité s’effectue par un glisser-déposer des étiquettes pour remettre le texte en ordre.
"+
-"Le bouton “Recharger” réinitialise l’exercice.
"+
+ "Le bouton “Recharger” réinitialise l’exercice.
"+
-"Le bouton “Modifier” vous permet :
"+
-"de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut aucun), "+
-"de déterminer le texte à reconstituer et le nombre de séparations dans l’énoncé. "+
+ "Le bouton “Modifier” vous permet :
"+
+ "de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut aucun), "+
+ "de déterminer le texte à reconstituer et le nombre de séparations dans l’énoncé. "+
-"Pour insérer du texte dans la zone, cliquez sur la zone et saisissez le texte souhaité.
"+
-"Pour ajouter des séparations dans l’énoncé, retournez à la ligne. Votre texte sera séparé lors d'un retour à la ligne.
"+
+ "Pour insérer du texte dans la zone, cliquez sur la zone et saisissez le texte souhaité.
"+
+ "Pour ajouter des séparations dans l’énoncé, retournez à la ligne. Votre texte sera séparé lors d'un retour à la ligne.
"+
-"Le bouton “Afficher” vous permet d’utiliser l’activité.
"
+ "Le bouton “Afficher” vous permet d’utiliser l’activité.
",
+ theme:"Thème"
};
-
var sentence = "";
var curSentence = "";
@@ -82,23 +82,34 @@ var input_width = 606;
var widget_padding = 0;
$(document).ready(function(){
- if(sankore.preference("ord_phrases_style","")){
- changeStyle(sankore.preference("ord_phrases_style",""));
- $(".style_select").val(sankore.preference("ord_phrases_style",""));
- } else
- changeStyle("3")
-
+ if(window.sankore)
+ if(sankore.preference("ord_phrases_style","")){
+ changeStyle(sankore.preference("ord_phrases_style",""));
+ $("#style_select").val(sankore.preference("ord_phrases_style",""));
+ } else
+ changeStyle("3")
+
$("#wgt_display").text(sankoreLang.view);
$("#wgt_edit").text(sankoreLang.edit);
$("#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);
+
+ var tmpl = $("div.inline label").html();
+ $("div.inline label").html(sankoreLang.theme + tmpl)
+
+ $("#style_select").change(function (event){
+ changeStyle($(this).find("option:selected").val());
+ })
$("#wgt_display, #wgt_edit").click(function(event){
if(this.id == "wgt_display"){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
- $(".style_select").css("display","none");
+ $("#parameters").css("display","none");
$(this).css("display", "none");
$("#wgt_edit").css("display", "block");
modeView();
@@ -107,7 +118,7 @@ $(document).ready(function(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
$(this).css("display", "none");
$("#wgt_display").css("display", "block");
modeEdit();
@@ -120,11 +131,13 @@ $(document).ready(function(){
$("#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");
$("#ub-widget").show();
});
- } else {
+ } else {
+ ($("#style_select").val() == 1)?$(this).removeClass("help_pad").addClass("help_wood"):$(this).removeClass("help_wood").addClass("help_pad");
$("#ub-widget").hide();
$("#help").slideDown("100", function(){
tmp.addClass("open");
@@ -158,13 +171,7 @@ $(document).ready(function(){
}
});
- $(".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").change(function (event){
- changeStyle($(this).find("option:selected").val());
- })
})
function str_replace( w, b, s ){
@@ -230,10 +237,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 option:first").attr('selected',true);
+ $("body, html").removeClass("without_radius").addClass("radius_ft");
break;
case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back");
@@ -247,10 +254,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 option:first").next().attr('selected',true);
+ $("body, html").removeClass("without_radius").removeClass("radius_ft");
break;
case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad");
@@ -264,10 +271,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 option:last").attr('selected',true);
+ $("body, html").addClass("without_radius").removeClass("radius_ft");
break;
}
}
@@ -355,7 +362,7 @@ function modeEdit()
if (window.widget) {
window.widget.onleave = function(){
- sankore.setPreference("ord_phrases_style", $(".style_select").find("option:selected").val());
+ sankore.setPreference("ord_phrases_style", $("#style_select").find("option:selected").val());
if($( "#mp_word textarea" ).val())
{
modeView();
@@ -377,4 +384,4 @@ if (window.widget) {
}
sankore.setPreference("rightOrdPhrases", sentence);
}
-}
+}
\ No newline at end of file
diff --git a/resources/library/interactivities/Ordre phrase.wgt/locales/ru/index.html b/resources/library/interactivities/Ordre phrase.wgt/locales/ru/index.html
index 763aa128..ef868edb 100644
--- a/resources/library/interactivities/Ordre phrase.wgt/locales/ru/index.html
+++ b/resources/library/interactivities/Ordre phrase.wgt/locales/ru/index.html
@@ -36,11 +36,6 @@
-
-
-
-
-
@@ -50,7 +45,17 @@
diff --git a/resources/library/interactivities/Ordre phrase.wgt/locales/ru/script/template2.js b/resources/library/interactivities/Ordre phrase.wgt/locales/ru/script/template2.js
index 8163d8af..398d9fa7 100644
--- a/resources/library/interactivities/Ordre phrase.wgt/locales/ru/script/template2.js
+++ b/resources/library/interactivities/Ordre phrase.wgt/locales/ru/script/template2.js
@@ -27,7 +27,7 @@ function checkResponse()
var sankoreLang = {
edit: "Изменить",
- view: "Просмотр",
+ view: "Закрыть",
example: "это\nпример\nпредложения",
wgt_name: "Порядок фраз",
reload: "Обновить",
@@ -35,10 +35,10 @@ var sankoreLang = {
pad: "Планшет",
none: "Нет",
help: "Помощь",
- help_content: "Пример текста помощи ..."
+ help_content: "Пример текста помощи ...",
+ theme: "Тема"
}
-
var sentence = "";
var curSentence = "";
@@ -68,23 +68,34 @@ var input_width = 606;
var widget_padding = 0;
$(document).ready(function(){
- if(sankore.preference("ord_phrases_style","")){
- changeStyle(sankore.preference("ord_phrases_style",""));
- $(".style_select").val(sankore.preference("ord_phrases_style",""));
- } else
- changeStyle("3")
-
+ if(window.sankore)
+ if(sankore.preference("ord_phrases_style","")){
+ changeStyle(sankore.preference("ord_phrases_style",""));
+ $("#style_select").val(sankore.preference("ord_phrases_style",""));
+ } else
+ changeStyle("3")
+
$("#wgt_display").text(sankoreLang.view);
$("#wgt_edit").text(sankoreLang.edit);
$("#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);
+
+ var tmpl = $("div.inline label").html();
+ $("div.inline label").html(sankoreLang.theme + tmpl)
+
+ $("#style_select").change(function (event){
+ changeStyle($(this).find("option:selected").val());
+ })
$("#wgt_display, #wgt_edit").click(function(event){
if(this.id == "wgt_display"){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
- $(".style_select").css("display","none");
+ $("#parameters").css("display","none");
$(this).css("display", "none");
$("#wgt_edit").css("display", "block");
modeView();
@@ -93,7 +104,7 @@ $(document).ready(function(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
$(this).css("display", "none");
$("#wgt_display").css("display", "block");
modeEdit();
@@ -106,11 +117,13 @@ $(document).ready(function(){
$("#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");
$("#ub-widget").show();
});
- } else {
+ } else {
+ ($("#style_select").val() == 1)?$(this).removeClass("help_pad").addClass("help_wood"):$(this).removeClass("help_wood").addClass("help_pad");
$("#ub-widget").hide();
$("#help").slideDown("100", function(){
tmp.addClass("open");
@@ -144,13 +157,7 @@ $(document).ready(function(){
}
});
- $(".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").change(function (event){
- changeStyle($(this).find("option:selected").val());
- })
})
function str_replace( w, b, s ){
@@ -216,10 +223,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 option:first").attr('selected',true);
+ $("body, html").removeClass("without_radius").addClass("radius_ft");
break;
case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back");
@@ -233,10 +240,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 option:first").next().attr('selected',true);
+ $("body, html").removeClass("without_radius").removeClass("radius_ft");
break;
case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad");
@@ -250,10 +257,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 option:last").attr('selected',true);
+ $("body, html").addClass("without_radius").removeClass("radius_ft");
break;
}
}
@@ -341,7 +348,7 @@ function modeEdit()
if (window.widget) {
window.widget.onleave = function(){
- sankore.setPreference("ord_phrases_style", $(".style_select").find("option:selected").val());
+ sankore.setPreference("ord_phrases_style", $("#style_select").find("option:selected").val());
if($( "#mp_word textarea" ).val())
{
modeView();
@@ -363,4 +370,4 @@ if (window.widget) {
}
sankore.setPreference("rightOrdPhrases", sentence);
}
-}
+}
\ No newline at end of file
diff --git a/resources/library/interactivities/Ordre phrase.wgt/scripts/template2.js b/resources/library/interactivities/Ordre phrase.wgt/scripts/template2.js
index 99241058..d63220b3 100644
--- a/resources/library/interactivities/Ordre phrase.wgt/scripts/template2.js
+++ b/resources/library/interactivities/Ordre phrase.wgt/scripts/template2.js
@@ -28,7 +28,7 @@ function checkResponse()
var sankoreLang = {
edit: "Edit",
- view: "Display",
+ view: "Close",
example: "this is\nan example\nsentence",
wgt_name: "Order phrases",
reload: "Reload",
@@ -36,7 +36,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"
}
@@ -72,7 +73,7 @@ $(document).ready(function(){
if(window.sankore)
if(sankore.preference("ord_phrases_style","")){
changeStyle(sankore.preference("ord_phrases_style",""));
- $(".style_select").val(sankore.preference("ord_phrases_style",""));
+ $("#style_select").val(sankore.preference("ord_phrases_style",""));
} else
changeStyle("3")
@@ -80,13 +81,23 @@ $(document).ready(function(){
$("#wgt_edit").text(sankoreLang.edit);
$("#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);
+
+ var tmpl = $("div.inline label").html();
+ $("div.inline label").html(sankoreLang.theme + tmpl)
+
+ $("#style_select").change(function (event){
+ changeStyle($(this).find("option:selected").val());
+ })
$("#wgt_display, #wgt_edit").click(function(event){
if(this.id == "wgt_display"){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_edit").removeClass("selected");
- $(".style_select").css("display","none");
+ $("#parameters").css("display","none");
$(this).css("display", "none");
$("#wgt_edit").css("display", "block");
modeView();
@@ -95,7 +106,7 @@ $(document).ready(function(){
if(!$(this).hasClass("selected")){
$(this).addClass("selected");
$("#wgt_display").removeClass("selected");
- $(".style_select").css("display","block");
+ $("#parameters").css("display","block");
$(this).css("display", "none");
$("#wgt_display").css("display", "block");
modeEdit();
@@ -108,11 +119,13 @@ $(document).ready(function(){
$("#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");
$("#ub-widget").show();
});
- } else {
+ } else {
+ ($("#style_select").val() == 1)?$(this).removeClass("help_pad").addClass("help_wood"):$(this).removeClass("help_wood").addClass("help_pad");
$("#ub-widget").hide();
$("#help").slideDown("100", function(){
tmp.addClass("open");
@@ -146,13 +159,7 @@ $(document).ready(function(){
}
});
- $(".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").change(function (event){
- changeStyle($(this).find("option:selected").val());
- })
})
function str_replace( w, b, s ){
@@ -218,10 +225,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 option:first").attr('selected',true);
+ $("body, html").removeClass("without_radius").addClass("radius_ft");
break;
case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back");
@@ -235,10 +242,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 option:first").next().attr('selected',true);
+ $("body, html").removeClass("without_radius").removeClass("radius_ft");
break;
case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad");
@@ -252,10 +259,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 option:last").attr('selected',true);
+ $("body, html").addClass("without_radius").removeClass("radius_ft");
break;
}
}
@@ -343,7 +350,7 @@ function modeEdit()
if (window.widget) {
window.widget.onleave = function(){
- sankore.setPreference("ord_phrases_style", $(".style_select").find("option:selected").val());
+ sankore.setPreference("ord_phrases_style", $("#style_select").find("option:selected").val());
if($( "#mp_word textarea" ).val())
{
modeView();
diff --git a/resources/library/interactivities/Ordre phrase.wgt/styles/of_puppets.css b/resources/library/interactivities/Ordre phrase.wgt/styles/of_puppets.css
index 401a2bea..741bf47f 100644
--- a/resources/library/interactivities/Ordre phrase.wgt/styles/of_puppets.css
+++ b/resources/library/interactivities/Ordre phrase.wgt/styles/of_puppets.css
@@ -3,7 +3,7 @@ html, body{
height: 100%;
margin: 0;
padding: 0;
- border-radius: 50px;
+ border-radius: 35px;
overflow: hidden;
}
@@ -149,57 +149,40 @@ textarea{
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{
@@ -234,51 +217,50 @@ textarea{
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;
@@ -287,5 +269,36 @@ textarea{
}
.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/Selectionner.wgt/css/basic.css b/resources/library/interactivities/Selectionner.wgt/css/basic.css
index 8a5c3d9d..7f682d90 100644
--- a/resources/library/interactivities/Selectionner.wgt/css/basic.css
+++ b/resources/library/interactivities/Selectionner.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;
@@ -322,57 +314,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{
@@ -407,51 +382,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;
@@ -460,5 +434,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/Selectionner.wgt/img/ar_down.png b/resources/library/interactivities/Selectionner.wgt/img/ar_down.png
deleted file mode 100644
index a20fab4f..00000000
Binary files a/resources/library/interactivities/Selectionner.wgt/img/ar_down.png and /dev/null differ
diff --git a/resources/library/interactivities/Selectionner.wgt/img/ar_down_white.png b/resources/library/interactivities/Selectionner.wgt/img/ar_down_white.png
deleted file mode 100644
index 4a1d133b..00000000
Binary files a/resources/library/interactivities/Selectionner.wgt/img/ar_down_white.png and /dev/null differ
diff --git a/resources/library/interactivities/Selectionner.wgt/img/green_point.png b/resources/library/interactivities/Selectionner.wgt/img/green_point.png
deleted file mode 100644
index a2a44680..00000000
Binary files a/resources/library/interactivities/Selectionner.wgt/img/green_point.png and /dev/null differ
diff --git a/resources/library/interactivities/Selectionner.wgt/img/parameters-bg.png b/resources/library/interactivities/Selectionner.wgt/img/parameters-bg.png
new file mode 100644
index 00000000..36f648e1
Binary files /dev/null and b/resources/library/interactivities/Selectionner.wgt/img/parameters-bg.png differ
diff --git a/resources/library/interactivities/Selectionner.wgt/img/red_point.png b/resources/library/interactivities/Selectionner.wgt/img/red_point.png
deleted file mode 100644
index f6daa19a..00000000
Binary files a/resources/library/interactivities/Selectionner.wgt/img/red_point.png and /dev/null differ
diff --git a/resources/library/interactivities/Selectionner.wgt/img/slate-display.png b/resources/library/interactivities/Selectionner.wgt/img/slate-display.png
deleted file mode 100644
index 96166143..00000000
Binary files a/resources/library/interactivities/Selectionner.wgt/img/slate-display.png and /dev/null differ
diff --git a/resources/library/interactivities/Selectionner.wgt/img/slate-edit.png b/resources/library/interactivities/Selectionner.wgt/img/slate-edit.png
deleted file mode 100644
index 17f5fc5c..00000000
Binary files a/resources/library/interactivities/Selectionner.wgt/img/slate-edit.png and /dev/null differ
diff --git a/resources/library/interactivities/Selectionner.wgt/img/slate-help-white.png b/resources/library/interactivities/Selectionner.wgt/img/slate-help-white.png
deleted file mode 100644
index 7b5ebfd8..00000000
Binary files a/resources/library/interactivities/Selectionner.wgt/img/slate-help-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Selectionner.wgt/img/slate-help.png b/resources/library/interactivities/Selectionner.wgt/img/slate-help.png
deleted file mode 100644
index 069052d0..00000000
Binary files a/resources/library/interactivities/Selectionner.wgt/img/slate-help.png and /dev/null differ
diff --git a/resources/library/interactivities/Selectionner.wgt/img/slate-toolbar-help.png b/resources/library/interactivities/Selectionner.wgt/img/slate-toolbar-help.png
new file mode 100644
index 00000000..fb7cdeba
Binary files /dev/null and b/resources/library/interactivities/Selectionner.wgt/img/slate-toolbar-help.png differ
diff --git a/resources/library/interactivities/Selectionner.wgt/img/slate-toolbar-reload-white.png b/resources/library/interactivities/Selectionner.wgt/img/slate-toolbar-reload-white.png
deleted file mode 100644
index 78d146ec..00000000
Binary files a/resources/library/interactivities/Selectionner.wgt/img/slate-toolbar-reload-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Selectionner.wgt/img/slate-toolbar-reload.png b/resources/library/interactivities/Selectionner.wgt/img/slate-toolbar-reload.png
index 685a5cb2..844169a9 100644
Binary files a/resources/library/interactivities/Selectionner.wgt/img/slate-toolbar-reload.png and b/resources/library/interactivities/Selectionner.wgt/img/slate-toolbar-reload.png differ
diff --git a/resources/library/interactivities/Selectionner.wgt/img/toolbar-edit.png b/resources/library/interactivities/Selectionner.wgt/img/toolbar-edit.png
new file mode 100644
index 00000000..daa338cd
Binary files /dev/null and b/resources/library/interactivities/Selectionner.wgt/img/toolbar-edit.png differ
diff --git a/resources/library/interactivities/Selectionner.wgt/img/toolbar-help.png b/resources/library/interactivities/Selectionner.wgt/img/toolbar-help.png
new file mode 100644
index 00000000..6c4454c0
Binary files /dev/null and b/resources/library/interactivities/Selectionner.wgt/img/toolbar-help.png differ
diff --git a/resources/library/interactivities/Selectionner.wgt/img/toolbar-reload.png b/resources/library/interactivities/Selectionner.wgt/img/toolbar-reload.png
new file mode 100644
index 00000000..340d7371
Binary files /dev/null and b/resources/library/interactivities/Selectionner.wgt/img/toolbar-reload.png differ
diff --git a/resources/library/interactivities/Selectionner.wgt/index.html b/resources/library/interactivities/Selectionner.wgt/index.html
index 688bb52f..47062b93 100644
--- a/resources/library/interactivities/Selectionner.wgt/index.html
+++ b/resources/library/interactivities/Selectionner.wgt/index.html
@@ -52,11 +52,6 @@
-
-
-
-
-
@@ -66,7 +61,17 @@
diff --git a/resources/library/interactivities/Selectionner.wgt/js/script.js b/resources/library/interactivities/Selectionner.wgt/js/script.js
index f8a5f9a2..0e96f2eb 100644
--- a/resources/library/interactivities/Selectionner.wgt/js/script.js
+++ b/resources/library/interactivities/Selectionner.wgt/js/script.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- display: "Display",
+ display: "Close",
edit: "Edit",
short_desc: "Select animals from the following list:",
add: "Add new block",
@@ -15,7 +15,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
@@ -27,9 +28,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("selectionner","")){
@@ -39,7 +42,7 @@ function start(){
showExample();
if(sankore.preference("sel_style","")){
changeStyle(sankore.preference("sel_style",""));
- $(".style_select").val(sankore.preference("sel_style",""));
+ $("#style_select").val(sankore.preference("sel_style",""));
} else
changeStyle("3")
}
@@ -50,18 +53,20 @@ function start(){
if (window.widget) {
window.widget.onleave = function(){
exportData();
- sankore.setPreference("sel_style", $(".style_select").find("option:selected").val());
+ sankore.setPreference("sel_style", $("#style_select").find("option:selected").val());
}
}
$("#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");
@@ -83,7 +88,7 @@ function start(){
$("#wgt_display").trigger("click");
});
- $(".style_select").change(function (event){
+ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@@ -94,7 +99,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);
@@ -122,7 +127,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);
@@ -446,10 +451,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");
@@ -463,10 +468,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");
@@ -480,10 +485,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/Selectionner.wgt/locales/fr/index.html b/resources/library/interactivities/Selectionner.wgt/locales/fr/index.html
index 218567a2..33fa36f6 100644
--- a/resources/library/interactivities/Selectionner.wgt/locales/fr/index.html
+++ b/resources/library/interactivities/Selectionner.wgt/locales/fr/index.html
@@ -26,11 +26,6 @@
-
-
-
-
-
@@ -40,7 +35,17 @@
diff --git a/resources/library/interactivities/Selectionner.wgt/locales/fr/js/script.js b/resources/library/interactivities/Selectionner.wgt/locales/fr/js/script.js
index 7650dcaf..7cdd8d02 100644
--- a/resources/library/interactivities/Selectionner.wgt/locales/fr/js/script.js
+++ b/resources/library/interactivities/Selectionner.wgt/locales/fr/js/script.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- display: "Afficher",
+ display: "Fermer",
edit: "Modifier",
short_desc: "Sélectionner les animaux dans la liste suivante :",
add: "Nouveau bloc",
@@ -16,24 +16,25 @@ var sankoreLang = {
none: "aucun",
help: "Aide",
help_content: "
Sélectionner "+
-"
Trouver les éléments correspondants à la consigne. "+
+ "
Trouver les éléments correspondants à la consigne. "+
-"Une consigne est écrite précisant le ou les éléments à chercher parmi tous les éléments proposés. Le but est de trouver les éléments correspondants à la consigne. L’activité s’effectue en cochant les cases sous les éléments correspondants. Une fois que tous les éléments corrects sont cochés, la zone se colore en vert.
"+
+ "Une consigne est écrite précisant le ou les éléments à chercher parmi tous les éléments proposés. Le but est de trouver les éléments correspondants à la consigne. L’activité s’effectue en cochant les cases sous les éléments correspondants. Une fois que tous les éléments corrects sont cochés, la zone se colore en vert.
"+
-"Le bouton “Recharger” réinitialise les exercices.
"+
+ "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, puis
"+
-"insérez une consigne en cliquant sur le champ de texte “Saisir votre consigne ici ...”, "+
-"ajoutez des zones de texte en cliquant sur le gros “+T” vert en dessous puis entrez le texte voulu. "+
-"Pour supprimer une zone de texte, cliquez sur la croix située dans le coin supérieur de celle-ci.
"+
+ "En mode édition, pour créer un nouvel exercice, cliquez sur “Nouveau bloc” en bas, puis
"+
+ "insérez une consigne en cliquant sur le champ de texte “Saisir votre consigne ici ...”, "+
+ "ajoutez des zones de texte en cliquant sur le gros “+T” vert en dessous puis entrez le texte voulu. "+
+ "Pour supprimer une zone de texte, cliquez sur la croix située dans le coin supérieur 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
@@ -45,9 +46,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("selectionner","")){
@@ -57,7 +60,7 @@ function start(){
showExample();
if(sankore.preference("sel_style","")){
changeStyle(sankore.preference("sel_style",""));
- $(".style_select").val(sankore.preference("sel_style",""));
+ $("#style_select").val(sankore.preference("sel_style",""));
} else
changeStyle("3")
}
@@ -68,18 +71,20 @@ function start(){
if (window.widget) {
window.widget.onleave = function(){
exportData();
- sankore.setPreference("sel_style", $(".style_select").find("option:selected").val());
+ sankore.setPreference("sel_style", $("#style_select").find("option:selected").val());
}
}
$("#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");
@@ -101,7 +106,7 @@ function start(){
$("#wgt_display").trigger("click");
});
- $(".style_select").change(function (event){
+ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@@ -112,7 +117,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);
@@ -140,7 +145,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);
@@ -196,31 +201,31 @@ function start(){
if($(this).is(":checked"))
$(this).parent().find("input:hidden").val(1);
else
- $(this).parent().find("input:hidden").val(0);
- }
- });
+ $(this).parent().find("input:hidden").val(0);
+ }
+ });
- //play/pause event
- $(".play, .stop").live("click", function(){
- var tmp_audio = $(this);
- var audio = tmp_audio.parent().find("audio").get(0);
- if($(this).hasClass("play")){
+ //play/pause event
+ $(".play, .stop").live("click", function(){
+ var tmp_audio = $(this);
+ var audio = tmp_audio.parent().find("audio").get(0);
+ if($(this).hasClass("play")){
if(tmp_audio.parent().find("source").attr("src")){
- tmp_audio.removeClass("play").addClass("stop");
- var id = setInterval(function(){
- if(audio.currentTime == audio.duration){
- clearInterval(id);
- tmp_audio.removeClass("stop").addClass("play");
- }
+ tmp_audio.removeClass("play").addClass("stop");
+ var id = setInterval(function(){
+ if(audio.currentTime == audio.duration){
+ clearInterval(id);
+ tmp_audio.removeClass("stop").addClass("play");
+ }
}, 10);
- tmp_audio.parent().find("input").val(id);
- audio.play();
+ tmp_audio.parent().find("input").val(id);
+ audio.play();
}
- } else {
- $(this).removeClass("stop").addClass("play");
- clearInterval( tmp_audio.parent().find("input").val())
- audio.pause();
- }
+ } else {
+ $(this).removeClass("stop").addClass("play");
+ clearInterval( tmp_audio.parent().find("input").val())
+ audio.pause();
+ }
});
$(".replay").live("click", function(){
@@ -463,10 +468,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");
@@ -480,10 +485,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");
@@ -497,10 +502,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/Selectionner.wgt/locales/ru/index.html b/resources/library/interactivities/Selectionner.wgt/locales/ru/index.html
index 1e415855..61714a1f 100644
--- a/resources/library/interactivities/Selectionner.wgt/locales/ru/index.html
+++ b/resources/library/interactivities/Selectionner.wgt/locales/ru/index.html
@@ -26,11 +26,6 @@
-
-
-
-
-
@@ -40,7 +35,17 @@
diff --git a/resources/library/interactivities/Selectionner.wgt/locales/ru/js/script.js b/resources/library/interactivities/Selectionner.wgt/locales/ru/js/script.js
index 872e57bf..8f4f3589 100644
--- a/resources/library/interactivities/Selectionner.wgt/locales/ru/js/script.js
+++ b/resources/library/interactivities/Selectionner.wgt/locales/ru/js/script.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- display: "Показать",
+ display: "Закрыть",
edit: "Изменить",
short_desc: "Выберите животных из следующего списка:",
add: "Новый блок",
@@ -15,7 +15,8 @@ var sankoreLang = {
pad: "Планшет",
none: "Нет",
help: "Помощь",
- help_content: "Пример текста помощи ..."
+ help_content: "Пример текста помощи ...",
+ theme: "Тема"
};
//main function
@@ -27,9 +28,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("selectionner","")){
@@ -39,7 +42,7 @@ function start(){
showExample();
if(sankore.preference("sel_style","")){
changeStyle(sankore.preference("sel_style",""));
- $(".style_select").val(sankore.preference("sel_style",""));
+ $("#style_select").val(sankore.preference("sel_style",""));
} else
changeStyle("3")
}
@@ -50,18 +53,20 @@ function start(){
if (window.widget) {
window.widget.onleave = function(){
exportData();
- sankore.setPreference("sel_style", $(".style_select").find("option:selected").val());
+ sankore.setPreference("sel_style", $("#style_select").find("option:selected").val());
}
}
$("#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");
@@ -83,7 +88,7 @@ function start(){
$("#wgt_display").trigger("click");
});
- $(".style_select").change(function (event){
+ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val());
})
@@ -94,7 +99,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);
@@ -122,7 +127,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);
@@ -178,31 +183,31 @@ function start(){
if($(this).is(":checked"))
$(this).parent().find("input:hidden").val(1);
else
- $(this).parent().find("input:hidden").val(0);
- }
- });
+ $(this).parent().find("input:hidden").val(0);
+ }
+ });
- //play/pause event
- $(".play, .stop").live("click", function(){
- var tmp_audio = $(this);
- var audio = tmp_audio.parent().find("audio").get(0);
- if($(this).hasClass("play")){
+ //play/pause event
+ $(".play, .stop").live("click", function(){
+ var tmp_audio = $(this);
+ var audio = tmp_audio.parent().find("audio").get(0);
+ if($(this).hasClass("play")){
if(tmp_audio.parent().find("source").attr("src")){
- tmp_audio.removeClass("play").addClass("stop");
- var id = setInterval(function(){
- if(audio.currentTime == audio.duration){
- clearInterval(id);
- tmp_audio.removeClass("stop").addClass("play");
- }
+ tmp_audio.removeClass("play").addClass("stop");
+ var id = setInterval(function(){
+ if(audio.currentTime == audio.duration){
+ clearInterval(id);
+ tmp_audio.removeClass("stop").addClass("play");
+ }
}, 10);
- tmp_audio.parent().find("input").val(id);
- audio.play();
+ tmp_audio.parent().find("input").val(id);
+ audio.play();
}
- } else {
- $(this).removeClass("stop").addClass("play");
- clearInterval( tmp_audio.parent().find("input").val())
- audio.pause();
- }
+ } else {
+ $(this).removeClass("stop").addClass("play");
+ clearInterval( tmp_audio.parent().find("input").val())
+ audio.pause();
+ }
});
$(".replay").live("click", function(){
@@ -445,10 +450,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");
@@ -462,10 +467,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");
@@ -479,10 +484,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/Separe phrase.wgt/img/ar_down.png b/resources/library/interactivities/Separe phrase.wgt/img/ar_down.png
deleted file mode 100644
index a20fab4f..00000000
Binary files a/resources/library/interactivities/Separe phrase.wgt/img/ar_down.png and /dev/null differ
diff --git a/resources/library/interactivities/Separe phrase.wgt/img/ar_down_white.png b/resources/library/interactivities/Separe phrase.wgt/img/ar_down_white.png
deleted file mode 100644
index 4a1d133b..00000000
Binary files a/resources/library/interactivities/Separe phrase.wgt/img/ar_down_white.png and /dev/null differ
diff --git a/resources/library/interactivities/Separe phrase.wgt/img/parameters-bg.png b/resources/library/interactivities/Separe phrase.wgt/img/parameters-bg.png
new file mode 100644
index 00000000..36f648e1
Binary files /dev/null and b/resources/library/interactivities/Separe phrase.wgt/img/parameters-bg.png differ
diff --git a/resources/library/interactivities/Separe phrase.wgt/img/slate-display.png b/resources/library/interactivities/Separe phrase.wgt/img/slate-display.png
deleted file mode 100644
index 96166143..00000000
Binary files a/resources/library/interactivities/Separe phrase.wgt/img/slate-display.png and /dev/null differ
diff --git a/resources/library/interactivities/Separe phrase.wgt/img/slate-edit.png b/resources/library/interactivities/Separe phrase.wgt/img/slate-edit.png
deleted file mode 100644
index 17f5fc5c..00000000
Binary files a/resources/library/interactivities/Separe phrase.wgt/img/slate-edit.png and /dev/null differ
diff --git a/resources/library/interactivities/Separe phrase.wgt/img/slate-help-white.png b/resources/library/interactivities/Separe phrase.wgt/img/slate-help-white.png
deleted file mode 100644
index 7b5ebfd8..00000000
Binary files a/resources/library/interactivities/Separe phrase.wgt/img/slate-help-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Separe phrase.wgt/img/slate-help.png b/resources/library/interactivities/Separe phrase.wgt/img/slate-help.png
deleted file mode 100644
index 069052d0..00000000
Binary files a/resources/library/interactivities/Separe phrase.wgt/img/slate-help.png and /dev/null differ
diff --git a/resources/library/interactivities/Separe phrase.wgt/img/slate-toolbar-help.png b/resources/library/interactivities/Separe phrase.wgt/img/slate-toolbar-help.png
new file mode 100644
index 00000000..fb7cdeba
Binary files /dev/null and b/resources/library/interactivities/Separe phrase.wgt/img/slate-toolbar-help.png differ
diff --git a/resources/library/interactivities/Separe phrase.wgt/img/slate-toolbar-reload-white.png b/resources/library/interactivities/Separe phrase.wgt/img/slate-toolbar-reload-white.png
deleted file mode 100644
index 78d146ec..00000000
Binary files a/resources/library/interactivities/Separe phrase.wgt/img/slate-toolbar-reload-white.png and /dev/null differ
diff --git a/resources/library/interactivities/Separe phrase.wgt/img/slate-toolbar-reload.png b/resources/library/interactivities/Separe phrase.wgt/img/slate-toolbar-reload.png
index 685a5cb2..844169a9 100644
Binary files a/resources/library/interactivities/Separe phrase.wgt/img/slate-toolbar-reload.png and b/resources/library/interactivities/Separe phrase.wgt/img/slate-toolbar-reload.png differ
diff --git a/resources/library/interactivities/Separe phrase.wgt/img/toolbar-edit.png b/resources/library/interactivities/Separe phrase.wgt/img/toolbar-edit.png
new file mode 100644
index 00000000..daa338cd
Binary files /dev/null and b/resources/library/interactivities/Separe phrase.wgt/img/toolbar-edit.png differ
diff --git a/resources/library/interactivities/Separe phrase.wgt/img/toolbar-help.png b/resources/library/interactivities/Separe phrase.wgt/img/toolbar-help.png
new file mode 100644
index 00000000..6c4454c0
Binary files /dev/null and b/resources/library/interactivities/Separe phrase.wgt/img/toolbar-help.png differ
diff --git a/resources/library/interactivities/Separe phrase.wgt/img/toolbar-reload.png b/resources/library/interactivities/Separe phrase.wgt/img/toolbar-reload.png
new file mode 100644
index 00000000..340d7371
Binary files /dev/null and b/resources/library/interactivities/Separe phrase.wgt/img/toolbar-reload.png differ
diff --git a/resources/library/interactivities/Separe phrase.wgt/index.html b/resources/library/interactivities/Separe phrase.wgt/index.html
index e108a1c9..10583ebf 100644
--- a/resources/library/interactivities/Separe phrase.wgt/index.html
+++ b/resources/library/interactivities/Separe phrase.wgt/index.html
@@ -58,11 +58,6 @@
-
-
-
-
-
@@ -72,7 +67,17 @@
diff --git a/resources/library/interactivities/Separe phrase.wgt/locales/fr/index.html b/resources/library/interactivities/Separe phrase.wgt/locales/fr/index.html
index 593e885a..db3451e8 100644
--- a/resources/library/interactivities/Separe phrase.wgt/locales/fr/index.html
+++ b/resources/library/interactivities/Separe phrase.wgt/locales/fr/index.html
@@ -36,11 +36,6 @@
-
-
-
-
-
@@ -50,7 +45,17 @@
diff --git a/resources/library/interactivities/Separe phrase.wgt/locales/fr/scripts/wcontainer.js b/resources/library/interactivities/Separe phrase.wgt/locales/fr/scripts/wcontainer.js
index 73f641e9..e74b586e 100644
--- a/resources/library/interactivities/Separe phrase.wgt/locales/fr/scripts/wcontainer.js
+++ b/resources/library/interactivities/Separe phrase.wgt/locales/fr/scripts/wcontainer.js
@@ -1,5 +1,5 @@
var sankoreLang = {
- view: "Afficher",
+ view: "Fermer",
edit: "Modifier",
example: "Ceci est une série de mots à séparer correctement",
wgt_name: "Séparer une phrase",
@@ -9,25 +9,26 @@ var sankoreLang = {
none: "aucun",
help: "Aide",
help_content: "
Séparer une phrase "+
-"
Séparer les mots d’une phrase. "+
+ "
Séparer les mots d’une phrase. "+
-"Une phrase est écrite sans que les mots ne soient séparés. Le but de cette activité est d’insérer les espaces aux bons endroits. Une fois que les séparations sont placées correctement, la phrase se colore en vert.
"+
+ "Une phrase est écrite sans que les mots ne soient séparés. Le but de cette activité est d’insérer les espaces aux bons endroits. Une fois que les séparations sont placées correctement, la phrase se colore en vert.
"+
-"Pour ajouter des séparations entre les mots, déplacez le curseur et cliquez entre deux lettres, une séparation s’ajoute alors.
"+
+ "Pour ajouter des séparations entre les mots, déplacez le curseur et cliquez entre deux lettres, une séparation s’ajoute alors.
"+
-"Le bouton “Recharger” réinitialise l’exercice.
"+
+ "Le bouton “Recharger” réinitialise l’exercice.
"+
-"Le bouton “Modifier” vous permet :
"+
+ "Le bouton “Modifier” vous permet :
"+
-"de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut aucun), "+
-"de déterminer la phrase sur laquelle travailler. "+
+ "de choisir le thème de l’interactivité : tablette, ardoise ou aucun (par défaut aucun), "+
+ "de déterminer la phrase sur laquelle travailler. "+
-"Ecrivez simplement une phrase dans la zone de texte.
"+
+ "Ecrivez simplement une phrase dans la zone de texte.
"+
-"Le bouton “Afficher” vous permet d’utiliser l’activité.
"
+ "Le bouton “Afficher” vous permet d’utiliser l’activité.
",
+ theme: "Thème"
};
@@ -38,180 +39,180 @@ var isBrowser = ( typeof( widget ) == "undefined" );
function wcontainer( containerID )
{
- // some protecred variables
- var thisInstance = this;
- this.editMode = false;
- var data = {}; // see setData and getData
+ // some protecred variables
+ var thisInstance = this;
+ this.editMode = false;
+ var data = {}; // see setData and getData
- // widget size parameters
- this.minHeight = 100;
- this.minWidth = 400;
+ // widget size parameters
+ this.minHeight = 100;
+ this.minWidth = 400;
- // set to 0 for no max width restriction
- this.maxWidth = 0;
+ // set to 0 for no max width restriction
+ this.maxWidth = 0;
- // links to the elements of the widget
- this.elements = {};
+ // links to the elements of the widget
+ this.elements = {};
- /*
+ /*
============
create
============
- creates html base, inits this.elements, assings events
*/
- this.create = function( containerID )
- {
- var html =
- '' +
- '
' +
- '
' +
- '
' +
- '
' +
- '
';
+ this.create = function( containerID )
+ {
+ var html =
+ '' +
+ '
' +
+ '
' +
+ '
' +
+ '
' +
+ '
';
- var container = $( containerID );
+ var container = $( containerID );
- container.append( html );
- this.elements.edit = container.find( ".editmode" );
- this.elements.view = container.find( ".viewmode" );
- this.elements.container = container;
- this.elements.subcontainer = container.find( "#mp_content" );
- this.elements.containerView = this.elements.subcontainer.find( ".viewmode" );
- this.elements.containerEdit = this.elements.subcontainer.find( ".editmode" );
+ container.append( html );
+ this.elements.edit = container.find( ".editmode" );
+ this.elements.view = container.find( ".viewmode" );
+ this.elements.container = container;
+ this.elements.subcontainer = container.find( "#mp_content" );
+ this.elements.containerView = this.elements.subcontainer.find( ".viewmode" );
+ this.elements.containerEdit = this.elements.subcontainer.find( ".editmode" );
- $("#wgt_edit").live("click", function(){
- thisInstance.modeEdit();
- } );
+ $("#wgt_edit").live("click", function(){
+ thisInstance.modeEdit();
+ } );
- $("#wgt_display").live("click", function(){
- thisInstance.modeView();
- } );
- };
+ $("#wgt_display").live("click", function(){
+ thisInstance.modeView();
+ } );
+ };
- /*
+ /*
===============
setViewContent
===============
- assigns custom html to the viewmode container
*/
- this.setViewContent = function( html )
- {
- this.elements.container.find( "#mp_content .viewmode" ).html( html );
- };
+ this.setViewContent = function( html )
+ {
+ this.elements.container.find( "#mp_content .viewmode" ).html( html );
+ };
- /*
+ /*
===============
setEditContent
===============
- assigns custom html to the editmode container
*/
- this.setEditContent = function( html )
- {
- this.elements.container.find( "#mp_content .editmode" ).html( html );
- };
+ this.setEditContent = function( html )
+ {
+ this.elements.container.find( "#mp_content .editmode" ).html( html );
+ };
- /*
+ /*
=========================
modeEdit and modeView
=========================
- switch the widget betweed modes
* for customization extend onEditMode and onViewMode
*/
- this.modeEdit = function()
- {
- this.onEditMode();
- this.editMode = true;
- this.elements.edit.removeClass( "hide" );
- this.elements.view.addClass( "hide" );
+ this.modeEdit = function()
+ {
+ this.onEditMode();
+ this.editMode = true;
+ this.elements.edit.removeClass( "hide" );
+ this.elements.view.addClass( "hide" );
- //this.adjustSize();
- };
- this.modeView = function()
- {
- this.onViewMode();
- this.editMode = false;
- this.elements.edit.addClass( "hide" );
- this.elements.view.removeClass( "hide" );
+ //this.adjustSize();
+ };
+ this.modeView = function()
+ {
+ this.onViewMode();
+ this.editMode = false;
+ this.elements.edit.addClass( "hide" );
+ this.elements.view.removeClass( "hide" );
- //this.adjustSize();
- };
+ //this.adjustSize();
+ };
- /*
+ /*
======================
setData and getData
======================
- store some data inside
*/
- this.setData = function( name, value ){
- data[name] = value;
- };
- this.getData = function( name ){
- if( typeof( data[name] ) == "undefined" ){
- return null;
- } else return data[name];
- };
+ this.setData = function( name, value ){
+ data[name] = value;
+ };
+ this.getData = function( name ){
+ if( typeof( data[name] ) == "undefined" ){
+ return null;
+ } else return data[name];
+ };
- // redefinable methods
+ // redefinable methods
- /*
+ /*
==========================
onEditMode and onViewMode
==========================
- these are called when the mode is being changed
*/
- this.onEditMode = function(){
- //
- };
- this.onViewMode = function(){
- //
- };
-
- /*
+ this.onEditMode = function(){
+ //
+ };
+ this.onViewMode = function(){
+ //
+ };
+
+ /*
======================
viewSize and editSize
======================
- calculate container size for the adjustSize method
* they are likely to be redefined for each particular widget
*/
- this.viewSize = function(){
- return {
- w: this.elements.containerView.outerWidth(),
- h: this.elements.containerView.outerHeight()
- };
- };
- this.editSize = function(){
- return {
- w: this.elements.containerEdit.outerWidth(),
- h: this.elements.containerEdit.outerHeight()
- };
- };
-
- /*
+ this.viewSize = function(){
+ return {
+ w: this.elements.containerView.outerWidth(),
+ h: this.elements.containerView.outerHeight()
+ };
+ };
+ this.editSize = function(){
+ return {
+ w: this.elements.containerEdit.outerWidth(),
+ h: this.elements.containerEdit.outerHeight()
+ };
+ };
+
+ /*
=====================
checkAnswer
=====================
- check if the exercise in the view mode was done right
* redefine it for each particular widget
*/
- this.checkAnswer = function()
- {
- //
- };
-
-
- // constructor end
-
- // if the constructor was called with a parameter,
- // call create() automatically
- if( arguments.length > 0 ){
- this.create( containerID );
- }
- this.setData( "dw", this.elements.container.outerWidth( true ) - this.elements.container.width() );
- this.setData( "dh", this.elements.container.outerHeight( true ) - this.elements.container.height() );
- window.winstance = thisInstance;
+ this.checkAnswer = function()
+ {
+ //
+ };
+
+
+ // constructor end
+
+ // if the constructor was called with a parameter,
+ // call create() automatically
+ if( arguments.length > 0 ){
+ this.create( containerID );
+ }
+ this.setData( "dw", this.elements.container.outerWidth( true ) - this.elements.container.width() );
+ this.setData( "dh", this.elements.container.outerHeight( true ) - this.elements.container.height() );
+ window.winstance = thisInstance;
}
diff --git a/resources/library/interactivities/Separe phrase.wgt/locales/ru/index.html b/resources/library/interactivities/Separe phrase.wgt/locales/ru/index.html
index 61039d1a..e13bfddc 100644
--- a/resources/library/interactivities/Separe phrase.wgt/locales/ru/index.html
+++ b/resources/library/interactivities/Separe phrase.wgt/locales/ru/index.html
@@ -20,7 +20,6 @@