Merge remote-tracking branch 'origin/develop' into claudio-dev

preferencesAboutTextFull
Claudio Valerio 12 years ago
commit 986e8e8f34
  1. 51
      plugins/cffadaptor/src/UBCFFAdaptor.cpp
  2. 2
      plugins/cffadaptor/src/UBCFFAdaptor.h
  3. 8
      plugins/cffadaptor/src/UBCFFConstants.h
  4. BIN
      resources/library/interactivities/Ordre phrase.wgt/img/ar_down.png
  5. BIN
      resources/library/interactivities/Ordre phrase.wgt/img/ar_down_white.png
  6. BIN
      resources/library/interactivities/Ordre phrase.wgt/img/parameters-bg.png
  7. BIN
      resources/library/interactivities/Ordre phrase.wgt/img/slate-display.png
  8. BIN
      resources/library/interactivities/Ordre phrase.wgt/img/slate-edit.png
  9. BIN
      resources/library/interactivities/Ordre phrase.wgt/img/slate-help-white.png
  10. BIN
      resources/library/interactivities/Ordre phrase.wgt/img/slate-help.png
  11. BIN
      resources/library/interactivities/Ordre phrase.wgt/img/slate-toolbar-help.png
  12. BIN
      resources/library/interactivities/Ordre phrase.wgt/img/slate-toolbar-reload-white.png
  13. BIN
      resources/library/interactivities/Ordre phrase.wgt/img/slate-toolbar-reload.png
  14. BIN
      resources/library/interactivities/Ordre phrase.wgt/img/toolbar-edit.png
  15. BIN
      resources/library/interactivities/Ordre phrase.wgt/img/toolbar-help.png
  16. BIN
      resources/library/interactivities/Ordre phrase.wgt/img/toolbar-reload.png
  17. 17
      resources/library/interactivities/Ordre phrase.wgt/index.html
  18. 17
      resources/library/interactivities/Ordre phrase.wgt/locales/fr/index.html
  19. 51
      resources/library/interactivities/Ordre phrase.wgt/locales/fr/script/template2.js
  20. 17
      resources/library/interactivities/Ordre phrase.wgt/locales/ru/index.html
  21. 51
      resources/library/interactivities/Ordre phrase.wgt/locales/ru/script/template2.js
  22. 49
      resources/library/interactivities/Ordre phrase.wgt/scripts/template2.js
  23. 129
      resources/library/interactivities/Ordre phrase.wgt/styles/of_puppets.css
  24. 137
      resources/library/interactivities/Selectionner.wgt/css/basic.css
  25. BIN
      resources/library/interactivities/Selectionner.wgt/img/ar_down.png
  26. BIN
      resources/library/interactivities/Selectionner.wgt/img/ar_down_white.png
  27. BIN
      resources/library/interactivities/Selectionner.wgt/img/green_point.png
  28. BIN
      resources/library/interactivities/Selectionner.wgt/img/parameters-bg.png
  29. BIN
      resources/library/interactivities/Selectionner.wgt/img/red_point.png
  30. BIN
      resources/library/interactivities/Selectionner.wgt/img/slate-display.png
  31. BIN
      resources/library/interactivities/Selectionner.wgt/img/slate-edit.png
  32. BIN
      resources/library/interactivities/Selectionner.wgt/img/slate-help-white.png
  33. BIN
      resources/library/interactivities/Selectionner.wgt/img/slate-help.png
  34. BIN
      resources/library/interactivities/Selectionner.wgt/img/slate-toolbar-help.png
  35. BIN
      resources/library/interactivities/Selectionner.wgt/img/slate-toolbar-reload-white.png
  36. BIN
      resources/library/interactivities/Selectionner.wgt/img/slate-toolbar-reload.png
  37. BIN
      resources/library/interactivities/Selectionner.wgt/img/toolbar-edit.png
  38. BIN
      resources/library/interactivities/Selectionner.wgt/img/toolbar-help.png
  39. BIN
      resources/library/interactivities/Selectionner.wgt/img/toolbar-reload.png
  40. 17
      resources/library/interactivities/Selectionner.wgt/index.html
  41. 43
      resources/library/interactivities/Selectionner.wgt/js/script.js
  42. 17
      resources/library/interactivities/Selectionner.wgt/locales/fr/index.html
  43. 43
      resources/library/interactivities/Selectionner.wgt/locales/fr/js/script.js
  44. 17
      resources/library/interactivities/Selectionner.wgt/locales/ru/index.html
  45. 43
      resources/library/interactivities/Selectionner.wgt/locales/ru/js/script.js
  46. BIN
      resources/library/interactivities/Separe phrase.wgt/img/ar_down.png
  47. BIN
      resources/library/interactivities/Separe phrase.wgt/img/ar_down_white.png
  48. BIN
      resources/library/interactivities/Separe phrase.wgt/img/parameters-bg.png
  49. BIN
      resources/library/interactivities/Separe phrase.wgt/img/slate-display.png
  50. BIN
      resources/library/interactivities/Separe phrase.wgt/img/slate-edit.png
  51. BIN
      resources/library/interactivities/Separe phrase.wgt/img/slate-help-white.png
  52. BIN
      resources/library/interactivities/Separe phrase.wgt/img/slate-help.png
  53. BIN
      resources/library/interactivities/Separe phrase.wgt/img/slate-toolbar-help.png
  54. BIN
      resources/library/interactivities/Separe phrase.wgt/img/slate-toolbar-reload-white.png
  55. BIN
      resources/library/interactivities/Separe phrase.wgt/img/slate-toolbar-reload.png
  56. BIN
      resources/library/interactivities/Separe phrase.wgt/img/toolbar-edit.png
  57. BIN
      resources/library/interactivities/Separe phrase.wgt/img/toolbar-help.png
  58. BIN
      resources/library/interactivities/Separe phrase.wgt/img/toolbar-reload.png
  59. 17
      resources/library/interactivities/Separe phrase.wgt/index.html
  60. 17
      resources/library/interactivities/Separe phrase.wgt/locales/fr/index.html
  61. 5
      resources/library/interactivities/Separe phrase.wgt/locales/fr/scripts/wcontainer.js
  62. 18
      resources/library/interactivities/Separe phrase.wgt/locales/ru/index.html
  63. 5
      resources/library/interactivities/Separe phrase.wgt/locales/ru/scripts/wcontainer.js
  64. 45
      resources/library/interactivities/Separe phrase.wgt/scripts/app.js
  65. 5
      resources/library/interactivities/Separe phrase.wgt/scripts/wcontainer.js
  66. 127
      resources/library/interactivities/Separe phrase.wgt/styles/app.css
  67. 2
      resources/library/interactivities/Separe phrase.wgt/styles/master.css
  68. BIN
      resources/library/interactivities/Separe texte.wgt/img/ar_down.png
  69. BIN
      resources/library/interactivities/Separe texte.wgt/img/ar_down_white.png
  70. BIN
      resources/library/interactivities/Separe texte.wgt/img/parameters-bg.png
  71. BIN
      resources/library/interactivities/Separe texte.wgt/img/slate-display.png
  72. BIN
      resources/library/interactivities/Separe texte.wgt/img/slate-edit.png
  73. BIN
      resources/library/interactivities/Separe texte.wgt/img/slate-help-white.png
  74. BIN
      resources/library/interactivities/Separe texte.wgt/img/slate-help.png
  75. BIN
      resources/library/interactivities/Separe texte.wgt/img/slate-toolbar-help.png
  76. BIN
      resources/library/interactivities/Separe texte.wgt/img/slate-toolbar-reload-white.png
  77. BIN
      resources/library/interactivities/Separe texte.wgt/img/slate-toolbar-reload.png
  78. BIN
      resources/library/interactivities/Separe texte.wgt/img/toolbar-edit.png
  79. BIN
      resources/library/interactivities/Separe texte.wgt/img/toolbar-help.png
  80. BIN
      resources/library/interactivities/Separe texte.wgt/img/toolbar-reload.png
  81. 18
      resources/library/interactivities/Separe texte.wgt/index.html
  82. 17
      resources/library/interactivities/Separe texte.wgt/locales/fr/index.html
  83. 5
      resources/library/interactivities/Separe texte.wgt/locales/fr/scripts/wcontainer.js
  84. 17
      resources/library/interactivities/Separe texte.wgt/locales/ru/index.html
  85. 5
      resources/library/interactivities/Separe texte.wgt/locales/ru/scripts/wcontainer.js
  86. 46
      resources/library/interactivities/Separe texte.wgt/scripts/app2.js
  87. 5
      resources/library/interactivities/Separe texte.wgt/scripts/wcontainer.js
  88. 127
      resources/library/interactivities/Separe texte.wgt/styles/app.css
  89. 2
      resources/library/interactivities/Separe texte.wgt/styles/master.css
  90. 2
      resources/library/interactivities/Syllabes.wgt/config.xml
  91. BIN
      resources/library/interactivities/Syllabes.wgt/img/ar_down.png
  92. BIN
      resources/library/interactivities/Syllabes.wgt/img/ar_down_white.png
  93. BIN
      resources/library/interactivities/Syllabes.wgt/img/parameters-bg.png
  94. BIN
      resources/library/interactivities/Syllabes.wgt/img/slate-display.png
  95. BIN
      resources/library/interactivities/Syllabes.wgt/img/slate-edit.png
  96. BIN
      resources/library/interactivities/Syllabes.wgt/img/slate-help-white.png
  97. BIN
      resources/library/interactivities/Syllabes.wgt/img/slate-help.png
  98. BIN
      resources/library/interactivities/Syllabes.wgt/img/slate-toolbar-help.png
  99. BIN
      resources/library/interactivities/Syllabes.wgt/img/slate-toolbar-reload-white.png
  100. BIN
      resources/library/interactivities/Syllabes.wgt/img/slate-toolbar-reload.png
  101. Some files were not shown because too many files have changed in this diff Show More

