[open-ils-commits] [GIT] Evergreen ILS branch master updated. 30b7b0999d034148284a1d303d7588f013714eed

Evergreen Git git at git.evergreen-ils.org
Thu Aug 13 09:58:29 EDT 2020


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  30b7b0999d034148284a1d303d7588f013714eed (commit)
      from  925f04a564b2ebb4400c05bfc8a6d509e33e45cd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 30b7b0999d034148284a1d303d7588f013714eed
Author: Mike Risher <mrisher at catalyte.io>
Date:   Fri Jun 12 22:17:44 2020 +0000

    LP#1207744: fix display of duplicate results when viewing report folders
    
    When you repeatedly click the link to display a template, report, or
    output folder on the reports UI, the contents of that folder can
    display multiple times. This patch addresses this bug and prevents
    duplicate contents from displaying.
    
    Signed-off-by: Mike Risher <mrisher at catalyte.io>
    Signed-off-by: Terran McCanna <tmccanna at georgialibraries.org>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/web/reports/oils_rpt_folder_window.js b/Open-ILS/web/reports/oils_rpt_folder_window.js
index 488cba6222..b9719951dd 100644
--- a/Open-ILS/web/reports/oils_rpt_folder_window.js
+++ b/Open-ILS/web/reports/oils_rpt_folder_window.js
@@ -5,7 +5,7 @@ var NG_NEW_TEMPLATE_INTERFACE = '/eg/staff/reporter/template/new';
 var NG_CLONE_TEMPLATE_INTERFACE = '/eg/staff/reporter/template/clone';
 var OILS_TEMPLATE_INTERFACE = 'xul/template_builder.xul';
 var OILS_LEGACY_TEMPLATE_INTERFACE = 'oils_rpt_builder.xhtml';
-
+var currentlyLoading = false;
 
 /* generic folder window class */
 oilsRptSetSubClass('oilsRptFolderWindow', 'oilsRptObject');
@@ -24,6 +24,8 @@ oilsRptFolderWindow.folderIdMap = {};
 
 // Here lie the contents of a specific folder
 oilsRptFolderWindow.prototype.draw = function(viaPaging) {
+	if (currentlyLoading) return; // avoids loading same data repeatedly
+	currentlyLoading=true;
 
 	_debug('drawing folder window for ' + this.folderNode.folder.name() );
 
@@ -535,7 +537,6 @@ oilsRptFolderWindow.prototype.createSearchRequest = function() {
 }
 
 oilsRptFolderWindow.prototype.fetchFolderData = function(callback) {
-
 	hideMe(DOM.oils_rpt_content_count_row_2);
 	hideMe(DOM.oils_rpt_content_row_2);
 
@@ -605,6 +606,7 @@ oilsRptFolderWindow.prototype.fetchFolderData = function(callback) {
 					}
 				);
 			}
+			currentlyLoading=false;
 		}
 	);
 	req.send();

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/reports/oils_rpt_folder_window.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list