mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 20:01:36 +02:00
Fix custom field preference handling when previous columns disabled
This commit is contained in:
parent
5458e76caa
commit
0136c6292c
@ -147,7 +147,6 @@ var et2_customfields_list = et2_DOMWidget.extend([et2_IDetachedDOM], {
|
|||||||
delete(attrs.label);
|
delete(attrs.label);
|
||||||
|
|
||||||
// Create widget
|
// Create widget
|
||||||
console.debug(attrs);
|
|
||||||
var widget = this.widgets[field_name] = et2_createWidget(attrs.type ? attrs.type : field.type, attrs, this);
|
var widget = this.widgets[field_name] = et2_createWidget(attrs.type ? attrs.type : field.type, attrs, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,19 +353,25 @@ var et2_nextmatch = et2_DOMWidget.extend(et2_IResizeable, {
|
|||||||
if(!colName) continue;
|
if(!colName) continue;
|
||||||
|
|
||||||
if(size[colName]) _colData[i].width = size[colName];
|
if(size[colName]) _colData[i].width = size[colName];
|
||||||
|
|
||||||
// Customfields needs special processing
|
// Customfields needs special processing
|
||||||
if(_row[i].widget.instanceOf(et2_nextmatch_customfields))
|
if(_row[i].widget.instanceOf(et2_nextmatch_customfields))
|
||||||
{
|
{
|
||||||
var cfDisplay = et2_csvSplit(columnDisplay[i],null,"_#");
|
// Find cf field
|
||||||
for(var j = 1; j < cfDisplay.length; j++)
|
for(var j = 0; j < columnDisplay.length; j++)
|
||||||
{
|
{
|
||||||
_row[i].widget.options.fields[cfDisplay[j]] = true;
|
if(columnDisplay[j].indexOf(_row[i].widget.id) == 0) {
|
||||||
}
|
var cfDisplay = et2_csvSplit(columnDisplay[j],null,"_#");
|
||||||
// Resets field visibility too
|
_row[i].widget.options.fields = {};
|
||||||
_row[i].widget._getColumnName();
|
for(var k = 1; k < cfDisplay.length; k++)
|
||||||
_colData[i].disabled = negated;
|
{
|
||||||
continue RowLoop;
|
_row[i].widget.options.fields[cfDisplay[k]] = true;
|
||||||
|
}
|
||||||
|
// Resets field visibility too
|
||||||
|
_row[i].widget._getColumnName();
|
||||||
|
_colData[i].disabled = negated;
|
||||||
|
continue RowLoop;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for(var j = 0; j < columnDisplay.length; j++)
|
for(var j = 0; j < columnDisplay.length; j++)
|
||||||
{
|
{
|
||||||
@ -1154,7 +1160,7 @@ var et2_nextmatch_customfields = et2_nextmatch_header.extend({
|
|||||||
if(widget) cf.append(widget.getDOMNode());
|
if(widget) cf.append(widget.getDOMNode());
|
||||||
|
|
||||||
// Check for column filter
|
// Check for column filter
|
||||||
if(this.options.fields.length > 0 && (
|
if(!jQuery.isEmptyObject(this.options.fields) && (
|
||||||
this.options.fields[field_name] == false || typeof this.options.fields[field_name] == 'undefined'))
|
this.options.fields[field_name] == false || typeof this.options.fields[field_name] == 'undefined'))
|
||||||
{
|
{
|
||||||
cf.hide();
|
cf.hide();
|
||||||
@ -1196,10 +1202,9 @@ var et2_nextmatch_customfields = et2_nextmatch_header.extend({
|
|||||||
_getColumnName: function() {
|
_getColumnName: function() {
|
||||||
var name = this.id;
|
var name = this.id;
|
||||||
var visible = [];
|
var visible = [];
|
||||||
|
|
||||||
for(var field_name in this.options.customfields)
|
for(var field_name in this.options.customfields)
|
||||||
{
|
{
|
||||||
if(this.options.fields.length == 0 || this.options.fields[field_name] == true)
|
if(jQuery.isEmptyObject(this.options.fields) || this.options.fields[field_name] == true)
|
||||||
{
|
{
|
||||||
visible.push(et2_customfields_list.prototype.prefix + field_name);
|
visible.push(et2_customfields_list.prototype.prefix + field_name);
|
||||||
jQuery(this.rows[field_name]).show();
|
jQuery(this.rows[field_name]).show();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user