mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
- Fix some missing column labels in column selection
- Fix column sorting didn't work
This commit is contained in:
parent
40bbc53af8
commit
dce4ac78fc
@ -1261,7 +1261,7 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
|
||||
|
||||
_widget.iterateOver(function(_widget)
|
||||
{
|
||||
const label = self.egw().lang(_widget.label || _widget.empty_label || _widget.options.label || _widget.options.empty_label || '');
|
||||
const label = self.egw().lang(_widget.label || _widget.emptyLabel || _widget.options.label || _widget.options.empty_label || '');
|
||||
if(!label) return; // skip empty, undefined or null labels
|
||||
if(!result)
|
||||
{
|
||||
@ -1997,10 +1997,11 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
|
||||
}
|
||||
self._set_lettersearch(show_letters);
|
||||
}
|
||||
let column = 0;
|
||||
self.sortedColumnsList = [];
|
||||
for(var i = 0; i < value.length; i++)
|
||||
{
|
||||
// Handle skipped columns
|
||||
let column = 0;
|
||||
while(value[i] != "col_" + column && column < columnMgr.columns.length)
|
||||
{
|
||||
column++;
|
||||
@ -2009,29 +2010,38 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
|
||||
{
|
||||
visibility[value[i]].visible = true;
|
||||
}
|
||||
let col_name = self._getColumnName(self.columns[column].widget);
|
||||
|
||||
// Custom fields are listed seperately in column list, but are only 1 column
|
||||
if(self.columns[column] && self.columns[column].widget.instanceOf(et2_nextmatch_customfields))
|
||||
{
|
||||
const cf = self.columns[column].widget.options.customfields;
|
||||
const visible = self.columns[column].widget.options.fields;
|
||||
self.sortedColumnsList.push(self.columns[column].widget.id);
|
||||
|
||||
// Turn off all custom fields
|
||||
for(var field_name in cf)
|
||||
{
|
||||
visible[field_name] = false;
|
||||
}
|
||||
// Turn on selected custom fields - start from 0 in case they're not in order
|
||||
for(let j = 0; j < value.length; j++)
|
||||
// Turn on selected custom fields
|
||||
for(let j = i; j < value.length; j++)
|
||||
{
|
||||
if(value[j].indexOf(et2_customfields_list.PREFIX) != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
self.sortedColumnsList.push(value[j]);
|
||||
|
||||
visible[value[j].substring(1)] = true;
|
||||
i++;
|
||||
}
|
||||
(<et2_customfields_list><unknown>self.columns[column].widget).set_visible(visible);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.sortedColumnsList.push(col_name);
|
||||
}
|
||||
}
|
||||
columnMgr.setColumnVisibilitySet(visibility);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user