[gen] Added ref.render == 'titles' = a way to render linked objects as a simple list of comma-separated, non clickable titles; bugfix in inline-edit of string XHTML fields.

This commit is contained in:
Gaetan Delannay 2014-04-30 21:08:42 +02:00
parent 4d78996938
commit 14f85509e1
15 changed files with 106 additions and 64 deletions

View file

@ -12,7 +12,7 @@ class Protos:
# List of attributes that can't be given to a Type constructor
notInit = ('id', 'type', 'pythonType', 'slaves', 'isSelect', 'hasLabel',
'hasDescr', 'hasHelp', 'required', 'filterable', 'validable',
'isBack', 'pageName', 'masterName')
'isBack', 'pageName', 'masterName', 'renderLabel')
@classmethod
def get(self, appyType):
'''Returns a prototype instance for p_appyType.'''

View file

@ -79,7 +79,7 @@ msgstr ""
msgid "max_ref_violated"
msgstr ""
#. Default: "No object."
#. Default: "-"
msgid "no_ref"
msgstr ""

View file

@ -79,7 +79,7 @@ msgstr ""
msgid "max_ref_violated"
msgstr ""
#. Default: "No object."
#. Default: "-"
msgid "no_ref"
msgstr ""

View file

@ -79,7 +79,7 @@ msgstr "Hier müssen Sie Elemente auswählen."
msgid "max_ref_violated"
msgstr "Sie haben zuviele Elemente ausgewählt."
#. Default: "No object."
#. Default: "-"
msgid "no_ref"
msgstr "Kein Element"

View file

@ -80,7 +80,7 @@ msgstr "You must choose more elements here."
msgid "max_ref_violated"
msgstr "Too much elements are selected here."
#. Default: "No object."
#. Default: "-"
msgid "no_ref"
msgstr "No object."

View file

@ -79,7 +79,7 @@ msgstr "Debe elegir más elementos aquí."
msgid "max_ref_violated"
msgstr "Demasiados elementos son seleccionados aquí."
#. Default: "No object."
#. Default: "-"
msgid "no_ref"
msgstr "Ningún elemento."

View file

@ -80,9 +80,9 @@ msgstr "Vous devez choisir plus d'éléments ici."
msgid "max_ref_violated"
msgstr "Trop d'éléments sont sélectionnés ici."
#. Default: "No object."
#. Default: "-"
msgid "no_ref"
msgstr "Aucun élément."
msgstr "-"
#. Default: "Add a new one"
msgid "add_ref"

View file

@ -79,9 +79,9 @@ msgstr "Qui deve scegliere un maggior numero di elementi"
msgid "max_ref_violated"
msgstr "Un numero eccessivo di elementi sono scelti"
#. Default: "No object."
#. Default: "-"
msgid "no_ref"
msgstr "Nessun elemento"
msgstr "-"
#. Default: "Add a new one"
msgid "add_ref"

View file

@ -79,9 +79,9 @@ msgstr "U moet hier meerdere elementen selecteren."
msgid "max_ref_violated"
msgstr "U hebt teveel elementen geselecteerd."
#. Default: "No object."
#. Default: "-"
msgid "no_ref"
msgstr "Geen element."
msgstr "-"
#. Default: "Add a new one"
msgid "add_ref"

View file

@ -100,7 +100,7 @@ td.search { padding-top: 8px }
border: 1px solid grey; box-shadow: 2px 2px 2px #888888}
.dropdown { display:none; position: absolute; border: 1px solid #cccccc;
background-color: white; padding: 3px 4px 0; font-size: 8pt;
font-weight: normal }
font-weight: normal; z-index: 2 }
.dropdownMenu { cursor: pointer; padding-right: 4px; font-size: 93% }
.dropdown a:hover { text-decoration: underline }
.list { margin-bottom: 3px }
@ -155,7 +155,7 @@ td.search { padding-top: 8px }
.homeTable th { padding-top: 5px; font-size: 105% }
.first { margin-top: 0px }
.error { margin: 5px }
.podName { font-size: 95% }
.smaller { font-size: 95% }
.podTable { margin-left: 15px }
.cbCell { width: 10px; text-align: center}
.tabs { position:relative; bottom:-2px }

View file

@ -275,6 +275,22 @@ function askField(hookId, objectUrl, layoutType, showChanges, masterValues,
askAjaxChunk(hookId, 'GET', objectUrl, px, params, null, evalInnerScripts);
}
function doInlineSave(objectUid, name, objectUrl, content){
/* Ajax-saves p_content of field named p_name on object whose id is
p_objectUid and whose URL is p_objectUrl. Asks a confirmation before
doing it. */
var doIt = confirm('Do it?');
var params = {'action': 'storeFromAjax', 'layoutType': 'view'};
var hook = null;
if (!doIt) {
params['cancel'] = 'True';
hook = objectUid + '_' + name;
}
else { params['fieldContent'] = encodeURIComponent(content) }
askAjaxChunk(hook, 'POST', objectUrl, name + ':pxRender', params, null,
evalInnerScripts);
}
// Used by checkbox widgets for having radio-button-like behaviour.
function toggleCheckbox(visibleCheckbox, hiddenBoolean) {
vis = document.getElementById(visibleCheckbox);