From 7db4672b357ac786ff591ca3c000546e91863d0c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 22 Aug 2014 12:31:15 +0000 Subject: [PATCH] Refine cache check conditions, rows is always empty by this point. r48042: Make sure options are there before looking inside, avoids a potential error in filter options r48106: - Adjust default columns to exclude resolution, completion, timesheets, votes and bounties. They can still be turned on manually, just hidden by default. - Set some more default column widths --- etemplate/js/et2_extension_nextmatch.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index 6fa6235d49..42993b3e42 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -686,6 +686,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], if(this.options.settings.selectcols) { columnPreference = this.options.settings.selectcols; + negated = false; } if(!this.options.settings.columnselection_pref) { @@ -1531,7 +1532,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], // If no data was sent from the server, and num_rows is 0, the nm will be empty. // This triggers a cache check. - if(!(this.options.settings.rows && this.options.settings.num_rows)) + if(!this.options.settings.num_rows) { this.controller.update(); } @@ -2099,7 +2100,7 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader, } // Legacy: Add in 'All' option for cat_id, if not provided. - if(name == 'cat_id' && typeof options[''] == 'undefined' && typeof options[0] == 'undefined') + if(name == 'cat_id' && options != null && typeof options[''] == 'undefined' && typeof options[0] == 'undefined') { widget_options.empty_label = this.egw().lang('All'); this.egw().debug('warn', 'Nextmatch category filter had no "All" option. Added, but you should fix that.');