From e594a230317fe0206a2e427acff5a9da10d06297 Mon Sep 17 00:00:00 2001 From: labkey-jeckels Date: Mon, 3 Mar 2025 17:28:45 -0800 Subject: [PATCH] Complete migration from srcURL and returnURL to returnUrl --- LDK/resources/web/LDK/Utils.js | 6 +++--- LDK/resources/web/LDK/panel/NavPanel.js | 4 ++-- .../resources/web/laboratory/panel/AssayImportPanel.js | 4 ++-- .../src/org/labkey/laboratory/LaboratoryController.java | 2 +- laboratory/src/org/labkey/laboratory/assay/AssayHelper.java | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/LDK/resources/web/LDK/Utils.js b/LDK/resources/web/LDK/Utils.js index c3d20814..e9bea4a2 100644 --- a/LDK/resources/web/LDK/Utils.js +++ b/LDK/resources/web/LDK/Utils.js @@ -365,16 +365,16 @@ LDK.Utils = new function(){ }, /** - * Returns the current URL, encoded, minus the origin, which is suitable to use as a srcURL param. + * Returns the current URL, encoded, minus the origin, which is suitable to use as a returnUrl param. */ - getSrcURL: function(){ + getReturnUrl: function(){ var re = new RegExp('^' + window.location.origin); return encodeURIComponent(window.location.href.replace(re, '')); }, /** * Create immutable object. Usage: - * var sealedObj = new LABKEU.Utils.sealed(obj); + * var sealedObj = new LABKEY.Utils.sealed(obj); * * @param obj The object to seal * @returns The sealed object diff --git a/LDK/resources/web/LDK/panel/NavPanel.js b/LDK/resources/web/LDK/panel/NavPanel.js index b8690a80..0d83c50c 100644 --- a/LDK/resources/web/LDK/panel/NavPanel.js +++ b/LDK/resources/web/LDK/panel/NavPanel.js @@ -250,7 +250,7 @@ Ext4.define('LDK.panel.NavPanel', { if (!item.assayRunTemplateUrl || LABKEY.Utils.isEmptyObj(item.assayRunTemplateUrl)){ cfg.items.push(this.getImportItemCfg(item, { urlConfig: { - params: Ext4.apply({srcURL: LABKEY.ActionURL.buildURL('project', 'begin')}, item.importUrl.params), + params: Ext4.apply({returnUrl: LABKEY.ActionURL.buildURL('project', 'begin')}, item.importUrl.params), action: item.importUrl.action, controller: item.importUrl.controller }, @@ -336,7 +336,7 @@ Ext4.define('LDK.panel.NavPanel', { urlConfig: { action: 'importData', controller: 'query', - params: {schemaName: item.schemaName, queryName: item.queryName, srcURL: LABKEY.ActionURL.buildURL('project', 'begin')} + params: {schemaName: item.schemaName, queryName: item.queryName, returnUrl: LABKEY.ActionURL.buildURL('project', 'begin')} } }) ] diff --git a/laboratory/resources/web/laboratory/panel/AssayImportPanel.js b/laboratory/resources/web/laboratory/panel/AssayImportPanel.js index 47d79254..34a61bb2 100644 --- a/laboratory/resources/web/laboratory/panel/AssayImportPanel.js +++ b/laboratory/resources/web/laboratory/panel/AssayImportPanel.js @@ -69,7 +69,7 @@ Ext4.define('Laboratory.panel.AssayImportPanel', { text: 'Cancel', itemId: 'cancelBtn', scope: this, - href: LABKEY.ActionURL.getParameter('srcURL') || LABKEY.ActionURL.buildURL('project', 'begin'), + href: LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.buildURL('project', 'begin'), hrefTarget: '_self' }] }], @@ -404,7 +404,7 @@ Ext4.define('Laboratory.panel.AssayImportPanel', { Ext4.Msg.hide(); Ext4.Msg.alert('Success', 'Your upload was successful!', function(){ function doLoad(){ - //NOTE: always return to the project root, ignoring srcURL + //NOTE: always return to the project root, ignoring returnUrl window.location = LABKEY.ActionURL.buildURL('project', 'begin'); } diff --git a/laboratory/src/org/labkey/laboratory/LaboratoryController.java b/laboratory/src/org/labkey/laboratory/LaboratoryController.java index 0f85b4fe..70aebca8 100644 --- a/laboratory/src/org/labkey/laboratory/LaboratoryController.java +++ b/laboratory/src/org/labkey/laboratory/LaboratoryController.java @@ -271,7 +271,7 @@ public boolean handlePost(EnsureAssayFieldsForm form, BindException errors) thro url.addParameter("renameConflicts", true); url.addParameter("providerName", form.getProviderName()); if (form.getReturnActionURL() != null) - url.addReturnURL(form.getReturnActionURL()); + url.addReturnUrl(form.getReturnActionURL()); form.setReturnUrl(url.getLocalURIString()); } diff --git a/laboratory/src/org/labkey/laboratory/assay/AssayHelper.java b/laboratory/src/org/labkey/laboratory/assay/AssayHelper.java index 528fe33a..cd5b8f38 100644 --- a/laboratory/src/org/labkey/laboratory/assay/AssayHelper.java +++ b/laboratory/src/org/labkey/laboratory/assay/AssayHelper.java @@ -395,7 +395,7 @@ public static List ensureAssayFields(User user, String providerName, boo url.addParameter("providerName", ap.getName()); ActionURL returnUrl = new ActionURL("laboratory", "synchronizeAssayFields.view", ContainerManager.getSharedContainer()); - url.addReturnURL(returnUrl); + url.addReturnUrl(returnUrl); msg += "This will not be changed automatically. If do you want to correct this, CLICK HERE."; } else