From 01453ab08238390095c1a0a5fb3016e88787e703 Mon Sep 17 00:00:00 2001 From: labkey-jeckels Date: Mon, 3 Mar 2025 17:28:55 -0800 Subject: [PATCH] Complete migration from srcURL and returnURL to returnUrl --- resources/views/configureQCMetric.html | 14 +++++++------- .../views/subscribeOutlierNotifications.html | 12 ++++++------ .../window/AddNewMetricWindow.js | 8 ++++---- .../window/AddNewTraceMetricWindow.js | 8 ++++---- .../View/QCSummaryMenuCustomizer.java | 4 +--- .../targetedms/TargetedMSController.java | 18 +++++++++--------- .../targetedms/TargetedMSFolderType.java | 2 +- .../query/QCFolderDisplayColumnFactory.java | 2 +- src/org/labkey/targetedms/view/renameRun.jsp | 4 ++-- 9 files changed, 35 insertions(+), 37 deletions(-) diff --git a/resources/views/configureQCMetric.html b/resources/views/configureQCMetric.html index 36460c897..00962936b 100644 --- a/resources/views/configureQCMetric.html +++ b/resources/views/configureQCMetric.html @@ -102,11 +102,11 @@ }); } - function getReturnURL() { - var returnURL = LABKEY.ActionURL.getParameter('returnUrl'); + function getReturnUrl() { + var returnUrl = LABKEY.ActionURL.getParameter('returnUrl'); - if(returnURL) { - return returnURL; + if(returnUrl) { + return returnUrl; } else { return LABKEY.ActionURL.buildURL('project', 'start'); @@ -162,7 +162,7 @@ }, resetQCMetrics: function(){ - window.location = getReturnURL(); + window.location = getReturnUrl(); }, showCustomMetricWindow: function (op, clickedMetric) { @@ -302,12 +302,12 @@ commands: commands, method: 'POST', success: function (data) { - window.location = getReturnURL(); + window.location = getReturnUrl(); }, failure: LABKEY.Utils.getCallbackWrapper(LABKEY.internal.ConfigureQCMetrics.onError, this, true) }); } else { - window.location = getReturnURL(); + window.location = getReturnUrl(); } }, diff --git a/resources/views/subscribeOutlierNotifications.html b/resources/views/subscribeOutlierNotifications.html index 6602a7228..3ae21d859 100644 --- a/resources/views/subscribeOutlierNotifications.html +++ b/resources/views/subscribeOutlierNotifications.html @@ -48,11 +48,11 @@ } } - function getReturnURL() { - var returnURL = LABKEY.ActionURL.getParameter('returnUrl'); + function getReturnUrl() { + var returnUrl = LABKEY.ActionURL.getParameter('returnUrl'); - if(returnURL) { - return returnURL; + if(returnUrl) { + return returnUrl; } else { return LABKEY.ActionURL.buildURL('project', 'start'); @@ -77,7 +77,7 @@ }, onCancel: function () { - window.location = getReturnURL(); + window.location = getReturnUrl(); }, onSave: function () { @@ -110,7 +110,7 @@ commands: commands, method: 'POST', success: function () { - window.location = getReturnURL(); + window.location = getReturnUrl(); }, failure: LABKEY.Utils.getCallbackWrapper(LABKEY.internal.SubscribeQCNotification.onError, this, true) }); diff --git a/resources/web/PanoramaPremium/window/AddNewMetricWindow.js b/resources/web/PanoramaPremium/window/AddNewMetricWindow.js index 93a7314b1..feeaaf17c 100644 --- a/resources/web/PanoramaPremium/window/AddNewMetricWindow.js +++ b/resources/web/PanoramaPremium/window/AddNewMetricWindow.js @@ -579,11 +579,11 @@ Ext4.define('Panorama.Window.AddCustomMetricWindow', { }, - getReturnURL: function () { - var returnURL = LABKEY.ActionURL.getParameter('returnUrl'); + getReturnUrl: function () { + var returnUrl = LABKEY.ActionURL.getParameter('returnUrl'); - if(returnURL) { - return returnURL; + if(returnUrl) { + return returnUrl; } else { return LABKEY.ActionURL.buildURL('project', 'start'); diff --git a/resources/web/PanoramaPremium/window/AddNewTraceMetricWindow.js b/resources/web/PanoramaPremium/window/AddNewTraceMetricWindow.js index 048cc3f4b..ef787c73c 100644 --- a/resources/web/PanoramaPremium/window/AddNewTraceMetricWindow.js +++ b/resources/web/PanoramaPremium/window/AddNewTraceMetricWindow.js @@ -450,11 +450,11 @@ Ext4.define('Panorama.Window.AddTraceMetricWindow', { }, this); }, - getReturnURL: function () { - var returnURL = LABKEY.ActionURL.getParameter('returnUrl'); + getReturnUrl: function () { + var returnUrl = LABKEY.ActionURL.getParameter('returnUrl'); - if (returnURL) { - return returnURL; + if (returnUrl) { + return returnUrl; } else { return LABKEY.ActionURL.buildURL('project', 'start'); diff --git a/src/org/labkey/panoramapremium/View/QCSummaryMenuCustomizer.java b/src/org/labkey/panoramapremium/View/QCSummaryMenuCustomizer.java index 31c889f82..7ce276a3a 100644 --- a/src/org/labkey/panoramapremium/View/QCSummaryMenuCustomizer.java +++ b/src/org/labkey/panoramapremium/View/QCSummaryMenuCustomizer.java @@ -6,8 +6,6 @@ import org.labkey.api.view.NavTree; import org.labkey.api.view.NavTreeCustomizer; import org.labkey.api.view.ViewContext; -import org.labkey.panoramapremium.PanoramaPremiumController; -import org.labkey.targetedms.TargetedMSController; import java.util.ArrayList; import java.util.Collections; @@ -31,7 +29,7 @@ public List getNavTrees(ViewContext viewContext) if(viewContext.getContainer().hasPermission(viewContext.getUser(), AdminPermission.class)) { List navTrees = new ArrayList<>(); - ActionURL url = new ActionURL("targetedms", actionName, viewContext.getContainer()).addReturnURL(viewContext.getActionURL()); + ActionURL url = new ActionURL("targetedms", actionName, viewContext.getContainer()).addReturnUrl(viewContext.getActionURL()); navTrees.add(new NavTree(menuLabel, url)); return navTrees; diff --git a/src/org/labkey/targetedms/TargetedMSController.java b/src/org/labkey/targetedms/TargetedMSController.java index 4a63606bb..d0d3fa3ee 100644 --- a/src/org/labkey/targetedms/TargetedMSController.java +++ b/src/org/labkey/targetedms/TargetedMSController.java @@ -7352,11 +7352,11 @@ public ActionURL getReturnActionURL() } } - public static ActionURL getRenameRunURL(Container c, TargetedMSRun run, ActionURL returnURL) + public static ActionURL getRenameRunURL(Container c, TargetedMSRun run, ActionURL returnUrl) { ActionURL url = new ActionURL(RenameRunAction.class, c); url.addParameter("run", run.getRunId() ); - url.addReturnURL(returnURL); + url.addReturnUrl(returnUrl); return url; } @@ -7379,7 +7379,7 @@ public void setDescription(String description) public class RenameRunAction extends FormViewAction { private TargetedMSRun _run; - private URLHelper _returnURL; + private URLHelper _returnUrl; @Override public void validateCommand(RenameForm target, Errors errors) @@ -7390,16 +7390,16 @@ public void validateCommand(RenameForm target, Errors errors) public ModelAndView getView(RenameForm form, boolean reshow, BindException errors) { _run = validateRun(form.getRun()); - _returnURL = form.getReturnURLHelper(getShowRunURL(getContainer(), form.getRun())); + _returnUrl = form.getReturnUrlHelper(getShowRunURL(getContainer(), form.getRun())); String description = form.getDescription(); - if (description == null || description.length() == 0) + if (description == null || description.isEmpty()) description = _run.getDescription(); RenameBean bean = new RenameBean(); bean.run = _run; bean.description = description; - bean.returnURL = _returnURL; + bean.returnUrl = _returnUrl; getPageConfig().setFocusId("description"); @@ -7419,13 +7419,13 @@ public boolean handlePost(RenameForm form, BindException errors) throws BatchVal @Override public URLHelper getSuccessURL(RenameForm form) { - return form.getReturnURLHelper(); + return form.getReturnUrlHelper(); } @Override public void addNavTrail(NavTree root) { - addRunNavTrail(root, _run, _returnURL, "Rename Run", getPageConfig(), null); + addRunNavTrail(root, _run, _returnUrl, "Rename Run", getPageConfig(), null); } } @@ -7434,7 +7434,7 @@ public static class RenameBean { public TargetedMSRun run; public String description; - public URLHelper returnURL; + public URLHelper returnUrl; } private void addRunNavTrail(NavTree root, TargetedMSRun run, URLHelper runURL, String title, PageConfig page, String helpTopic) diff --git a/src/org/labkey/targetedms/TargetedMSFolderType.java b/src/org/labkey/targetedms/TargetedMSFolderType.java index da582016b..9a4d4ffdb 100644 --- a/src/org/labkey/targetedms/TargetedMSFolderType.java +++ b/src/org/labkey/targetedms/TargetedMSFolderType.java @@ -89,7 +89,7 @@ public List getExtraSetupSteps(Container c) { ActionURL fileRootsUrl = new ActionURL("admin", "fileRootsStandAlone", c) .addParameter("folderSetup", true) - .addReturnURL(setupUrl); + .addReturnUrl(setupUrl); extraSteps.add(new NavTree("Change File Root", fileRootsUrl)); } extraSteps.add(new NavTree(TargetedMSController.CONFIGURE_TARGETED_MS_FOLDER, setupUrl)); diff --git a/src/org/labkey/targetedms/query/QCFolderDisplayColumnFactory.java b/src/org/labkey/targetedms/query/QCFolderDisplayColumnFactory.java index 4278cdac4..24c12793b 100644 --- a/src/org/labkey/targetedms/query/QCFolderDisplayColumnFactory.java +++ b/src/org/labkey/targetedms/query/QCFolderDisplayColumnFactory.java @@ -56,7 +56,7 @@ public void renderGridCellContents(RenderContext ctx, Writer out) throws IOExcep { url.addParameter("RunId", currentRunId.toString()); } - url.addReturnURL(ctx.getViewContext().getActionURL()); + url.addReturnUrl(ctx.getViewContext().getActionURL()); sb.append("