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

"+ "

Faire correspondre une image à un son.

"+ @@ -21,14 +21,17 @@ var sankoreLang = { ""+ - "

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/Calcul.wgt/css/main.css b/resources/library/interactivities/Calcul.wgt/css/main.css index 727a9a36..27f420e5 100644 --- a/resources/library/interactivities/Calcul.wgt/css/main.css +++ b/resources/library/interactivities/Calcul.wgt/css/main.css @@ -25,7 +25,7 @@ ul { background-color: red; } -.pagination li a { +.pagination li span { display: block; width: 100%; height: 100%; diff --git a/resources/library/interactivities/Calcul.wgt/js/main.js b/resources/library/interactivities/Calcul.wgt/js/main.js index 49e20e41..29436649 100644 --- a/resources/library/interactivities/Calcul.wgt/js/main.js +++ b/resources/library/interactivities/Calcul.wgt/js/main.js @@ -27,7 +27,7 @@ function reloadApp(app) { $pagination = $(""); $operationContainer.append($pagination); for (var i = 0; i < operations; i++) - $("
  • "+(i+1)+"
  • ").appendTo($pagination); + $("
  • "+(i+1)+"
  • ").appendTo($pagination); $operations = $(""); $operationContainer.append($operations); 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 :

    "+ "