mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-24 06:48:40 +01:00
fixed not expanded onchange attribute, if widget type need to be expanded too, eg. log-viewer in CalDAV or eSync preferences
This commit is contained in:
parent
d6b7350e5b
commit
ace95f26b0
@ -115,6 +115,13 @@ function et2_checkType(_val, _type, _attr, _widget)
|
|||||||
return _val;
|
return _val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we dont check default-value any further, that also fixes type="js" does NOT accept null,
|
||||||
|
// which happens on expanded values
|
||||||
|
if (_val === et2_typeDefaults[_type])
|
||||||
|
{
|
||||||
|
return _val;
|
||||||
|
}
|
||||||
|
|
||||||
// If the type is boolean, check whether the given value is exactly true or
|
// If the type is boolean, check whether the given value is exactly true or
|
||||||
// false. Otherwise check whether the value is the string "true" or "false".
|
// false. Otherwise check whether the value is the string "true" or "false".
|
||||||
if (_type == "boolean")
|
if (_type == "boolean")
|
||||||
|
@ -660,6 +660,13 @@ var et2_widget = Class.extend(
|
|||||||
entry = null;
|
entry = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if _nodeName / type-attribute contains something to expand (eg. type="@${row}[type]"),
|
||||||
|
// we need to expand it now as it defines the constructor and by that attributes parsed via parseXMLAttrs!
|
||||||
|
if (_nodeName.charAt(0) == '@' || _nodeName.indexOf('$') >= 0)
|
||||||
|
{
|
||||||
|
_nodeName = attributes["type"] = this.getArrayMgr('content').expandName(_nodeName);
|
||||||
|
}
|
||||||
|
|
||||||
// Get the constructor - if the widget is readonly, use the special "_ro"
|
// Get the constructor - if the widget is readonly, use the special "_ro"
|
||||||
// constructor if it is available
|
// constructor if it is available
|
||||||
var constructor = typeof et2_registry[_nodeName] == "undefined" ?
|
var constructor = typeof et2_registry[_nodeName] == "undefined" ?
|
||||||
@ -672,19 +679,6 @@ var et2_widget = Class.extend(
|
|||||||
// Parse the attributes from the given XML attributes object
|
// Parse the attributes from the given XML attributes object
|
||||||
this.parseXMLAttrs(_node.attributes, attributes, constructor.prototype);
|
this.parseXMLAttrs(_node.attributes, attributes, constructor.prototype);
|
||||||
|
|
||||||
// check if parseXMLAttrs gives a different type attribute eg. type="@${row}[type]"
|
|
||||||
if (attributes.type && attributes.type != _nodeName)
|
|
||||||
{
|
|
||||||
// set _nodeName and constructor accordingly
|
|
||||||
_nodeName = attributes.type;
|
|
||||||
constructor = typeof et2_registry[_nodeName] == "undefined" ?
|
|
||||||
et2_placeholder : et2_registry[_nodeName];
|
|
||||||
if (readonly && typeof et2_registry[_nodeName + "_ro"] != "undefined")
|
|
||||||
{
|
|
||||||
constructor = et2_registry[_nodeName + "_ro"];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Do an sanity check for the attributes
|
// Do an sanity check for the attributes
|
||||||
constructor.prototype.generateAttributeSet(attributes);
|
constructor.prototype.generateAttributeSet(attributes);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user