mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-17 02:41:02 +01:00
Etemplate - implement DetachedDOM interface on read-only checkbox, fixes set for every row bug in nextmatch
This commit is contained in:
parent
b47777422b
commit
e6bc7940b3
@ -180,7 +180,7 @@ et2_register_widget(et2_checkbox, ["checkbox"]);
|
|||||||
* et2_checkbox_ro is the dummy readonly implementation of the checkbox
|
* et2_checkbox_ro is the dummy readonly implementation of the checkbox
|
||||||
* @augments et2_checkbox
|
* @augments et2_checkbox
|
||||||
*/
|
*/
|
||||||
var et2_checkbox_ro = (function(){ "use strict"; return et2_checkbox.extend(
|
var et2_checkbox_ro = (function(){ "use strict"; return et2_checkbox.extend([et2_IDetachedDOM],
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Ignore unset value
|
* Ignore unset value
|
||||||
@ -220,6 +220,36 @@ var et2_checkbox_ro = (function(){ "use strict"; return et2_checkbox.extend(
|
|||||||
} else {
|
} else {
|
||||||
this.span.text(this.options.ro_false);
|
this.span.text(this.options.ro_false);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Code for implementing et2_IDetachedDOM
|
||||||
|
*
|
||||||
|
* @param {array} _attrs
|
||||||
|
*/
|
||||||
|
getDetachedAttributes: function(_attrs)
|
||||||
|
{
|
||||||
|
_attrs.push("value", "class");
|
||||||
|
},
|
||||||
|
|
||||||
|
getDetachedNodes: function()
|
||||||
|
{
|
||||||
|
return [this.span[0]];
|
||||||
|
},
|
||||||
|
|
||||||
|
setDetachedAttributes: function(_nodes, _values)
|
||||||
|
{
|
||||||
|
// Update the properties
|
||||||
|
if (typeof _values["value"] != "undefined")
|
||||||
|
{
|
||||||
|
this.span = jQuery(_nodes[0]);
|
||||||
|
this.set_value(_values["value"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof _values["class"] != "undefined")
|
||||||
|
{
|
||||||
|
_nodes[0].setAttribute("class", _values["class"]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});}).call(this);
|
});}).call(this);
|
||||||
et2_register_widget(et2_checkbox_ro, ["checkbox_ro"]);
|
et2_register_widget(et2_checkbox_ro, ["checkbox_ro"]);
|
||||||
|
Loading…
Reference in New Issue
Block a user