diff --git a/mail/js/app.js b/mail/js/app.js index 8c9a3eb3b1..96e16f0c3c 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -297,17 +297,17 @@ app.classes.mail = AppJS.extend( { // Only cache first chunk of rows, if no search filter if((!query_context || !query_context.start) && query_context.count == 0 && - query_context.self._filters.selectedFolder && - !(!query_context.self._filters || query_context.self._filters.search) + query_context.filters && query_context.filters.selectedFolder && + !(!query_context.filters || query_context.filters.search) ) { // Make sure keys match, even if some filters are not defined // using JSON.stringfy() directly gave a crash in Safari 7.0.4 return this.egw.jsonEncode({ - selectedFolder: query_context.self._filters.selectedFolder || '', - filter: query_context.self._filters.filter || '', - filter2: query_context.self._filters.filter2 || '', - sort: query_context.self._filters.sort + selectedFolder: query_context.filters.selectedFolder || '', + filter: query_context.filters.filter || '', + filter2: query_context.filters.filter2 || '', + sort: query_context.filters.sort }); } return false; @@ -3083,7 +3083,7 @@ app.classes.mail = AppJS.extend( this.compose_resizeHandler(); return true; }, - + /** * Upload for import (VFS) * diff --git a/phpgwapi/js/jsapi/egw_data.js b/phpgwapi/js/jsapi/egw_data.js index 9470e25bf9..d477ad1b20 100644 --- a/phpgwapi/js/jsapi/egw_data.js +++ b/phpgwapi/js/jsapi/egw_data.js @@ -419,6 +419,9 @@ egw.extend("data", egw.MODULE_APP_LOCAL, function (_app, _wnd) { } } } + // create a clone of filters, which can be used in parseServerResponse and cache callbacks + // independent of changes happening while waiting for the response + _context.filters = jQuery.extend({}, _filters); var request = egw.json( _app+".etemplate_widget_nextmatch.ajax_get_rows.etemplate", [