mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-07-01 07:01:12 +02:00
Use global visibility settings, handle skipped columns in the middle
This commit is contained in:
@ -630,6 +630,11 @@ var et2_nextmatch = et2_DOMWidget.extend(et2_IResizeable, {
|
|||||||
var column = 0;
|
var column = 0;
|
||||||
for(var i = 0; i < value.length; i++)
|
for(var i = 0; i < value.length; i++)
|
||||||
{
|
{
|
||||||
|
// Handle skipped columns
|
||||||
|
while(value[i] != "col_"+column && column < columnMgr.columns.length)
|
||||||
|
{
|
||||||
|
column++;
|
||||||
|
}
|
||||||
if(visibility[value[i]])
|
if(visibility[value[i]])
|
||||||
{
|
{
|
||||||
visibility[value[i]].visible = true;
|
visibility[value[i]].visible = true;
|
||||||
@ -644,7 +649,6 @@ var et2_nextmatch = et2_DOMWidget.extend(et2_IResizeable, {
|
|||||||
{
|
{
|
||||||
visible[field_name] = false;
|
visible[field_name] = false;
|
||||||
}
|
}
|
||||||
i++;
|
|
||||||
// Turn on selected custom fields - start from 0 in case they're not in order
|
// Turn on selected custom fields - start from 0 in case they're not in order
|
||||||
for(var j = 0; j < value.length; j++)
|
for(var j = 0; j < value.length; j++)
|
||||||
{
|
{
|
||||||
@ -654,7 +658,6 @@ var et2_nextmatch = et2_DOMWidget.extend(et2_IResizeable, {
|
|||||||
}
|
}
|
||||||
self.columns[column].widget.set_visible(visible);
|
self.columns[column].widget.set_visible(visible);
|
||||||
}
|
}
|
||||||
column++;
|
|
||||||
}
|
}
|
||||||
columnMgr.setColumnVisibilitySet(visibility);
|
columnMgr.setColumnVisibilitySet(visibility);
|
||||||
self.selectPopup.toggle();
|
self.selectPopup.toggle();
|
||||||
@ -1164,6 +1167,11 @@ var et2_nextmatch_customfields = et2_customfields_list.extend(et2_INextmatchHead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!nm_column) return;
|
if(!nm_column) return;
|
||||||
|
|
||||||
|
// Check for global setting changes (visibility)
|
||||||
|
var global_data = this.getArrayMgr("modifications").getRoot().getEntry('~custom_fields~');
|
||||||
|
if(global_data.fields) this.options.fields = global_data.fields;
|
||||||
|
|
||||||
var apps = egw.link_app_list();
|
var apps = egw.link_app_list();
|
||||||
for(var field_name in this.options.customfields)
|
for(var field_name in this.options.customfields)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user