Skip to content

Commit 814c34e

Browse files
Complete migration from srcURL and returnURL to returnUrl (#228)
1 parent 20e9f36 commit 814c34e

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

LDK/resources/web/LDK/Utils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,16 +365,16 @@ LDK.Utils = new function(){
365365
},
366366

367367
/**
368-
* Returns the current URL, encoded, minus the origin, which is suitable to use as a srcURL param.
368+
* Returns the current URL, encoded, minus the origin, which is suitable to use as a returnUrl param.
369369
*/
370-
getSrcURL: function(){
370+
getReturnUrl: function(){
371371
var re = new RegExp('^' + window.location.origin);
372372
return encodeURIComponent(window.location.href.replace(re, ''));
373373
},
374374

375375
/**
376376
* Create immutable object. Usage:
377-
* var sealedObj = new LABKEU.Utils.sealed(obj);
377+
* var sealedObj = new LABKEY.Utils.sealed(obj);
378378
*
379379
* @param obj The object to seal
380380
* @returns The sealed object

LDK/resources/web/LDK/panel/NavPanel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Ext4.define('LDK.panel.NavPanel', {
250250
if (!item.assayRunTemplateUrl || LABKEY.Utils.isEmptyObj(item.assayRunTemplateUrl)){
251251
cfg.items.push(this.getImportItemCfg(item, {
252252
urlConfig: {
253-
params: Ext4.apply({srcURL: LABKEY.ActionURL.buildURL('project', 'begin')}, item.importUrl.params),
253+
params: Ext4.apply({returnUrl: LABKEY.ActionURL.buildURL('project', 'begin')}, item.importUrl.params),
254254
action: item.importUrl.action,
255255
controller: item.importUrl.controller
256256
},
@@ -336,7 +336,7 @@ Ext4.define('LDK.panel.NavPanel', {
336336
urlConfig: {
337337
action: 'importData',
338338
controller: 'query',
339-
params: {schemaName: item.schemaName, queryName: item.queryName, srcURL: LABKEY.ActionURL.buildURL('project', 'begin')}
339+
params: {schemaName: item.schemaName, queryName: item.queryName, returnUrl: LABKEY.ActionURL.buildURL('project', 'begin')}
340340
}
341341
})
342342
]

laboratory/resources/web/laboratory/panel/AssayImportPanel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Ext4.define('Laboratory.panel.AssayImportPanel', {
6969
text: 'Cancel',
7070
itemId: 'cancelBtn',
7171
scope: this,
72-
href: LABKEY.ActionURL.getParameter('srcURL') || LABKEY.ActionURL.buildURL('project', 'begin'),
72+
href: LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.buildURL('project', 'begin'),
7373
hrefTarget: '_self'
7474
}]
7575
}],
@@ -404,7 +404,7 @@ Ext4.define('Laboratory.panel.AssayImportPanel', {
404404
Ext4.Msg.hide();
405405
Ext4.Msg.alert('Success', 'Your upload was successful!', function(){
406406
function doLoad(){
407-
//NOTE: always return to the project root, ignoring srcURL
407+
//NOTE: always return to the project root, ignoring returnUrl
408408
window.location = LABKEY.ActionURL.buildURL('project', 'begin');
409409
}
410410

laboratory/src/org/labkey/laboratory/LaboratoryController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ public boolean handlePost(EnsureAssayFieldsForm form, BindException errors) thro
271271
url.addParameter("renameConflicts", true);
272272
url.addParameter("providerName", form.getProviderName());
273273
if (form.getReturnActionURL() != null)
274-
url.addReturnURL(form.getReturnActionURL());
274+
url.addReturnUrl(form.getReturnActionURL());
275275
form.setReturnUrl(url.getLocalURIString());
276276
}
277277

laboratory/src/org/labkey/laboratory/assay/AssayHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ public static List<String> ensureAssayFields(User user, String providerName, boo
395395
url.addParameter("providerName", ap.getName());
396396

397397
ActionURL returnUrl = new ActionURL("laboratory", "synchronizeAssayFields.view", ContainerManager.getSharedContainer());
398-
url.addReturnURL(returnUrl);
398+
url.addReturnUrl(returnUrl);
399399
msg += "This will not be changed automatically. If do you want to correct this, <a href=\"" + url + "\">CLICK HERE</a>.";
400400
}
401401
else

0 commit comments

Comments
 (0)