mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-28 00:39:19 +01:00
Hide custom field lines from nextmatch if they have no value
This commit is contained in:
parent
f8cb222580
commit
a4335f01a0
@ -220,7 +220,7 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput
|
|||||||
row.attr('title', field.label);
|
row.attr('title', field.label);
|
||||||
row.attr('data-label', field.label);
|
row.attr('data-label', field.label);
|
||||||
row.attr('data-help', field.help);
|
row.attr('data-help', field.help);
|
||||||
this.detachedNodes.push(cf[0]);
|
this.detachedNodes.push(row[0]);
|
||||||
} else {
|
} else {
|
||||||
// Label in first column, widget in 2nd
|
// Label in first column, widget in 2nd
|
||||||
cf.text(field.label + "");
|
cf.text(field.label + "");
|
||||||
@ -536,8 +536,16 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput
|
|||||||
|
|
||||||
setDetachedAttributes: function(_nodes, _values)
|
setDetachedAttributes: function(_nodes, _values)
|
||||||
{
|
{
|
||||||
// This doesn't need to be implemented.
|
|
||||||
// Individual widgets are detected and handled by the grid, but the interface is needed for this to happen
|
// Individual widgets are detected and handled by the grid, but the interface is needed for this to happen
|
||||||
|
|
||||||
|
// Show the row if there's a value, hide it if there is no value
|
||||||
|
var cf_index = 0
|
||||||
|
for(var key in _values.fields)
|
||||||
|
{
|
||||||
|
// toggle() needs a boolean to do what we want
|
||||||
|
$j(_nodes[cf_index]).toggle(_values.fields[key] && _values.value[this.prefix + key]?true:false);
|
||||||
|
cf_index++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user