From 82e6fcea0d5c1844b8fccba79df6aa141e54505a Mon Sep 17 00:00:00 2001 From: Gcolon021 <34667267+Gcolon021@users.noreply.github.com> Date: Wed, 20 Dec 2023 16:03:24 -0500 Subject: [PATCH] Render template earlier in landing.js (#265) The order of operations has been altered in the landing.js file of the BioDataCatalyst UI. The current changes involve rendering the template right after the function is invoked rather than waiting until the end. This reordering will allow the loading icons to display until all ajax request are complete. --- .../src/main/webapp/picsureui/landing/landing.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/biodatacatalyst-ui/src/main/webapp/picsureui/landing/landing.js b/biodatacatalyst-ui/src/main/webapp/picsureui/landing/landing.js index 0d8c26c2..ac2b6efa 100644 --- a/biodatacatalyst-ui/src/main/webapp/picsureui/landing/landing.js +++ b/biodatacatalyst-ui/src/main/webapp/picsureui/landing/landing.js @@ -34,6 +34,8 @@ define(["underscore", "jquery", "backbone", "handlebars", "text!landing/landing. window.location.href = "/picsureui/queryBuilder"; }, render: function () { + this.$el.html(this.template()); + // get counts for studies and participants let records = studyUtility.groupRecordsByAccess(); @@ -97,7 +99,6 @@ define(["underscore", "jquery", "backbone", "handlebars", "text!landing/landing. spinner.medium(deferredParticipants, "#authorized-participants-spinner", "spinner2"); spinner.medium(deferredParticipants, "#authorized-studies-spinner", "spinner2"); - this.$el.html(this.template()); return this; } });