From 5c0310750032b58713e55c199e6673ceadedd5c7 Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 2 Nov 2018 14:54:13 -0600 Subject: [PATCH] Fix Select All sometimes misses rows if there's between 50 and 1000 --- api/js/etemplate/et2_dataview_controller_selection.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api/js/etemplate/et2_dataview_controller_selection.js b/api/js/etemplate/et2_dataview_controller_selection.js index bbae039ac3..0e10ac0cb4 100644 --- a/api/js/etemplate/et2_dataview_controller_selection.js +++ b/api/js/etemplate/et2_dataview_controller_selection.js @@ -246,7 +246,9 @@ var et2_dataview_selectionManager = (function(){ "use strict"; return Class.exte this._selectAll = true; // Run as a range if there's less then the max - if(Object.keys(this._registeredRows).length != this._total && this._total <= this.MAX_SELECTION) + if(egw.dataKnownUIDs(this._context._dataProvider.dataStorePrefix).length !== this._total && + this._total <= this.MAX_SELECTION + ) { this._selectRange(0, this._total); } @@ -556,7 +558,7 @@ var et2_dataview_selectionManager = (function(){ "use strict"; return Class.exte for (var i = s; i <= e; i++) { if (typeof this._indexMap[i] !== "undefined" && - this._indexMap[i].uid) + this._indexMap[i].uid && egw.dataGetUIDdata(this._indexMap[i].uid)) { // Add the range to the "queryRanges" if (naStart !== false) @@ -569,7 +571,7 @@ var et2_dataview_selectionManager = (function(){ "use strict"; return Class.exte // Select the element, unless flagged for exclusion // Check for no_actions flag via data var data = egw.dataGetUIDdata(this._indexMap[i].uid); - if(!data || data && data.data && !data.data.no_actions) + if(data && data.data && !data.data.no_actions) { this.setSelected(this._indexMap[i].uid, true); }