[gen] Added the possibility to navigate to tied object number X within a list of tied objects from a Ref that is numbered.

This commit is contained in:
Gaetan Delannay 2014-10-21 09:25:37 +02:00
parent 4577855d60
commit 7484fbca93
18 changed files with 371 additions and 228 deletions

View file

@ -282,6 +282,19 @@ function askRefField(hookId, objectUrl, innerRef, startNumber, action,
evalInnerScripts);
}
function gotoTied(objectUrl, field, numberWidget, total) {
// Check that the number is correct
try {
var number = parseInt(numberWidget.value);
if (!isNaN(number)) {
if ((number >= 1) && (number <= total)) {
goto(objectUrl + '/gotoTied?field=' + field + '&number=' + number);
}
else numberWidget.style.background = wrongTextInput; }
else numberWidget.style.background = wrongTextInput; }
catch (err) { numberWidget.style.background = wrongTextInput; }
}
function askField(hookId, objectUrl, layoutType, customParams, showChanges,
masterValues, requestValue, error, className){
// Sends an Ajax request for getting the content of any field.

BIN
gen/ui/gotoNumber.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B