forked from extern/egroupware
Put selected columns into nextmatch value so columns are saved in favourites
This commit is contained in:
parent
20af564f37
commit
534c188d25
@ -1101,7 +1101,7 @@ var et2_nextmatch = /** @class */ (function (_super) {
|
||||
jQuery.merge(colDisplay, custom_fields);
|
||||
// Update query value, so data source can use visible columns to exclude expensive sub-queries
|
||||
var oldCols = this.activeFilters.selectcols ? this.activeFilters.selectcols : [];
|
||||
this.activeFilters.selectcols = this.sortedColumnsList ? this.sortedColumnsList : colDisplay;
|
||||
this.activeFilters.selectcols = this.sortedColumnsList.length > 0 ? this.sortedColumnsList : colDisplay;
|
||||
// We don't need to re-query if they've removed a column
|
||||
var changed = [];
|
||||
ColLoop: for (var i = 0; i < colDisplay.length; i++) {
|
||||
@ -2017,6 +2017,10 @@ var et2_nextmatch = /** @class */ (function (_super) {
|
||||
col_filter: {}
|
||||
};
|
||||
jQuery.extend(value, this.activeFilters, this.value);
|
||||
if (typeof value.selectcols == "undefined" || value.selectcols.length === 0) {
|
||||
this._updateUserPreferences();
|
||||
value.selectcols = this.activeFilters.selectcols;
|
||||
}
|
||||
return value;
|
||||
};
|
||||
et2_nextmatch.prototype.resetDirty = function () { };
|
||||
|
@ -1530,7 +1530,7 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
|
||||
// Update query value, so data source can use visible columns to exclude expensive sub-queries
|
||||
const oldCols = this.activeFilters.selectcols ? this.activeFilters.selectcols : [];
|
||||
|
||||
this.activeFilters.selectcols = this.sortedColumnsList ? this.sortedColumnsList : colDisplay;
|
||||
this.activeFilters.selectcols = this.sortedColumnsList.length > 0 ? this.sortedColumnsList : colDisplay;
|
||||
|
||||
// We don't need to re-query if they've removed a column
|
||||
const changed = [];
|
||||
@ -2721,6 +2721,12 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
|
||||
col_filter: {}
|
||||
};
|
||||
jQuery.extend(value, this.activeFilters, this.value);
|
||||
|
||||
if(typeof value.selectcols == "undefined" || value.selectcols.length === 0)
|
||||
{
|
||||
this._updateUserPreferences();
|
||||
value.selectcols = this.activeFilters.selectcols;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
resetDirty( )
|
||||
|
Loading…
Reference in New Issue
Block a user