mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-19 04:46:42 +02:00
Transform attributes before passing them to the row's widget
This commit is contained in:
@@ -401,6 +401,9 @@ var et2_dataview_rowProvider = Class.extend({
|
|||||||
entry.widget.id = data.id;
|
entry.widget.id = data.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Adjust data for that row
|
||||||
|
entry.widget.transformAttributes(data);
|
||||||
|
|
||||||
// Call the setDetachedAttributes function
|
// Call the setDetachedAttributes function
|
||||||
entry.widget.setDetachedAttributes(nodes, data);
|
entry.widget.setDetachedAttributes(nodes, data);
|
||||||
}
|
}
|
||||||
|
@@ -542,7 +542,6 @@ var et2_date_duration_ro = et2_date_duration.extend([et2_IDetachedDOM],{
|
|||||||
_nodes[i].removeChild(_nodes[i].childNodes[j]);
|
_nodes[i].removeChild(_nodes[i].childNodes[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.transformAttributes(_values);
|
|
||||||
var display = this._convert_to_display(_values.value);
|
var display = this._convert_to_display(_values.value);
|
||||||
_nodes[0].appendChild(document.createTextNode(display.value));
|
_nodes[0].appendChild(document.createTextNode(display.value));
|
||||||
_nodes[1].appendChild(document.createTextNode(display.unit));
|
_nodes[1].appendChild(document.createTextNode(display.unit));
|
||||||
@@ -673,7 +672,6 @@ var et2_date_ro = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
*/
|
*/
|
||||||
setDetachedAttributes: function(_nodes, _values) {
|
setDetachedAttributes: function(_nodes, _values) {
|
||||||
this.span = jQuery(_nodes[0]);
|
this.span = jQuery(_nodes[0]);
|
||||||
this.transformAttributes(_values);
|
|
||||||
this.set_value(_values["value"]);
|
this.set_value(_values["value"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -152,8 +152,6 @@ var et2_description = et2_baseWidget.extend([et2_IDetachedDOM], {
|
|||||||
|
|
||||||
setDetachedAttributes: function(_nodes, _values)
|
setDetachedAttributes: function(_nodes, _values)
|
||||||
{
|
{
|
||||||
this.transformAttributes(_values);
|
|
||||||
|
|
||||||
if (typeof _values["value"] != "undefined")
|
if (typeof _values["value"] != "undefined")
|
||||||
{
|
{
|
||||||
et2_insertLinkText(this._parseText(_values["value"]), _nodes[0],
|
et2_insertLinkText(this._parseText(_values["value"]), _nodes[0],
|
||||||
|
@@ -157,8 +157,6 @@ var et2_image = et2_baseWidget.extend(et2_IDetachedDOM, {
|
|||||||
// Set the given DOM-Nodes
|
// Set the given DOM-Nodes
|
||||||
this.image = $j(_nodes[0]);
|
this.image = $j(_nodes[0]);
|
||||||
|
|
||||||
this.transformAttributes(_values);
|
|
||||||
|
|
||||||
// Set the attributes
|
// Set the attributes
|
||||||
if (_values["src"])
|
if (_values["src"])
|
||||||
{
|
{
|
||||||
|
@@ -589,7 +589,6 @@ var et2_link = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
* given values.
|
* given values.
|
||||||
*/
|
*/
|
||||||
setDetachedAttributes: function(_nodes, _values) {
|
setDetachedAttributes: function(_nodes, _values) {
|
||||||
this.transformAttributes(_values);
|
|
||||||
this.node = $j(_nodes[0]);
|
this.node = $j(_nodes[0]);
|
||||||
this.set_value(_values["value"]);
|
this.set_value(_values["value"]);
|
||||||
}
|
}
|
||||||
@@ -727,7 +726,6 @@ var et2_link_string = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
*/
|
*/
|
||||||
setDetachedAttributes: function(_nodes, _values) {
|
setDetachedAttributes: function(_nodes, _values) {
|
||||||
this.list = $j(_nodes[0]);
|
this.list = $j(_nodes[0]);
|
||||||
if(!_values.value) this.transformAttributes(_values);
|
|
||||||
this.set_value(_values["value"]);
|
this.set_value(_values["value"]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@@ -105,8 +105,6 @@ var et2_progress = et2_valueWidget.extend(et2_IDetachedDOM,
|
|||||||
// Set the given DOM-Nodes
|
// Set the given DOM-Nodes
|
||||||
this.node = _nodes[0];
|
this.node = _nodes[0];
|
||||||
|
|
||||||
this.transformAttributes(_values);
|
|
||||||
|
|
||||||
// Set the attributes
|
// Set the attributes
|
||||||
if (_values["label"])
|
if (_values["label"])
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user