@ -550,8 +550,8 @@ QDomElement UBCFFAdaptor::UBToCFFConverter::parsePage(const QString &pageFileNam
pageFile.close(); pageFile.close();
return QDomElement(); return QDomElement();
} }
} else if (tagname == tUBZGroup) { } else if (tagname == tUBZGroups) {
group = parseGroupPageSection(nextTopElement); group = parseGroupsPageSection(nextTopElement);
if (group.isNull()) { if (group.isNull()) {
qDebug() << "Page doesn't contains any groups."; qDebug() << "Page doesn't contains any groups.";
pageFile.close(); pageFile.close();
@ -634,6 +634,7 @@ QDomElement UBCFFAdaptor::UBToCFFConverter::parseSvgPageSection(const QDomElemen
else if (tagName == tUBZLine) parseUBZLine(nextElement, svgElements); else if (tagName == tUBZLine) parseUBZLine(nextElement, svgElements);
else if (tagName == tUBZPolygon) parseUBZPolygon(nextElement, svgElements); else if (tagName == tUBZPolygon) parseUBZPolygon(nextElement, svgElements);
else if (tagName == tUBZPolyline) parseUBZPolyline(nextElement, svgElements); else if (tagName == tUBZPolyline) parseUBZPolyline(nextElement, svgElements);
else if (tagName == tUBZGroups) parseGroupsPageSection(nextElement);
nextElement = nextElement.nextSiblingElement(); nextElement = nextElement.nextSiblingElement();
} }
@ -694,14 +695,36 @@ bool UBCFFAdaptor::UBToCFFConverter::writeExtendedIwbSection()
// extended element options // extended element options
// editable, background, locked are supported for now // 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 // First sankore side implementation needed. TODO in Sankore 1.5
Q_UNUSED(element) if (!groupRoot.hasChildNodes()) {
qDebug() << "parsing ubz group section"; qDebug() << "Group root is empty";
return QDomElement(); 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 groupRoot;
}
QString UBCFFAdaptor::UBToCFFConverter::getDstContentFolderName(const QString &elementType) QString UBCFFAdaptor::UBToCFFConverter::getDstContentFolderName(const QString &elementType)
{ {
QString sRet; QString sRet;
@ -1250,6 +1273,19 @@ bool UBCFFAdaptor::UBToCFFConverter::setCFFAttribute(const QString &attributeNam
{ {
setGeometryFromUBZ(ubzElement, svgElement); 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 else
if (attributeName.contains(aUBZHref)||attributeName.contains(aSrc)) if (attributeName.contains(aUBZHref)||attributeName.contains(aSrc))
{ {
@ -1799,7 +1835,10 @@ bool UBCFFAdaptor::UBToCFFConverter::parseUBZPolygon(const QDomElement &element,
if (0 < iwbElementPart.attributes().count()) 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); svgElementPart.setAttribute(aID, id);
iwbElementPart.setAttribute(aRef, id); iwbElementPart.setAttribute(aRef, id);

@ -63,7 +63,7 @@ private:
QDomElement parseSvgPageSection(const QDomElement &element); QDomElement parseSvgPageSection(const QDomElement &element);
void writeQDomElementToXML(const QDomNode &node); void writeQDomElementToXML(const QDomNode &node);
bool writeExtendedIwbSection(); bool writeExtendedIwbSection();
QDomElement parseGroupPageSection(const QDomElement &element); QDomElement parseGroupsPageSection(const QDomElement &groupRoot);
bool createBackground(const QDomElement &element, QMultiMap<int, QDomElement> &dstSvgList); bool createBackground(const QDomElement &element, QMultiMap<int, QDomElement> &dstSvgList);
QString createBackgroundImage(const QDomElement &element, QSize size); QString createBackgroundImage(const QDomElement &element, QSize size);

@ -28,6 +28,7 @@ const QString tIWBPageSet = "pageset";
const QString tId = "id"; const QString tId = "id";
const QString tElement = "element"; const QString tElement = "element";
const QString tUBZGroup = "group"; const QString tUBZGroup = "group";
const QString tUBZGroups = "groups";
const QString tUBZG = "g"; const QString tUBZG = "g";
const QString tUBZPolygon = "polygon"; const QString tUBZPolygon = "polygon";
const QString tUBZPolyline = "polyline"; const QString tUBZPolyline = "polyline";
@ -67,6 +68,7 @@ const QString aBackground = "background";
const QString aCrossedBackground = "crossed-background"; const QString aCrossedBackground = "crossed-background";
const QString aUBZType = "type"; const QString aUBZType = "type";
const QString aUBZUuid = "uuid"; const QString aUBZUuid = "uuid";
const QString aUBZParent = "parent";
const QString aFill = "fill"; // IWB attribute contans color to fill 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 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(" \ const QString ubzElementAttributesToConvert(" \
xlink:href, \ xlink:href, \
src, \ src, \
transform \ transform, \
"); uuid \
"
);
// additional attributes. Have references in SVG section. // additional attributes. Have references in SVG section.
const QString svgElementAttributes(" \ const QString svgElementAttributes(" \

Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

@ -60,11 +60,6 @@
<div id="wgt_reload"></div> <div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div> <div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div> <div id="wgt_edit"></div>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</td> </td>
<td class="b_top_right">&nbsp;</td> <td class="b_top_right">&nbsp;</td>
</tr> </tr>
@ -74,7 +69,17 @@
<td> <td>
<div id="help"></div> <div id="help"></div>
<div id="ub-widget"> <div id="ub-widget">
<div id="parameters">
<div class="inline">
<label>
<select id="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</label>
</div>
</div>
</div> </div>
</td> </td>
<td class="b_center_right">&nbsp;</td> <td class="b_center_right">&nbsp;</td>

@ -36,11 +36,6 @@
<div id="wgt_reload"></div> <div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div> <div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div> <div id="wgt_edit"></div>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</td> </td>
<td class="b_top_right">&nbsp;</td> <td class="b_top_right">&nbsp;</td>
</tr> </tr>
@ -50,7 +45,17 @@
<td> <td>
<div id="help"></div> <div id="help"></div>
<div id="ub-widget"> <div id="ub-widget">
<div id="parameters">
<div class="inline">
<label>
<select id="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</label>
</div>
</div>
</div> </div>
</td> </td>
<td class="b_center_right">&nbsp;</td> <td class="b_center_right">&nbsp;</td>

@ -26,7 +26,7 @@ function checkResponse()
*/ */
var sankoreLang = { var sankoreLang = {
view: "Afficher", view: "Fermer",
edit: "Modifier", edit: "Modifier",
example: "Cette phrase\nest un\nexemple", example: "Cette phrase\nest un\nexemple",
wgt_name: "Ordonner des phrases", wgt_name: "Ordonner des phrases",
@ -49,10 +49,10 @@ var sankoreLang = {
"<p>Pour insérer du texte dans la zone, cliquez sur la zone et saisissez le texte souhaité.</p>"+ "<p>Pour insérer du texte dans la zone, cliquez sur la zone et saisissez le texte souhaité.</p>"+
"<p>Pour ajouter des séparations dans l’énoncé, retournez à la ligne. Votre texte sera séparé lors d'un retour à la ligne.</p>"+ "<p>Pour ajouter des séparations dans l’énoncé, retournez à la ligne. Votre texte sera séparé lors d'un retour à la ligne.</p>"+
"<p>Le bouton “Afficher” vous permet d’utiliser l’activité.</p>" "<p>Le bouton “Afficher” vous permet d’utiliser l’activité.</p>",
theme:"Thème"
}; };
var sentence = ""; var sentence = "";
var curSentence = ""; var curSentence = "";
@ -82,9 +82,10 @@ var input_width = 606;
var widget_padding = 0; var widget_padding = 0;
$(document).ready(function(){ $(document).ready(function(){
if(window.sankore)
if(sankore.preference("ord_phrases_style","")){ if(sankore.preference("ord_phrases_style","")){
changeStyle(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 } else
changeStyle("3") changeStyle("3")
@ -92,13 +93,23 @@ $(document).ready(function(){
$("#wgt_edit").text(sankoreLang.edit); $("#wgt_edit").text(sankoreLang.edit);
$("#wgt_help").text(sankoreLang.help); $("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content); $("#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){ $("#wgt_display, #wgt_edit").click(function(event){
if(this.id == "wgt_display"){ if(this.id == "wgt_display"){
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_edit").removeClass("selected"); $("#wgt_edit").removeClass("selected");
$(".style_select").css("display","none"); $("#parameters").css("display","none");
$(this).css("display", "none"); $(this).css("display", "none");
$("#wgt_edit").css("display", "block"); $("#wgt_edit").css("display", "block");
modeView(); modeView();
@ -107,7 +118,7 @@ $(document).ready(function(){
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_display").removeClass("selected"); $("#wgt_display").removeClass("selected");
$(".style_select").css("display","block"); $("#parameters").css("display","block");
$(this).css("display", "none"); $(this).css("display", "none");
$("#wgt_display").css("display", "block"); $("#wgt_display").css("display", "block");
modeEdit(); modeEdit();
@ -120,11 +131,13 @@ $(document).ready(function(){
$("#wgt_help").click(function(){ $("#wgt_help").click(function(){
var tmp = $(this); var tmp = $(this);
if($(this).hasClass("open")){ if($(this).hasClass("open")){
$(this).removeClass("help_pad").removeClass("help_wood")
$("#help").slideUp("100", function(){ $("#help").slideUp("100", function(){
tmp.removeClass("open"); tmp.removeClass("open");
$("#ub-widget").show(); $("#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(); $("#ub-widget").hide();
$("#help").slideDown("100", function(){ $("#help").slideDown("100", function(){
tmp.addClass("open"); 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 ){ function str_replace( w, b, s ){
@ -230,10 +237,10 @@ function changeStyle(val){
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color"); $("#wgt_name").removeClass("pad_color");
$(".style_select").removeClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").addClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select option:first").attr('selected',true);
$("body, html").removeClass("without_radius").addClass("radius_ft");
break; break;
case "2": case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back"); $(".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_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select option:first").next().attr('selected',true);
$("body, html").removeClass("without_radius").removeClass("radius_ft");
break; break;
case "3": case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad"); $(".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_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").addClass("without_radius"); $("#style_select option:last").attr('selected',true);
$("body, html").addClass("without_radius").removeClass("radius_ft");
break; break;
} }
} }
@ -355,7 +362,7 @@ function modeEdit()
if (window.widget) { if (window.widget) {
window.widget.onleave = function(){ 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()) if($( "#mp_word textarea" ).val())
{ {
modeView(); modeView();

@ -36,11 +36,6 @@
<div id="wgt_reload"></div> <div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div> <div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div> <div id="wgt_edit"></div>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</td> </td>
<td class="b_top_right">&nbsp;</td> <td class="b_top_right">&nbsp;</td>
</tr> </tr>
@ -50,7 +45,17 @@
<td> <td>
<div id="help"></div> <div id="help"></div>
<div id="ub-widget"> <div id="ub-widget">
<div id="parameters">
<div class="inline">
<label>
<select id="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</label>
</div>
</div>
</div> </div>
</td> </td>
<td class="b_center_right">&nbsp;</td> <td class="b_center_right">&nbsp;</td>

@ -27,7 +27,7 @@ function checkResponse()
var sankoreLang = { var sankoreLang = {
edit: "Изменить", edit: "Изменить",
view: "Просмотр", view: "Закрыть",
example: "это\nпример\nпредложения", example: "это\nпример\nпредложения",
wgt_name: "Порядок фраз", wgt_name: "Порядок фраз",
reload: "Обновить", reload: "Обновить",
@ -35,10 +35,10 @@ var sankoreLang = {
pad: "Планшет", pad: "Планшет",
none: "Нет", none: "Нет",
help: "Помощь", help: "Помощь",
help_content: "Пример текста помощи ..." help_content: "Пример текста помощи ...",
theme: "Тема"
} }
var sentence = ""; var sentence = "";
var curSentence = ""; var curSentence = "";
@ -68,9 +68,10 @@ var input_width = 606;
var widget_padding = 0; var widget_padding = 0;
$(document).ready(function(){ $(document).ready(function(){
if(window.sankore)
if(sankore.preference("ord_phrases_style","")){ if(sankore.preference("ord_phrases_style","")){
changeStyle(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 } else
changeStyle("3") changeStyle("3")
@ -78,13 +79,23 @@ $(document).ready(function(){
$("#wgt_edit").text(sankoreLang.edit); $("#wgt_edit").text(sankoreLang.edit);
$("#wgt_help").text(sankoreLang.help); $("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content); $("#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){ $("#wgt_display, #wgt_edit").click(function(event){
if(this.id == "wgt_display"){ if(this.id == "wgt_display"){
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_edit").removeClass("selected"); $("#wgt_edit").removeClass("selected");
$(".style_select").css("display","none"); $("#parameters").css("display","none");
$(this).css("display", "none"); $(this).css("display", "none");
$("#wgt_edit").css("display", "block"); $("#wgt_edit").css("display", "block");
modeView(); modeView();
@ -93,7 +104,7 @@ $(document).ready(function(){
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_display").removeClass("selected"); $("#wgt_display").removeClass("selected");
$(".style_select").css("display","block"); $("#parameters").css("display","block");
$(this).css("display", "none"); $(this).css("display", "none");
$("#wgt_display").css("display", "block"); $("#wgt_display").css("display", "block");
modeEdit(); modeEdit();
@ -106,11 +117,13 @@ $(document).ready(function(){
$("#wgt_help").click(function(){ $("#wgt_help").click(function(){
var tmp = $(this); var tmp = $(this);
if($(this).hasClass("open")){ if($(this).hasClass("open")){
$(this).removeClass("help_pad").removeClass("help_wood")
$("#help").slideUp("100", function(){ $("#help").slideUp("100", function(){
tmp.removeClass("open"); tmp.removeClass("open");
$("#ub-widget").show(); $("#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(); $("#ub-widget").hide();
$("#help").slideDown("100", function(){ $("#help").slideDown("100", function(){
tmp.addClass("open"); 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 ){ function str_replace( w, b, s ){
@ -216,10 +223,10 @@ function changeStyle(val){
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color"); $("#wgt_name").removeClass("pad_color");
$(".style_select").removeClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").addClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select option:first").attr('selected',true);
$("body, html").removeClass("without_radius").addClass("radius_ft");
break; break;
case "2": case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back"); $(".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_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select option:first").next().attr('selected',true);
$("body, html").removeClass("without_radius").removeClass("radius_ft");
break; break;
case "3": case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad"); $(".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_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").addClass("without_radius"); $("#style_select option:last").attr('selected',true);
$("body, html").addClass("without_radius").removeClass("radius_ft");
break; break;
} }
} }
@ -341,7 +348,7 @@ function modeEdit()
if (window.widget) { if (window.widget) {
window.widget.onleave = function(){ 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()) if($( "#mp_word textarea" ).val())
{ {
modeView(); modeView();

@ -28,7 +28,7 @@ function checkResponse()
var sankoreLang = { var sankoreLang = {
edit: "Edit", edit: "Edit",
view: "Display", view: "Close",
example: "this is\nan example\nsentence", example: "this is\nan example\nsentence",
wgt_name: "Order phrases", wgt_name: "Order phrases",
reload: "Reload", reload: "Reload",
@ -36,7 +36,8 @@ var sankoreLang = {
pad: "Pad", pad: "Pad",
none: "None", none: "None",
help: "Help", 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(window.sankore)
if(sankore.preference("ord_phrases_style","")){ if(sankore.preference("ord_phrases_style","")){
changeStyle(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 } else
changeStyle("3") changeStyle("3")
@ -80,13 +81,23 @@ $(document).ready(function(){
$("#wgt_edit").text(sankoreLang.edit); $("#wgt_edit").text(sankoreLang.edit);
$("#wgt_help").text(sankoreLang.help); $("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content); $("#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){ $("#wgt_display, #wgt_edit").click(function(event){
if(this.id == "wgt_display"){ if(this.id == "wgt_display"){
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_edit").removeClass("selected"); $("#wgt_edit").removeClass("selected");
$(".style_select").css("display","none"); $("#parameters").css("display","none");
$(this).css("display", "none"); $(this).css("display", "none");
$("#wgt_edit").css("display", "block"); $("#wgt_edit").css("display", "block");
modeView(); modeView();
@ -95,7 +106,7 @@ $(document).ready(function(){
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_display").removeClass("selected"); $("#wgt_display").removeClass("selected");
$(".style_select").css("display","block"); $("#parameters").css("display","block");
$(this).css("display", "none"); $(this).css("display", "none");
$("#wgt_display").css("display", "block"); $("#wgt_display").css("display", "block");
modeEdit(); modeEdit();
@ -108,11 +119,13 @@ $(document).ready(function(){
$("#wgt_help").click(function(){ $("#wgt_help").click(function(){
var tmp = $(this); var tmp = $(this);
if($(this).hasClass("open")){ if($(this).hasClass("open")){
$(this).removeClass("help_pad").removeClass("help_wood")
$("#help").slideUp("100", function(){ $("#help").slideUp("100", function(){
tmp.removeClass("open"); tmp.removeClass("open");
$("#ub-widget").show(); $("#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(); $("#ub-widget").hide();
$("#help").slideDown("100", function(){ $("#help").slideDown("100", function(){
tmp.addClass("open"); 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 ){ function str_replace( w, b, s ){
@ -218,10 +225,10 @@ function changeStyle(val){
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color"); $("#wgt_name").removeClass("pad_color");
$(".style_select").removeClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").addClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select option:first").attr('selected',true);
$("body, html").removeClass("without_radius").addClass("radius_ft");
break; break;
case "2": case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back"); $(".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_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select option:first").next().attr('selected',true);
$("body, html").removeClass("without_radius").removeClass("radius_ft");
break; break;
case "3": case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad"); $(".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_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").addClass("without_radius"); $("#style_select option:last").attr('selected',true);
$("body, html").addClass("without_radius").removeClass("radius_ft");
break; break;
} }
} }
@ -343,7 +350,7 @@ function modeEdit()
if (window.widget) { if (window.widget) {
window.widget.onleave = function(){ 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()) if($( "#mp_word textarea" ).val())
{ {
modeView(); modeView();

@ -3,7 +3,7 @@ html, body{
height: 100%; height: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
border-radius: 50px; border-radius: 35px;
overflow: hidden; overflow: hidden;
} }
@ -149,57 +149,40 @@ textarea{
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
/*font-family: "Lobster13Regular";*/ font-family: Arial,Helvetica,sans-serif;
font-size: 24px; font-size: 24px;
color: #8c5730; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0;
} }
#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{ #wgt_reload, #wgt_edit, #wgt_display, #wgt_help{
cursor: pointer; cursor: pointer;
height: 44px;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
/*font-family: "Lobster13Regular";*/ font-family: Arial,Helvetica,sans-serif;
font-size: 24px; font-size: 24px;
color: #8c5730; line-height: 32px;
} }
#wgt_display{ #wgt_display{
padding-left: 40px; padding-left: 35px;
background-image: url(../img/slate-edit.png); background: url(../img/toolbar-edit.png) left -32px no-repeat;
background-repeat: no-repeat; color: white;
background-position: top 0;
display: none; display: none;
} }
#wgt_edit{ #wgt_edit{
padding-left: 40px; padding-left: 35px;
background-image: url(../img/slate-edit.png); background: url(../img/slate-toolbar-edit.png) left top no-repeat;
background-repeat: no-repeat; color: #7F613F;
background-position: top 0; text-shadow: #FFDCA9 0 1px 0;
} }
#wgt_reload{ #wgt_reload{
padding-left: 40px; padding-left: 35px;
background-image: url(../img/slate-toolbar-reload.png); background: url(../img/slate-toolbar-reload.png) left top no-repeat;
background-repeat: no-repeat; color: #7F613F;
background-position: top 0; text-shadow: #FFDCA9 0 1px 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;
} }
.btl_pad{ .btl_pad{
@ -234,51 +217,50 @@ textarea{
background-image: url(../img/pad-bottom-right.png) !important; background-image: url(../img/pad-bottom-right.png) !important;
} }
.pad_color{ .without_radius{
color: white !important; border-radius: 0 !important;
} }
.pad_reload{ .without_back{
background-image: url(../img/slate-toolbar-reload-white.png) !important; background: none !important;
} }
.pad_edit{ .pad_color{
background-image: url(../img/slate-display.png) !important; color: #FC9 !important;
text-shadow: none !important;
} }
.pad_select{ .pad_reload{
background-color: black !important; background: url(../img/toolbar-reload.png) left top no-repeat !important;
color: white !important;
background-image: url(../img/ar_down_white.png) !important;
} }
.without_radius{ .pad_edit{
border-radius: 0 !important; background: url(../img/toolbar-edit.png) left top no-repeat !important;
} }
.without_back{ .pad_help{
background: none !important; background: url(../img/toolbar-help.png) left top no-repeat !important;
} }
.none_select{ .help_wood{
background-color: #333 !important; background: url(../img/slate-toolbar-help.png) left -32px no-repeat !important;
color: white !important; color: white !important;
background-image: url(../img/ar_down_white.png) !important; text-shadow: #7F613F 0 -1px 0 !important;
} }
.pad_help{ .help_pad{
background-image: url(../img/slate-help-white.png) !important; background: url(../img/toolbar-help.png) left -32px no-repeat !important;
color: white !important;
} }
#wgt_help{ #wgt_help{
padding-left: 32px; padding-left: 35px;
background-image: url(../img/slate-help.png); background: url(../img/slate-toolbar-help.png) left top no-repeat;
background-repeat: no-repeat; color: #7F613F;
background-position: top 0; text-shadow: #FFDCA9 0 1px 0;
} }
#help{ #help{
width: 100%;
height: 100%; height: 100%;
overflow: auto; overflow: auto;
display: none; display: none;
@ -289,3 +271,34 @@ textarea{
.open{ .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;
}

@ -3,7 +3,7 @@ html, body{
height: 100%; height: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
border-radius: 50px; border-radius: 35px;
overflow: hidden; overflow: hidden;
} }
@ -28,14 +28,6 @@ body{
margin: 5px 10px; 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{ #display_text, #edit_text{
height: 19px; height: 19px;
padding: 3px 0 0 0; padding: 3px 0 0 0;
@ -322,57 +314,40 @@ body{
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
/*font-family: "Lobster13Regular";*/ font-family: Arial,Helvetica,sans-serif;
font-size: 24px; font-size: 24px;
color: #8c5730; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0;
} }
#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{ #wgt_reload, #wgt_edit, #wgt_display, #wgt_help{
cursor: pointer; cursor: pointer;
height: 44px;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
/*font-family: "Lobster13Regular";*/ font-family: Arial,Helvetica,sans-serif;
font-size: 24px; font-size: 24px;
color: #8c5730; line-height: 32px;
} }
#wgt_display{ #wgt_display{
padding-left: 40px; padding-left: 35px;
background-image: url(../img/slate-edit.png); background: url(../img/toolbar-edit.png) left -32px no-repeat;
background-repeat: no-repeat; color: white;
background-position: top 0;
display: none; display: none;
} }
#wgt_edit{ #wgt_edit{
padding-left: 40px; padding-left: 35px;
background-image: url(../img/slate-edit.png); background: url(../img/slate-toolbar-edit.png) left top no-repeat;
background-repeat: no-repeat; color: #7F613F;
background-position: top 0; text-shadow: #FFDCA9 0 1px 0;
} }
#wgt_reload{ #wgt_reload{
padding-left: 40px; padding-left: 35px;
background-image: url(../img/slate-toolbar-reload.png); background: url(../img/slate-toolbar-reload.png) left top no-repeat;
background-repeat: no-repeat; color: #7F613F;
background-position: top 0; text-shadow: #FFDCA9 0 1px 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;
} }
.btl_pad{ .btl_pad{
@ -407,51 +382,50 @@ body{
background-image: url(../img/pad-bottom-right.png) !important; background-image: url(../img/pad-bottom-right.png) !important;
} }
.pad_color{ .without_radius{
color: white !important; border-radius: 0 !important;
} }
.pad_reload{ .without_back{
background-image: url(../img/slate-toolbar-reload-white.png) !important; background: none !important;
} }
.pad_edit{ .pad_color{
background-image: url(../img/slate-display.png) !important; color: #FC9 !important;
text-shadow: none !important;
} }
.pad_select{ .pad_reload{
background-color: black !important; background: url(../img/toolbar-reload.png) left top no-repeat !important;
color: white !important;
background-image: url(../img/ar_down_white.png) !important;
} }
.without_radius{ .pad_edit{
border-radius: 0 !important; background: url(../img/toolbar-edit.png) left top no-repeat !important;
} }
.without_back{ .pad_help{
background: none !important; background: url(../img/toolbar-help.png) left top no-repeat !important;
} }
.none_select{ .help_wood{
background-color: #333 !important; background: url(../img/slate-toolbar-help.png) left -32px no-repeat !important;
color: white !important; color: white !important;
background-image: url(../img/ar_down_white.png) !important; text-shadow: #7F613F 0 -1px 0 !important;
} }
.pad_help{ .help_pad{
background-image: url(../img/slate-help-white.png) !important; background: url(../img/toolbar-help.png) left -32px no-repeat !important;
color: white !important;
} }
#wgt_help{ #wgt_help{
padding-left: 32px; padding-left: 35px;
background-image: url(../img/slate-help.png); background: url(../img/slate-toolbar-help.png) left top no-repeat;
background-repeat: no-repeat; color: #7F613F;
background-position: top 0; text-shadow: #FFDCA9 0 1px 0;
} }
#help{ #help{
width: 100%;
height: 100%; height: 100%;
overflow: auto; overflow: auto;
display: none; display: none;
@ -462,3 +436,34 @@ body{
.open{ .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;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 740 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

@ -52,11 +52,6 @@
<div id="wgt_reload"></div> <div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div> <div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div> <div id="wgt_edit"></div>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</td> </td>
<td class="b_top_right">&nbsp;</td> <td class="b_top_right">&nbsp;</td>
</tr> </tr>
@ -66,7 +61,17 @@
<td> <td>
<div id="help"></div> <div id="help"></div>
<div id="data"> <div id="data">
<div id="parameters">
<div class="inline">
<label>
<select id="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</label>
</div>
</div>
</div> </div>
</td> </td>
<td class="b_center_right">&nbsp;</td> <td class="b_center_right">&nbsp;</td>

@ -1,5 +1,5 @@
var sankoreLang = { var sankoreLang = {
display: "Display", display: "Close",
edit: "Edit", edit: "Edit",
short_desc: "Select animals from the following list:", short_desc: "Select animals from the following list:",
add: "Add new block", add: "Add new block",
@ -15,7 +15,8 @@ var sankoreLang = {
pad: "Pad", pad: "Pad",
none: "None", none: "None",
help: "Help", help: "Help",
help_content: "This is an example of help content ..." help_content: "This is an example of help content ...",
theme: "Theme"
}; };
//main function //main function
@ -27,9 +28,11 @@ function start(){
$("#wgt_reload").text(sankoreLang.reload); $("#wgt_reload").text(sankoreLang.reload);
$("#wgt_help").text(sankoreLang.help); $("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content); $("#help").html(sankoreLang.help_content);
$(".style_select option[value='1']").text(sankoreLang.slate); $("#style_select option[value='1']").text(sankoreLang.slate);
$(".style_select option[value='2']").text(sankoreLang.pad); $("#style_select option[value='2']").text(sankoreLang.pad);
$(".style_select option[value='3']").text(sankoreLang.none); $("#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(window.sankore){
if(sankore.preference("selectionner","")){ if(sankore.preference("selectionner","")){
@ -39,7 +42,7 @@ function start(){
showExample(); showExample();
if(sankore.preference("sel_style","")){ if(sankore.preference("sel_style","")){
changeStyle(sankore.preference("sel_style","")); changeStyle(sankore.preference("sel_style",""));
$(".style_select").val(sankore.preference("sel_style","")); $("#style_select").val(sankore.preference("sel_style",""));
} else } else
changeStyle("3") changeStyle("3")
} }
@ -50,18 +53,20 @@ function start(){
if (window.widget) { if (window.widget) {
window.widget.onleave = function(){ window.widget.onleave = function(){
exportData(); 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(){ $("#wgt_help").click(function(){
var tmp = $(this); var tmp = $(this);
if($(this).hasClass("open")){ if($(this).hasClass("open")){
$(this).removeClass("help_pad").removeClass("help_wood")
$("#help").slideUp("100", function(){ $("#help").slideUp("100", function(){
tmp.removeClass("open"); tmp.removeClass("open");
$("#data").show(); $("#data").show();
}); });
} else { } else {
($("#style_select").val() == 1)?$(this).removeClass("help_pad").addClass("help_wood"):$(this).removeClass("help_wood").addClass("help_pad");
$("#data").hide(); $("#data").hide();
$("#help").slideDown("100", function(){ $("#help").slideDown("100", function(){
tmp.addClass("open"); tmp.addClass("open");
@ -83,7 +88,7 @@ function start(){
$("#wgt_display").trigger("click"); $("#wgt_display").trigger("click");
}); });
$(".style_select").change(function (event){ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val()); changeStyle($(this).find("option:selected").val());
}) })
@ -94,7 +99,7 @@ function start(){
sankore.enableDropOnWidget(false); sankore.enableDropOnWidget(false);
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_edit").removeClass("selected"); $("#wgt_edit").removeClass("selected");
$(".style_select").css("display","none"); $("#parameters").css("display","none");
$(".add_block").remove(); $(".add_block").remove();
$(".cont").each(function(){ $(".cont").each(function(){
var container = $(this); var container = $(this);
@ -122,7 +127,7 @@ function start(){
sankore.enableDropOnWidget(true); sankore.enableDropOnWidget(true);
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_display").removeClass("selected"); $("#wgt_display").removeClass("selected");
$(".style_select").css("display","block"); $("#parameters").css("display","block");
$(".cont").each(function(){ $(".cont").each(function(){
var container = $(this); var container = $(this);
@ -446,10 +451,10 @@ function changeStyle(val){
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color"); $("#wgt_name").removeClass("pad_color");
$(".style_select").removeClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").addClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select").val(val);
$("body, html").removeClass("without_radius").addClass("radius_ft");
break; break;
case "2": case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back"); $(".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_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select").val(val);
$("body, html").removeClass("without_radius").removeClass("radius_ft");
break; break;
case "3": case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad"); $(".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_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").addClass("without_radius"); $("#style_select").val(val);
$("body, html").addClass("without_radius").removeClass("radius_ft");
break; break;
} }
} }

@ -26,11 +26,6 @@
<div id="wgt_reload"></div> <div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div> <div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div> <div id="wgt_edit"></div>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</td> </td>
<td class="b_top_right">&nbsp;</td> <td class="b_top_right">&nbsp;</td>
</tr> </tr>
@ -40,7 +35,17 @@
<td> <td>
<div id="help"></div> <div id="help"></div>
<div id="data"> <div id="data">
<div id="parameters">
<div class="inline">
<label>
<select id="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</label>
</div>
</div>
</div> </div>
</td> </td>
<td class="b_center_right">&nbsp;</td> <td class="b_center_right">&nbsp;</td>

@ -1,5 +1,5 @@
var sankoreLang = { var sankoreLang = {
display: "Afficher", display: "Fermer",
edit: "Modifier", edit: "Modifier",
short_desc: "Sélectionner les animaux dans la liste suivante :", short_desc: "Sélectionner les animaux dans la liste suivante :",
add: "Nouveau bloc", add: "Nouveau bloc",
@ -33,7 +33,8 @@ var sankoreLang = {
"<p>Pour supprimer un exercice, cliquez sur la croix à gauche du numéro de l’exercice.</p>"+ "<p>Pour supprimer un exercice, cliquez sur la croix à gauche du numéro de l’exercice.</p>"+
"<p>Le bouton “Afficher” vous permet d’utiliser l’activité.</p>" "<p>Le bouton “Afficher” vous permet d’utiliser l’activité.</p>",
theme:"Thème"
}; };
//main function //main function
@ -45,9 +46,11 @@ function start(){
$("#wgt_reload").text(sankoreLang.reload); $("#wgt_reload").text(sankoreLang.reload);
$("#wgt_help").text(sankoreLang.help); $("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content); $("#help").html(sankoreLang.help_content);
$(".style_select option[value='1']").text(sankoreLang.slate); $("#style_select option[value='1']").text(sankoreLang.slate);
$(".style_select option[value='2']").text(sankoreLang.pad); $("#style_select option[value='2']").text(sankoreLang.pad);
$(".style_select option[value='3']").text(sankoreLang.none); $("#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(window.sankore){
if(sankore.preference("selectionner","")){ if(sankore.preference("selectionner","")){
@ -57,7 +60,7 @@ function start(){
showExample(); showExample();
if(sankore.preference("sel_style","")){ if(sankore.preference("sel_style","")){
changeStyle(sankore.preference("sel_style","")); changeStyle(sankore.preference("sel_style",""));
$(".style_select").val(sankore.preference("sel_style","")); $("#style_select").val(sankore.preference("sel_style",""));
} else } else
changeStyle("3") changeStyle("3")
} }
@ -68,18 +71,20 @@ function start(){
if (window.widget) { if (window.widget) {
window.widget.onleave = function(){ window.widget.onleave = function(){
exportData(); 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(){ $("#wgt_help").click(function(){
var tmp = $(this); var tmp = $(this);
if($(this).hasClass("open")){ if($(this).hasClass("open")){
$(this).removeClass("help_pad").removeClass("help_wood")
$("#help").slideUp("100", function(){ $("#help").slideUp("100", function(){
tmp.removeClass("open"); tmp.removeClass("open");
$("#data").show(); $("#data").show();
}); });
} else { } else {
($("#style_select").val() == 1)?$(this).removeClass("help_pad").addClass("help_wood"):$(this).removeClass("help_wood").addClass("help_pad");
$("#data").hide(); $("#data").hide();
$("#help").slideDown("100", function(){ $("#help").slideDown("100", function(){
tmp.addClass("open"); tmp.addClass("open");
@ -101,7 +106,7 @@ function start(){
$("#wgt_display").trigger("click"); $("#wgt_display").trigger("click");
}); });
$(".style_select").change(function (event){ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val()); changeStyle($(this).find("option:selected").val());
}) })
@ -112,7 +117,7 @@ function start(){
sankore.enableDropOnWidget(false); sankore.enableDropOnWidget(false);
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_edit").removeClass("selected"); $("#wgt_edit").removeClass("selected");
$(".style_select").css("display","none"); $("#parameters").css("display","none");
$(".add_block").remove(); $(".add_block").remove();
$(".cont").each(function(){ $(".cont").each(function(){
var container = $(this); var container = $(this);
@ -140,7 +145,7 @@ function start(){
sankore.enableDropOnWidget(true); sankore.enableDropOnWidget(true);
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_display").removeClass("selected"); $("#wgt_display").removeClass("selected");
$(".style_select").css("display","block"); $("#parameters").css("display","block");
$(".cont").each(function(){ $(".cont").each(function(){
var container = $(this); var container = $(this);
@ -463,10 +468,10 @@ function changeStyle(val){
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color"); $("#wgt_name").removeClass("pad_color");
$(".style_select").removeClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").addClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select").val(val);
$("body, html").removeClass("without_radius").addClass("radius_ft");
break; break;
case "2": case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back"); $(".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_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select").val(val);
$("body, html").removeClass("without_radius").removeClass("radius_ft");
break; break;
case "3": case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad"); $(".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_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").addClass("without_radius"); $("#style_select").val(val);
$("body, html").addClass("without_radius").removeClass("radius_ft");
break; break;
} }
} }

@ -26,11 +26,6 @@
<div id="wgt_reload"></div> <div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div> <div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div> <div id="wgt_edit"></div>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</td> </td>
<td class="b_top_right">&nbsp;</td> <td class="b_top_right">&nbsp;</td>
</tr> </tr>
@ -40,7 +35,17 @@
<td> <td>
<div id="help"></div> <div id="help"></div>
<div id="data"> <div id="data">
<div id="parameters">
<div class="inline">
<label>
<select id="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</label>
</div>
</div>
</div> </div>
</td> </td>
<td class="b_center_right">&nbsp;</td> <td class="b_center_right">&nbsp;</td>

@ -1,5 +1,5 @@
var sankoreLang = { var sankoreLang = {
display: "Показать", display: "Закрыть",
edit: "Изменить", edit: "Изменить",
short_desc: "Выберите животных из следующего списка:", short_desc: "Выберите животных из следующего списка:",
add: "Новый блок", add: "Новый блок",
@ -15,7 +15,8 @@ var sankoreLang = {
pad: "Планшет", pad: "Планшет",
none: "Нет", none: "Нет",
help: "Помощь", help: "Помощь",
help_content: "Пример текста помощи ..." help_content: "Пример текста помощи ...",
theme: "Тема"
}; };
//main function //main function
@ -27,9 +28,11 @@ function start(){
$("#wgt_reload").text(sankoreLang.reload); $("#wgt_reload").text(sankoreLang.reload);
$("#wgt_help").text(sankoreLang.help); $("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content); $("#help").html(sankoreLang.help_content);
$(".style_select option[value='1']").text(sankoreLang.slate); $("#style_select option[value='1']").text(sankoreLang.slate);
$(".style_select option[value='2']").text(sankoreLang.pad); $("#style_select option[value='2']").text(sankoreLang.pad);
$(".style_select option[value='3']").text(sankoreLang.none); $("#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(window.sankore){
if(sankore.preference("selectionner","")){ if(sankore.preference("selectionner","")){
@ -39,7 +42,7 @@ function start(){
showExample(); showExample();
if(sankore.preference("sel_style","")){ if(sankore.preference("sel_style","")){
changeStyle(sankore.preference("sel_style","")); changeStyle(sankore.preference("sel_style",""));
$(".style_select").val(sankore.preference("sel_style","")); $("#style_select").val(sankore.preference("sel_style",""));
} else } else
changeStyle("3") changeStyle("3")
} }
@ -50,18 +53,20 @@ function start(){
if (window.widget) { if (window.widget) {
window.widget.onleave = function(){ window.widget.onleave = function(){
exportData(); 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(){ $("#wgt_help").click(function(){
var tmp = $(this); var tmp = $(this);
if($(this).hasClass("open")){ if($(this).hasClass("open")){
$(this).removeClass("help_pad").removeClass("help_wood")
$("#help").slideUp("100", function(){ $("#help").slideUp("100", function(){
tmp.removeClass("open"); tmp.removeClass("open");
$("#data").show(); $("#data").show();
}); });
} else { } else {
($("#style_select").val() == 1)?$(this).removeClass("help_pad").addClass("help_wood"):$(this).removeClass("help_wood").addClass("help_pad");
$("#data").hide(); $("#data").hide();
$("#help").slideDown("100", function(){ $("#help").slideDown("100", function(){
tmp.addClass("open"); tmp.addClass("open");
@ -83,7 +88,7 @@ function start(){
$("#wgt_display").trigger("click"); $("#wgt_display").trigger("click");
}); });
$(".style_select").change(function (event){ $("#style_select").change(function (event){
changeStyle($(this).find("option:selected").val()); changeStyle($(this).find("option:selected").val());
}) })
@ -94,7 +99,7 @@ function start(){
sankore.enableDropOnWidget(false); sankore.enableDropOnWidget(false);
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_edit").removeClass("selected"); $("#wgt_edit").removeClass("selected");
$(".style_select").css("display","none"); $("#parameters").css("display","none");
$(".add_block").remove(); $(".add_block").remove();
$(".cont").each(function(){ $(".cont").each(function(){
var container = $(this); var container = $(this);
@ -122,7 +127,7 @@ function start(){
sankore.enableDropOnWidget(true); sankore.enableDropOnWidget(true);
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_display").removeClass("selected"); $("#wgt_display").removeClass("selected");
$(".style_select").css("display","block"); $("#parameters").css("display","block");
$(".cont").each(function(){ $(".cont").each(function(){
var container = $(this); var container = $(this);
@ -445,10 +450,10 @@ function changeStyle(val){
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color"); $("#wgt_name").removeClass("pad_color");
$(".style_select").removeClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").addClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select").val(val);
$("body, html").removeClass("without_radius").addClass("radius_ft");
break; break;
case "2": case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back"); $(".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_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select").val(val);
$("body, html").removeClass("without_radius").removeClass("radius_ft");
break; break;
case "3": case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad"); $(".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_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").addClass("without_radius"); $("#style_select").val(val);
$("body, html").addClass("without_radius").removeClass("radius_ft");
break; break;
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

@ -58,11 +58,6 @@
<div id="wgt_reload"></div> <div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div> <div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div> <div id="wgt_edit"></div>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</td> </td>
<td class="b_top_right">&nbsp;</td> <td class="b_top_right">&nbsp;</td>
</tr> </tr>
@ -72,7 +67,17 @@
<td> <td>
<div id="help"></div> <div id="help"></div>
<div id="ub-widget"> <div id="ub-widget">
<div id="parameters">
<div class="inline">
<label>
<select id="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</label>
</div>
</div>
</div> </div>
</td> </td>
<td class="b_center_right">&nbsp;</td> <td class="b_center_right">&nbsp;</td>

@ -36,11 +36,6 @@
<div id="wgt_reload"></div> <div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div> <div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div> <div id="wgt_edit"></div>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</td> </td>
<td class="b_top_right">&nbsp;</td> <td class="b_top_right">&nbsp;</td>
</tr> </tr>
@ -50,7 +45,17 @@
<td> <td>
<div id="help"></div> <div id="help"></div>
<div id="ub-widget"> <div id="ub-widget">
<div id="parameters">
<div class="inline">
<label>
<select id="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</label>
</div>
</div>
</div> </div>
</td> </td>
<td class="b_center_right">&nbsp;</td> <td class="b_center_right">&nbsp;</td>

@ -1,5 +1,5 @@
var sankoreLang = { var sankoreLang = {
view: "Afficher", view: "Fermer",
edit: "Modifier", edit: "Modifier",
example: "Ceci est une série de mots à séparer correctement", example: "Ceci est une série de mots à séparer correctement",
wgt_name: "Séparer une phrase", wgt_name: "Séparer une phrase",
@ -27,7 +27,8 @@ var sankoreLang = {
"<p>Ecrivez simplement une phrase dans la zone de texte.</p>"+ "<p>Ecrivez simplement une phrase dans la zone de texte.</p>"+
"<p>Le bouton “Afficher” vous permet d’utiliser l’activité.</p>" "<p>Le bouton “Afficher” vous permet d’utiliser l’activité.</p>",
theme: "Thème"
}; };

@ -20,7 +20,6 @@
<script type="text/javascript" src="../../scripts/app.js"></script> <script type="text/javascript" src="../../scripts/app.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
alert(2)
if(window.sankore) if(window.sankore)
sankore.enableDropOnWidget(false); sankore.enableDropOnWidget(false);
}); });
@ -37,11 +36,6 @@
<div id="wgt_reload"></div> <div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div> <div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div> <div id="wgt_edit"></div>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</td> </td>
<td class="b_top_right">&nbsp;</td> <td class="b_top_right">&nbsp;</td>
</tr> </tr>
@ -51,7 +45,17 @@
<td> <td>
<div id="help"></div> <div id="help"></div>
<div id="ub-widget"> <div id="ub-widget">
<div id="parameters">
<div class="inline">
<label>
<select id="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</label>
</div>
</div>
</div> </div>
</td> </td>
<td class="b_center_right">&nbsp;</td> <td class="b_center_right">&nbsp;</td>

@ -1,5 +1,5 @@
var sankoreLang = { var sankoreLang = {
view: "Показать", view: "Закрыть",
edit: "Изменить", edit: "Изменить",
example: "это группа слов которую нужно разделить", example: "это группа слов которую нужно разделить",
wgt_name: "Разделить фразу", wgt_name: "Разделить фразу",
@ -8,7 +8,8 @@ var sankoreLang = {
pad: "Планшет", pad: "Планшет",
none: "Нет", none: "Нет",
help: "Помощь", help: "Помощь",
help_content: "Пример текста помощи ..." help_content: "Пример текста помощи ...",
theme: "Тема"
}; };
// if use the "view/edit" button or rely on the api instead // if use the "view/edit" button or rely on the api instead

@ -31,7 +31,7 @@ $(document).ready(function()
if (window.widget) { if (window.widget) {
window.widget.onleave = function(){ window.widget.onleave = function(){
sankore.setPreference("spl_phrase_style", $(".style_select").find("option:selected").val()); sankore.setPreference("spl_phrase_style", $("#style_select").find("option:selected").val());
if(w.editMode){ if(w.editMode){
sankore.setPreference("ordSplPhrases", w.elements.container.find( "textarea" ).val()); sankore.setPreference("ordSplPhrases", w.elements.container.find( "textarea" ).val());
sankore.setPreference("ordSplPhrasesState", "0"); sankore.setPreference("ordSplPhrasesState", "0");
@ -47,7 +47,6 @@ $(document).ready(function()
if(window.sankore && sankore.preference("spl_phrase_style","")){ if(window.sankore && sankore.preference("spl_phrase_style","")){
changeStyle(sankore.preference("spl_phrase_style","")); changeStyle(sankore.preference("spl_phrase_style",""));
$(".style_select").val(sankore.preference("spl_phrase_style",""));
} else } else
changeStyle("3") changeStyle("3")
@ -55,13 +54,23 @@ $(document).ready(function()
$("#wgt_edit").text(sankoreLang.edit); $("#wgt_edit").text(sankoreLang.edit);
$("#wgt_help").text(sankoreLang.help); $("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content); $("#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){ $("#wgt_display, #wgt_edit").click(function(event){
if(this.id == "wgt_display"){ if(this.id == "wgt_display"){
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_edit").removeClass("selected"); $("#wgt_edit").removeClass("selected");
$(".style_select").css("display","none"); $("#parameters").css("display","none");
$(this).css("display", "none"); $(this).css("display", "none");
$("#wgt_edit").css("display", "block"); $("#wgt_edit").css("display", "block");
w.modeView(); w.modeView();
@ -70,7 +79,7 @@ $(document).ready(function()
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_display").removeClass("selected"); $("#wgt_display").removeClass("selected");
$(".style_select").css("display","block"); $("#parameters").css("display","block");
$(this).css("display", "none"); $(this).css("display", "none");
$("#wgt_display").css("display", "block"); $("#wgt_display").css("display", "block");
w.modeEdit(); w.modeEdit();
@ -83,11 +92,13 @@ $(document).ready(function()
$("#wgt_help").click(function(){ $("#wgt_help").click(function(){
var tmp = $(this); var tmp = $(this);
if($(this).hasClass("open")){ if($(this).hasClass("open")){
$(this).removeClass("help_pad").removeClass("help_wood")
$("#help").slideUp("100", function(){ $("#help").slideUp("100", function(){
tmp.removeClass("open"); tmp.removeClass("open");
$("#ub-widget").show(); $("#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(); $("#ub-widget").hide();
$("#help").slideDown("100", function(){ $("#help").slideDown("100", function(){
tmp.addClass("open"); tmp.addClass("open");
@ -104,14 +115,6 @@ $(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());
})
w.maxWidth = 600; w.maxWidth = 600;
w.setEditContent( '<div class="inputwrap"><textarea class="percent">' + sentence + '</textarea></div>' ); w.setEditContent( '<div class="inputwrap"><textarea class="percent">' + sentence + '</textarea></div>' );
@ -276,10 +279,10 @@ $(document).ready(function()
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color"); $("#wgt_name").removeClass("pad_color");
$(".style_select").removeClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").addClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select option:first").attr('selected',true);
$("body, html").removeClass("without_radius").addClass("radius_ft");
break; break;
case "2": case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back"); $(".b_top_left").addClass("btl_pad").removeClass("without_back");
@ -293,10 +296,10 @@ $(document).ready(function()
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select option:first").next().attr('selected',true);
$("body, html").removeClass("without_radius").removeClass("radius_ft");
break; break;
case "3": case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad"); $(".b_top_left").addClass("without_back").removeClass("btl_pad");
@ -310,10 +313,10 @@ $(document).ready(function()
$("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").addClass("without_radius"); $("#style_select option:last").attr('selected',true);
$("body, html").addClass("without_radius").removeClass("radius_ft");
break; break;
} }
} }

@ -1,5 +1,5 @@
var sankoreLang = { var sankoreLang = {
view: "Display", view: "Close",
edit: "Edit", edit: "Edit",
example: "this is a bunch of words which should be split apart", example: "this is a bunch of words which should be split apart",
wgt_name: "Split a phrase", wgt_name: "Split a phrase",
@ -8,7 +8,8 @@ var sankoreLang = {
pad: "Pad", pad: "Pad",
none: "None", none: "None",
help: "Help", help: "Help",
help_content: "This is an example of help content ..." help_content: "This is an example of help content ...",
theme: "Theme"
}; };
// if use the "view/edit" button or rely on the api instead // if use the "view/edit" button or rely on the api instead

@ -109,57 +109,40 @@
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
/*font-family: "Lobster13Regular";*/ font-family: Arial,Helvetica,sans-serif;
font-size: 24px; font-size: 24px;
color: #8c5730; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0;
} }
#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{ #wgt_reload, #wgt_edit, #wgt_display, #wgt_help{
cursor: pointer; cursor: pointer;
height: 44px;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
/*font-family: "Lobster13Regular";*/ font-family: Arial,Helvetica,sans-serif;
font-size: 24px; font-size: 24px;
color: #8c5730; line-height: 32px;
} }
#wgt_display{ #wgt_display{
padding-left: 40px; padding-left: 35px;
background-image: url(../img/slate-edit.png); background: url(../img/toolbar-edit.png) left -32px no-repeat;
background-repeat: no-repeat; color: white;
background-position: top 0;
display: none; display: none;
} }
#wgt_edit{ #wgt_edit{
padding-left: 40px; padding-left: 35px;
background-image: url(../img/slate-edit.png); background: url(../img/slate-toolbar-edit.png) left top no-repeat;
background-repeat: no-repeat; color: #7F613F;
background-position: top 0; text-shadow: #FFDCA9 0 1px 0;
} }
#wgt_reload{ #wgt_reload{
padding-left: 40px; padding-left: 35px;
background-image: url(../img/slate-toolbar-reload.png); background: url(../img/slate-toolbar-reload.png) left top no-repeat;
background-repeat: no-repeat; color: #7F613F;
background-position: top 0; text-shadow: #FFDCA9 0 1px 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;
} }
.btl_pad{ .btl_pad{
@ -194,51 +177,50 @@
background-image: url(../img/pad-bottom-right.png) !important; background-image: url(../img/pad-bottom-right.png) !important;
} }
.pad_color{ .without_radius{
color: white !important; border-radius: 0 !important;
} }
.pad_reload{ .without_back{
background-image: url(../img/slate-toolbar-reload-white.png) !important; background: none !important;
} }
.pad_edit{ .pad_color{
background-image: url(../img/slate-display.png) !important; color: #FC9 !important;
text-shadow: none !important;
} }
.pad_select{ .pad_reload{
background-color: black !important; background: url(../img/toolbar-reload.png) left top no-repeat !important;
color: white !important;
background-image: url(../img/ar_down_white.png) !important;
} }
.without_radius{ .pad_edit{
border-radius: 0 !important; background: url(../img/toolbar-edit.png) left top no-repeat !important;
} }
.without_back{ .pad_help{
background: none !important; background: url(../img/toolbar-help.png) left top no-repeat !important;
} }
.none_select{ .help_wood{
background-color: #333 !important; background: url(../img/slate-toolbar-help.png) left -32px no-repeat !important;
color: white !important; color: white !important;
background-image: url(../img/ar_down_white.png) !important; text-shadow: #7F613F 0 -1px 0 !important;
} }
.pad_help{ .help_pad{
background-image: url(../img/slate-help-white.png) !important; background: url(../img/toolbar-help.png) left -32px no-repeat !important;
color: white !important;
} }
#wgt_help{ #wgt_help{
padding-left: 32px; padding-left: 35px;
background-image: url(../img/slate-help.png); background: url(../img/slate-toolbar-help.png) left top no-repeat;
background-repeat: no-repeat; color: #7F613F;
background-position: top 0; text-shadow: #FFDCA9 0 1px 0;
} }
#help{ #help{
width: 100%;
height: 100%; height: 100%;
overflow: auto; overflow: auto;
display: none; display: none;
@ -249,3 +231,34 @@
.open{ .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;
}

@ -3,7 +3,7 @@ html, body{
height: 100%; height: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
border-radius: 50px; border-radius: 35px;
overflow: hidden; overflow: hidden;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

@ -27,7 +27,6 @@
lang = sankore.locale().substr(0,2); lang = sankore.locale().substr(0,2);
} else } else
lang = "en"; lang = "en";
if(lang != "en"){ if(lang != "en"){
returnStatus(lang); returnStatus(lang);
} }
@ -61,11 +60,6 @@
<div id="wgt_reload"></div> <div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div> <div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div> <div id="wgt_edit"></div>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</td> </td>
<td class="b_top_right">&nbsp;</td> <td class="b_top_right">&nbsp;</td>
</tr> </tr>
@ -75,7 +69,17 @@
<td> <td>
<div id="help"></div> <div id="help"></div>
<div id="ub-widget"> <div id="ub-widget">
<div id="parameters">
<div class="inline">
<label>
<select id="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</label>
</div>
</div>
</div> </div>
</td> </td>
<td class="b_center_right">&nbsp;</td> <td class="b_center_right">&nbsp;</td>

@ -36,11 +36,6 @@
<div id="wgt_reload"></div> <div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div> <div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div> <div id="wgt_edit"></div>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</td> </td>
<td class="b_top_right">&nbsp;</td> <td class="b_top_right">&nbsp;</td>
</tr> </tr>
@ -50,7 +45,17 @@
<td> <td>
<div id="help"></div> <div id="help"></div>
<div id="ub-widget"> <div id="ub-widget">
<div id="parameters">
<div class="inline">
<label>
<select id="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</label>
</div>
</div>
</div> </div>
</td> </td>
<td class="b_center_right">&nbsp;</td> <td class="b_center_right">&nbsp;</td>

@ -1,5 +1,5 @@
var sankoreLang = { var sankoreLang = {
view: "Afficher", view: "Fermer",
edit: "Modifier", edit: "Modifier",
example: "bonjour, ceci est la première phrase. salut, c'est la deuxième phrase. bonjour à nouveau, c'est la troisième phrase. bonjour, c'est la quatrième phrase. salut, désolé, je suis en retard, je suis la cinquième phrase.", example: "bonjour, ceci est la première phrase. salut, c'est la deuxième phrase. bonjour à nouveau, c'est la troisième phrase. bonjour, c'est la quatrième phrase. salut, désolé, je suis en retard, je suis la cinquième phrase.",
wgt_name: "Séparer un texte", wgt_name: "Séparer un texte",
@ -26,7 +26,8 @@ var sankoreLang = {
"<p>Ecrivez simplement dans la zone de texte les différentes phrases séparées par des points.<b> NB : Les points d’interrogation, les deux points “:”, les points-virgules “;” et les points d’exclamation ne sont pas pris en compte.</b></p>"+ "<p>Ecrivez simplement dans la zone de texte les différentes phrases séparées par des points.<b> NB : Les points d’interrogation, les deux points “:”, les points-virgules “;” et les points d’exclamation ne sont pas pris en compte.</b></p>"+
"<p>Le bouton “Afficher” vous permet d’utiliser l’activité.</p>" "<p>Le bouton “Afficher” vous permet d’utiliser l’activité.</p>",
theme: "Thème"
}; };

@ -36,11 +36,6 @@
<div id="wgt_reload"></div> <div id="wgt_reload"></div>
<div id="wgt_display" class="selected"></div> <div id="wgt_display" class="selected"></div>
<div id="wgt_edit"></div> <div id="wgt_edit"></div>
<select class="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</td> </td>
<td class="b_top_right">&nbsp;</td> <td class="b_top_right">&nbsp;</td>
</tr> </tr>
@ -50,7 +45,17 @@
<td> <td>
<div id="help"></div> <div id="help"></div>
<div id="ub-widget"> <div id="ub-widget">
<div id="parameters">
<div class="inline">
<label>
<select id="style_select">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
</select>
</label>
</div>
</div>
</div> </div>
</td> </td>
<td class="b_center_right">&nbsp;</td> <td class="b_center_right">&nbsp;</td>

@ -1,5 +1,5 @@
var sankoreLang = { var sankoreLang = {
view: "Показать", view: "Закрыть",
edit: "Изменить", edit: "Изменить",
example: "привет, это первое предложение. а это второе предложение. и снова привет, это третье предложение. добрый день, это четвертое предложение. привет, извини, но я последнее предложение.", example: "привет, это первое предложение. а это второе предложение. и снова привет, это третье предложение. добрый день, это четвертое предложение. привет, извини, но я последнее предложение.",
wgt_name: "Разделить текст", wgt_name: "Разделить текст",
@ -8,7 +8,8 @@ var sankoreLang = {
pad: "Планшет", pad: "Планшет",
none: "Нет", none: "Нет",
help: "Помощь", help: "Помощь",
help_content: "Пример текста помощи ..." help_content: "Пример текста помощи ...",
theme: "Тема"
}; };
// if use the "view/edit" button or rely on the api instead // if use the "view/edit" button or rely on the api instead

@ -32,7 +32,7 @@ $(document).ready(function()
if (window.widget) { if (window.widget) {
window.widget.onleave = function(){ window.widget.onleave = function(){
sankore.setPreference("spl_text_style", $(".style_select").find("option:selected").val()); sankore.setPreference("spl_text_style", $("#style_select").find("option:selected").val());
if(w.editMode){ if(w.editMode){
sankore.setPreference("ordSplText", w.elements.container.find( "textarea" ).val()); sankore.setPreference("ordSplText", w.elements.container.find( "textarea" ).val());
sankore.setPreference("ordSplTextState", "0"); sankore.setPreference("ordSplTextState", "0");
@ -48,7 +48,7 @@ $(document).ready(function()
if(sankore.preference("spl_text_style","")){ if(sankore.preference("spl_text_style","")){
changeStyle(sankore.preference("spl_text_style","")); changeStyle(sankore.preference("spl_text_style",""));
$(".style_select").val(sankore.preference("spl_text_style","")); $("#style_select").val(sankore.preference("spl_text_style",""));
} else } else
changeStyle("3") changeStyle("3")
@ -56,13 +56,23 @@ $(document).ready(function()
$("#wgt_edit").text(sankoreLang.edit); $("#wgt_edit").text(sankoreLang.edit);
$("#wgt_help").text(sankoreLang.help); $("#wgt_help").text(sankoreLang.help);
$("#help").html(sankoreLang.help_content); $("#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){ $("#wgt_display, #wgt_edit").click(function(event){
if(this.id == "wgt_display"){ if(this.id == "wgt_display"){
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_edit").removeClass("selected"); $("#wgt_edit").removeClass("selected");
$(".style_select").css("display","none"); $("#parameters").css("display","none");
$(this).css("display", "none"); $(this).css("display", "none");
$("#wgt_edit").css("display", "block"); $("#wgt_edit").css("display", "block");
w.modeView(); w.modeView();
@ -71,7 +81,7 @@ $(document).ready(function()
if(!$(this).hasClass("selected")){ if(!$(this).hasClass("selected")){
$(this).addClass("selected"); $(this).addClass("selected");
$("#wgt_display").removeClass("selected"); $("#wgt_display").removeClass("selected");
$(".style_select").css("display","block"); $("#parameters").css("display","block");
$(this).css("display", "none"); $(this).css("display", "none");
$("#wgt_display").css("display", "block"); $("#wgt_display").css("display", "block");
w.modeEdit(); w.modeEdit();
@ -84,11 +94,13 @@ $(document).ready(function()
$("#wgt_help").click(function(){ $("#wgt_help").click(function(){
var tmp = $(this); var tmp = $(this);
if($(this).hasClass("open")){ if($(this).hasClass("open")){
$(this).removeClass("help_pad").removeClass("help_wood")
$("#help").slideUp("100", function(){ $("#help").slideUp("100", function(){
tmp.removeClass("open"); tmp.removeClass("open");
$("#ub-widget").show(); $("#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(); $("#ub-widget").hide();
$("#help").slideDown("100", function(){ $("#help").slideDown("100", function(){
tmp.addClass("open"); tmp.addClass("open");
@ -105,14 +117,6 @@ $(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());
})
w.maxWidth = 600; w.maxWidth = 600;
w.setEditContent( '<div class="inputwrap"><textarea class="percent">' + sentences + '</textarea></div>' ); w.setEditContent( '<div class="inputwrap"><textarea class="percent">' + sentences + '</textarea></div>' );
@ -279,10 +283,10 @@ $(document).ready(function()
$("#wgt_reload").removeClass("pad_color").removeClass("pad_reload"); $("#wgt_reload").removeClass("pad_color").removeClass("pad_reload");
$("#wgt_help").removeClass("pad_color").removeClass("pad_help"); $("#wgt_help").removeClass("pad_color").removeClass("pad_help");
$("#wgt_edit").removeClass("pad_color").removeClass("pad_edit"); $("#wgt_edit").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_display").removeClass("pad_color").removeClass("pad_edit");
$("#wgt_name").removeClass("pad_color"); $("#wgt_name").removeClass("pad_color");
$(".style_select").removeClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").addClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select option:first").attr('selected',true);
$("body, html").removeClass("without_radius").addClass("radius_ft");
break; break;
case "2": case "2":
$(".b_top_left").addClass("btl_pad").removeClass("without_back"); $(".b_top_left").addClass("btl_pad").removeClass("without_back");
@ -296,10 +300,10 @@ $(document).ready(function()
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("pad_select").removeClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").removeClass("without_radius"); $("#style_select option:first").next().attr('selected',true);
$("body, html").removeClass("without_radius").removeClass("radius_ft");
break; break;
case "3": case "3":
$(".b_top_left").addClass("without_back").removeClass("btl_pad"); $(".b_top_left").addClass("without_back").removeClass("btl_pad");
@ -313,10 +317,10 @@ $(document).ready(function()
$("#wgt_help").addClass("pad_color").addClass("pad_help"); $("#wgt_help").addClass("pad_color").addClass("pad_help");
$("#wgt_reload").addClass("pad_color").addClass("pad_reload"); $("#wgt_reload").addClass("pad_color").addClass("pad_reload");
$("#wgt_edit").addClass("pad_color").addClass("pad_edit"); $("#wgt_edit").addClass("pad_color").addClass("pad_edit");
$("#wgt_display").addClass("pad_color").addClass("pad_edit");
$("#wgt_name").addClass("pad_color"); $("#wgt_name").addClass("pad_color");
$(".style_select").addClass("none_select").val(val); $("#wgt_display").removeClass("display_wood");
$("body, html").addClass("without_radius"); $("#style_select option:last").attr('selected',true);
$("body, html").addClass("without_radius").removeClass("radius_ft");
break; break;
} }
} }

@ -1,5 +1,5 @@
var sankoreLang = { var sankoreLang = {
view: "Display", view: "Close",
edit: "Edit", edit: "Edit",
example: "hello, this is the first sentence. hi, this is the second sentence. hello again, this is the third sentence. good morning, this is the fourth sentence. hi, sorry, i\'m late, i\'m the fifth sentence.", example: "hello, this is the first sentence. hi, this is the second sentence. hello again, this is the third sentence. good morning, this is the fourth sentence. hi, sorry, i\'m late, i\'m the fifth sentence.",
wgt_name: "Split a text", wgt_name: "Split a text",
@ -8,7 +8,8 @@ var sankoreLang = {
pad: "Pad", pad: "Pad",
none: "None", none: "None",
help: "Help", help: "Help",
help_content: "This is an example of help content ..." help_content: "This is an example of help content ...",
theme: "Theme"
}; };
// if use the "view/edit" button or rely on the api instead // if use the "view/edit" button or rely on the api instead

@ -110,57 +110,40 @@
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
/*font-family: "Lobster13Regular";*/ font-family: Arial,Helvetica,sans-serif;
font-size: 24px; font-size: 24px;
color: #8c5730; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0;
} }
#wgt_reload, #wgt_edit, #wgt_display, #wgt_help{ #wgt_reload, #wgt_edit, #wgt_display, #wgt_help{
cursor: pointer; cursor: pointer;
height: 44px;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
/*font-family: "Lobster13Regular";*/ font-family: Arial,Helvetica,sans-serif;
font-size: 24px; font-size: 24px;
color: #8c5730; line-height: 32px;
} }
#wgt_display{ #wgt_display{
padding-left: 40px; padding-left: 35px;
background-image: url(../img/slate-edit.png); background: url(../img/toolbar-edit.png) left -32px no-repeat;
background-repeat: no-repeat; color: white;
background-position: top 0;
display: none; display: none;
} }
#wgt_edit{ #wgt_edit{
padding-left: 40px; padding-left: 35px;
background-image: url(../img/slate-edit.png); background: url(../img/slate-toolbar-edit.png) left top no-repeat;
background-repeat: no-repeat; color: #7F613F;
background-position: top 0; text-shadow: #FFDCA9 0 1px 0;
} }
#wgt_reload{ #wgt_reload{
padding-left: 40px; padding-left: 35px;
background-image: url(../img/slate-toolbar-reload.png); background: url(../img/slate-toolbar-reload.png) left top no-repeat;
background-repeat: no-repeat; color: #7F613F;
background-position: top 0; text-shadow: #FFDCA9 0 1px 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;
} }
.btl_pad{ .btl_pad{
@ -195,51 +178,50 @@
background-image: url(../img/pad-bottom-right.png) !important; background-image: url(../img/pad-bottom-right.png) !important;
} }
.pad_color{ .without_radius{
color: white !important; border-radius: 0 !important;
} }
.pad_reload{ .without_back{
background-image: url(../img/slate-toolbar-reload-white.png) !important; background: none !important;
} }
.pad_edit{ .pad_color{
background-image: url(../img/slate-display.png) !important; color: #FC9 !important;
text-shadow: none !important;
} }
.pad_select{ .pad_reload{
background-color: black !important; background: url(../img/toolbar-reload.png) left top no-repeat !important;
color: white !important;
background-image: url(../img/ar_down_white.png) !important;
} }
.without_radius{ .pad_edit{
border-radius: 0 !important; background: url(../img/toolbar-edit.png) left top no-repeat !important;
} }
.without_back{ .pad_help{
background: none !important; background: url(../img/toolbar-help.png) left top no-repeat !important;
} }
.none_select{ .help_wood{
background-color: #333 !important; background: url(../img/slate-toolbar-help.png) left -32px no-repeat !important;
color: white !important; color: white !important;
background-image: url(../img/ar_down_white.png) !important; text-shadow: #7F613F 0 -1px 0 !important;
} }
.pad_help{ .help_pad{
background-image: url(../img/slate-help-white.png) !important; background: url(../img/toolbar-help.png) left -32px no-repeat !important;
color: white !important;
} }
#wgt_help{ #wgt_help{
padding-left: 32px; padding-left: 35px;
background-image: url(../img/slate-help.png); background: url(../img/slate-toolbar-help.png) left top no-repeat;
background-repeat: no-repeat; color: #7F613F;
background-position: top 0; text-shadow: #FFDCA9 0 1px 0;
} }
#help{ #help{
width: 100%;
height: 100%; height: 100%;
overflow: auto; overflow: auto;
display: none; display: none;
@ -250,3 +232,34 @@
.open{ .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;
}

@ -3,7 +3,7 @@ html, body{
height: 100%; height: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
border-radius: 50px; border-radius: 35px;
overflow: hidden; overflow: hidden;
} }

@ -4,7 +4,7 @@
xmlns:ub="http://uniboard.mnemis.com/widgets" xmlns:ub="http://uniboard.mnemis.com/widgets"
id="http://www.example.net/widgets/helloworld" id="http://www.example.net/widgets/helloworld"
version="1.0" version="1.0"
width="750" width="770"
height="320" height="320"
ub:resizable="true"> ub:resizable="true">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save