mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 08:23:12 +01:00
Fix column selection not saved if columnselection pref setting had 'nextmatch-' prefix already.
Fixes infolog columns not being saved
This commit is contained in:
parent
3405d58c67
commit
ec476a96d7
@ -857,17 +857,27 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
|
|||||||
}
|
}
|
||||||
|
|
||||||
var list = et2_csvSplit(this.options.settings.columnselection_pref, 2, ".");
|
var list = et2_csvSplit(this.options.settings.columnselection_pref, 2, ".");
|
||||||
var app = list[0];
|
var pref = this.options.settings.columnselection_pref;
|
||||||
|
if(pref.indexOf('nextmatch') == 0)
|
||||||
|
{
|
||||||
|
app = list[0].substring('nextmatch'.length+1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
app = list[0];
|
||||||
|
// 'nextmatch-' prefix is there in preference name, but not in setting, so add it in
|
||||||
|
pref = "nextmatch-"+this.options.settings.columnselection_pref;
|
||||||
|
}
|
||||||
|
|
||||||
// Server side wants each cf listed as a seperate column
|
// Server side wants each cf listed as a seperate column
|
||||||
jQuery.merge(colDisplay, custom_fields);
|
jQuery.merge(colDisplay, custom_fields);
|
||||||
|
|
||||||
// Save visible columns
|
// Save visible columns
|
||||||
// 'nextmatch-' prefix is there in preference name, but not in setting, so add it in
|
// 'nextmatch-' prefix is there in preference name, but not in setting, so add it in
|
||||||
egw.set_preference(app, "nextmatch-"+this.options.settings.columnselection_pref, colDisplay.join(","));
|
egw.set_preference(app, pref, colDisplay.join(","));
|
||||||
|
|
||||||
// Save adjusted column sizes
|
// Save adjusted column sizes
|
||||||
egw.set_preference(app, "nextmatch-"+this.options.settings.columnselection_pref+"-size", colSize);
|
egw.set_preference(app, pref+"-size", colSize);
|
||||||
|
|
||||||
// Update query value, so data source can use visible columns to exclude expensive sub-queries
|
// Update query value, so data source can use visible columns to exclude expensive sub-queries
|
||||||
var oldCols = this.activeFilters.selectcols ? this.activeFilters.selectcols : [];
|
var oldCols = this.activeFilters.selectcols ? this.activeFilters.selectcols : [];
|
||||||
|
Loading…
Reference in New Issue
Block a user