diff --git a/fields/calendar.py b/fields/calendar.py index db42a9b..467ca93 100644 --- a/fields/calendar.py +++ b/fields/calendar.py @@ -45,7 +45,7 @@ class Calendar(Field): goForward=not endDate or (endDate.strftime(fmt) > \ grid[-1][-1].strftime(fmt))"> - @@ -58,7 +58,7 @@ class Calendar(Field): q(objUrl), q(field.name), q(defaultDateMonth))" disabled=":defaultDate.strftime(fmt)==monthDayOne.strftime(fmt)"/> - :_('month_%s' % monthDayOne.aMonth()) diff --git a/fields/ref.py b/fields/ref.py index 45c601d..c4ad141 100644 --- a/fields/ref.py +++ b/fields/ref.py @@ -78,18 +78,28 @@ class Ref(Field): # This PX displays icons for triggering actions on a given referenced object # (edit, delete, etc). pxObjectActions = Px(''' - +
-
+ q(tiedUid), q('move'), q('**v**')))"> + + + + + + @@ -107,7 +117,7 @@ class Ref(Field): + onclick=":'onDeleteObject(%s)' % q(tiedUid)"/> @@ -115,14 +125,14 @@ class Ref(Field): action='unlink'" class="clickable" title=":_('object_unlink')" src=":url(imgName)" onclick=":'onLink(%s,%s,%s,%s)' % (q(action), q(zobj.id), \ - q(field.name), q(tied.o.id))"/> + q(field.name), q(tiedUid))"/> + q(field.name), q(tiedUid))"/>
''') @@ -923,16 +933,25 @@ class Ref(Field): (obj.id, self.name, code % ('objs', 'objs'), poss) def doChangeOrder(self, obj): - '''Moves a referred object up or down.''' + '''Moves a referred object up/down/top/bottom.''' rq = obj.REQUEST - # Move the item up (-1), down (+1) ? - move = (rq['move'] == 'down') and 1 or -1 - # The UID of the referred object to move + # How to move the item? + move = rq['move'] + # Get the UID of the tied object to move uid = rq['refObjectUid'] uids = getattr(obj.aq_base, self.name) oldIndex = uids.index(uid) + # Remove the object from its previous position. uids.remove(uid) - newIndex = oldIndex + move + # Re-insert the object at its new position. + if move == 'up': + newIndex = oldIndex - 1 + elif move == 'down': + newIndex = oldIndex + 1 + elif move == 'top': + newIndex = 0 + elif move == 'bottom': + newIndex = len(uids) uids.insert(newIndex, uid) xhtmlToText = re.compile('<.*?>', re.S) @@ -959,11 +978,12 @@ class Ref(Field): res = refObject.tool.o.truncateValue(res, maxWidth) return res - def getIndexOf(self, obj, refObj): - '''Gets the position of p_refObj within this field on p_obj.''' + def getIndexOf(self, obj, tiedUid): + '''Gets the position of tied object identified by p_tiedUid within this + field on p_obj.''' uids = getattr(obj.aq_base, self.name, None) if not uids: raise IndexError() - return uids.index(refObj.o.id) + return uids.index(tiedUid) def sort(self, obj): '''Called when the user wants to sort the content of this field.''' diff --git a/gen/tr/Appy.pot b/gen/tr/Appy.pot index 76f6d27..9d9a5c8 100644 --- a/gen/tr/Appy.pot +++ b/gen/tr/Appy.pot @@ -103,6 +103,14 @@ msgstr "" msgid "move_down" msgstr "" +#. Default: "Move to top" +msgid "move_top" +msgstr "" + +#. Default: "Move to bottom" +msgid "move_bottom" +msgstr "" + #. Default: "create" msgid "query_create" msgstr "" diff --git a/gen/tr/ar.po b/gen/tr/ar.po index 9825119..e392dfb 100644 --- a/gen/tr/ar.po +++ b/gen/tr/ar.po @@ -103,6 +103,14 @@ msgstr "" msgid "move_down" msgstr "" +#. Default: "Move to top" +msgid "move_top" +msgstr "" + +#. Default: "Move to bottom" +msgid "move_bottom" +msgstr "" + #. Default: "create" msgid "query_create" msgstr "" diff --git a/gen/tr/de.po b/gen/tr/de.po index 6ac8812..0dc5b22 100644 --- a/gen/tr/de.po +++ b/gen/tr/de.po @@ -103,6 +103,14 @@ msgstr "Nach oben verschieben" msgid "move_down" msgstr "Nach unten verschieben" +#. Default: "Move to top" +msgid "move_top" +msgstr "" + +#. Default: "Move to bottom" +msgid "move_bottom" +msgstr "" + #. Default: "create" msgid "query_create" msgstr "Anfertigen" diff --git a/gen/tr/en.po b/gen/tr/en.po index 68ae252..56c4ab9 100644 --- a/gen/tr/en.po +++ b/gen/tr/en.po @@ -104,6 +104,14 @@ msgstr "Move up" msgid "move_down" msgstr "Move down" +#. Default: "Move to top" +msgid "move_top" +msgstr "Move to top" + +#. Default: "Move to bottom" +msgid "move_bottom" +msgstr "Move to bottom" + #. Default: "create" msgid "query_create" msgstr "create" diff --git a/gen/tr/es.po b/gen/tr/es.po index 2589b38..4cc7770 100644 --- a/gen/tr/es.po +++ b/gen/tr/es.po @@ -103,6 +103,14 @@ msgstr "Mueva hacia arriba" msgid "move_down" msgstr "Mueva hacia abajo" +#. Default: "Move to top" +msgid "move_top" +msgstr "" + +#. Default: "Move to bottom" +msgid "move_bottom" +msgstr "" + #. Default: "create" msgid "query_create" msgstr "Crear" diff --git a/gen/tr/fr.po b/gen/tr/fr.po index 02be750..cee996a 100644 --- a/gen/tr/fr.po +++ b/gen/tr/fr.po @@ -104,6 +104,14 @@ msgstr "Déplacer vers le haut" msgid "move_down" msgstr "Déplacer vers le bas" +#. Default: "Move to top" +msgid "move_top" +msgstr "Déplacer en première position" + +#. Default: "Move to bottom" +msgid "move_bottom" +msgstr "Déplacer en dernière position" + #. Default: "create" msgid "query_create" msgstr "Créer" diff --git a/gen/tr/it.po b/gen/tr/it.po index 9af0a27..7df20b8 100644 --- a/gen/tr/it.po +++ b/gen/tr/it.po @@ -103,6 +103,14 @@ msgstr "Su" msgid "move_down" msgstr "Giù" +#. Default: "Move to top" +msgid "move_top" +msgstr "" + +#. Default: "Move to bottom" +msgid "move_bottom" +msgstr "" + #. Default: "create" msgid "query_create" msgstr "Creazione in corso" diff --git a/gen/tr/nl.po b/gen/tr/nl.po index 5096327..a253d41 100644 --- a/gen/tr/nl.po +++ b/gen/tr/nl.po @@ -103,6 +103,14 @@ msgstr "Verplaats naar boven" msgid "move_down" msgstr "Verplaats naar beneden" +#. Default: "Move to top" +msgid "move_top" +msgstr "" + +#. Default: "Move to bottom" +msgid "move_bottom" +msgstr "" + #. Default: "create" msgid "query_create" msgstr "Aanmaken" diff --git a/gen/ui/appy.js b/gen/ui/appy.js index 31376fd..2bbde76 100644 --- a/gen/ui/appy.js +++ b/gen/ui/appy.js @@ -48,9 +48,9 @@ function len(dict) { return res; } -function switchLanguage(selectWidget) { +function switchLanguage(selectWidget, siteUrl) { var language = selectWidget.options[selectWidget.selectedIndex].value; - goto("/config/changeLanguage?language=" + language); + goto(siteUrl + '/config/changeLanguage?language=' + language); } var isIe = (navigator.appName == "Microsoft Internet Explorer"); diff --git a/gen/ui/arrowDown.png b/gen/ui/arrowDown.png index 262e0a1..e1a3d72 100644 Binary files a/gen/ui/arrowDown.png and b/gen/ui/arrowDown.png differ diff --git a/gen/ui/arrowLeftSimple.png b/gen/ui/arrowLeft.png similarity index 100% rename from gen/ui/arrowLeftSimple.png rename to gen/ui/arrowLeft.png diff --git a/gen/ui/arrowLeftDouble.png b/gen/ui/arrowLeftDouble.png deleted file mode 100644 index 9e25e60..0000000 Binary files a/gen/ui/arrowLeftDouble.png and /dev/null differ diff --git a/gen/ui/arrowRight.png b/gen/ui/arrowRight.png new file mode 100644 index 0000000..b289ffa Binary files /dev/null and b/gen/ui/arrowRight.png differ diff --git a/gen/ui/arrowRightDouble.png b/gen/ui/arrowRightDouble.png deleted file mode 100644 index 7d5b713..0000000 Binary files a/gen/ui/arrowRightDouble.png and /dev/null differ diff --git a/gen/ui/arrowRightSimple.png b/gen/ui/arrowRightSimple.png deleted file mode 100644 index baec038..0000000 Binary files a/gen/ui/arrowRightSimple.png and /dev/null differ diff --git a/gen/ui/arrowsDown.png b/gen/ui/arrowsDown.png new file mode 100644 index 0000000..11e3f15 Binary files /dev/null and b/gen/ui/arrowsDown.png differ diff --git a/gen/ui/arrowsLeft.png b/gen/ui/arrowsLeft.png new file mode 100644 index 0000000..af7e8c4 Binary files /dev/null and b/gen/ui/arrowsLeft.png differ diff --git a/gen/ui/arrowsRight.png b/gen/ui/arrowsRight.png new file mode 100644 index 0000000..6e62c14 Binary files /dev/null and b/gen/ui/arrowsRight.png differ diff --git a/gen/ui/arrowsUp.png b/gen/ui/arrowsUp.png new file mode 100644 index 0000000..58b316e Binary files /dev/null and b/gen/ui/arrowsUp.png differ diff --git a/gen/wrappers/ToolWrapper.py b/gen/wrappers/ToolWrapper.py index af6b3fa..7be81cf 100644 --- a/gen/wrappers/ToolWrapper.py +++ b/gen/wrappers/ToolWrapper.py @@ -50,13 +50,13 @@ class ToolWrapper(AbstractWrapper): @@ -70,7 +70,7 @@ class ToolWrapper(AbstractWrapper): @@ -82,7 +82,7 @@ class ToolWrapper(AbstractWrapper): sNumber= nbOfCountedPages * batchSize" if="(startNumber != sNumber) and \ (startNumber != sNumber-batchSize)"> diff --git a/gen/wrappers/__init__.py b/gen/wrappers/__init__.py index 02efa72..21dfdc8 100644 --- a/gen/wrappers/__init__.py +++ b/gen/wrappers/__init__.py @@ -31,9 +31,9 @@ class AbstractWrapper(object): + title=":_('goto_previous')" src=":url('arrowLeft')"/> @@ -42,9 +42,9 @@ class AbstractWrapper(object): + src=":url('arrowsRight')"/> ''') pxNavigationStrip = Px(''' @@ -188,10 +188,10 @@ class AbstractWrapper(object): class="pageLink clickable">:_('app_connect') -