mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 09:38:53 +01:00
Slightly more efficient link display in datagrid; treat false and null titles as empty string
This commit is contained in:
parent
91c4a4de81
commit
f26822c302
@ -685,6 +685,7 @@ var et2_link = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
* Used as a callback, so node is provided to make sure we get the right one
|
* Used as a callback, so node is provided to make sure we get the right one
|
||||||
*/
|
*/
|
||||||
set_title: function(node, _value) {
|
set_title: function(node, _value) {
|
||||||
|
if(_value === false || _value === null) _value = "";
|
||||||
jQuery(node).text(_value+"");
|
jQuery(node).text(_value+"");
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -717,8 +718,16 @@ var et2_link = et2_valueWidget.extend([et2_IDetachedDOM], {
|
|||||||
*/
|
*/
|
||||||
setDetachedAttributes: function(_nodes, _values) {
|
setDetachedAttributes: function(_nodes, _values) {
|
||||||
this.link = $j(_nodes[0]);
|
this.link = $j(_nodes[0]);
|
||||||
|
if(typeof _values["value"] !== "undefined" && typeof _values["value"].title !== "undefined")
|
||||||
|
{
|
||||||
|
// Direct route
|
||||||
|
this.set_title(_nodes[0], _values["value"].title);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
this.set_value(_values["value"]);
|
this.set_value(_values["value"]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
et2_register_widget(et2_link, ["link", "link-entry_ro"]);
|
et2_register_widget(et2_link, ["link", "link-entry_ro"]);
|
||||||
|
Loading…
Reference in New Issue
Block a user