New feature: can specify output of "none" for a dynamic element.
This commit is contained in:
committed by
Alexander Kryklia
parent
1770de73f1
commit
ec0bdfb445
@@ -31,7 +31,7 @@ define('ElOutput', ['logme'], function (logme) {
|
||||
// element.
|
||||
if (
|
||||
(typeof obj['@output'] !== 'string') ||
|
||||
(obj['@output'].toLowerCase() !== 'element')
|
||||
((obj['@output'].toLowerCase() !== 'element') && (obj['@output'].toLowerCase() !== 'none'))
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@@ -108,19 +108,23 @@ define('ElOutput', ['logme'], function (logme) {
|
||||
|
||||
paramNames.pop();
|
||||
|
||||
el = $('#' + obj['@el_id']);
|
||||
if (obj['@output'].toLowerCase() !== 'none') {
|
||||
el = $('#' + obj['@el_id']);
|
||||
|
||||
if (el.length !== 1) {
|
||||
logme(
|
||||
'ERROR: DOM element with ID "' + obj['@el_id'] + '" ' +
|
||||
'not found. Dynamic element not created.'
|
||||
);
|
||||
if (el.length !== 1) {
|
||||
logme(
|
||||
'ERROR: DOM element with ID "' + obj['@el_id'] + '" ' +
|
||||
'not found. Dynamic element not created.'
|
||||
);
|
||||
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
el.html(func.apply(window, state.getAllParameterValues()));
|
||||
} else {
|
||||
el = null;
|
||||
}
|
||||
|
||||
el.html(func.apply(window, state.getAllParameterValues()));
|
||||
|
||||
state.addDynamicEl(el, func, obj['@el_id'], updateOnEvent);
|
||||
}
|
||||
|
||||
|
||||
@@ -237,6 +237,10 @@ define('State', ['logme'], function (logme) {
|
||||
allParameterValues[parameters[paramName].helperArrayIndex] = paramValueNum;
|
||||
|
||||
for (c1 = 0; c1 < dynamicEl.length; c1++) {
|
||||
if (dynamicEl[c1].el === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (
|
||||
((updateOnEvent !== undefined) && (dynamicEl[c1].updateOnEvent === updateOnEvent)) ||
|
||||
(updateOnEvent === undefined)
|
||||
|
||||
Reference in New Issue
Block a user