Fix customfield column sometimes disappearing from print

This commit is contained in:
Nathan Gray 2016-05-10 17:12:39 +00:00
parent e7763189b1
commit 5dc798da7f

View File

@ -2061,14 +2061,15 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_
if(col.visibility === ET2_COL_VISIBILITY_VISIBLE) columns_selected.push(colName);
}
// Custom fields get listed separately
if(widget.instanceOf(et2_nextmatch_customfields) && col.visibility === ET2_COL_VISIBILITY_VISIBLE)
if(widget.instanceOf(et2_nextmatch_customfields))
{
if(jQuery.isEmptyObject(widget.customfields))
{
// No customfields defined, don't show column
delete(columns[colName]);
continue;
}
colName = widget.id;
if(col.visibility === ET2_COL_VISIBILITY_VISIBLE && !
jQuery.isEmptyObject(widget.customfields)
)
{
columns[colName] = col.caption;
for(var field_name in widget.customfields)
{
columns[widget.prefix+field_name] = " - "+widget.customfields[field_name].label;
@ -2079,6 +2080,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_
}
}
}
}
// Preference exists? Set it now
if(this.egw().preference(pref,app))