Skip to content
Snippets Groups Projects
Commit 8563e483 authored by Mark M. Florida's avatar Mark M. Florida
Browse files

Fixed function name.
parent c1dfa24a
No related branches found
No related tags found
No related merge requests found
...@@ -7,9 +7,8 @@ var XNAT = getObject(XNAT||{}); ...@@ -7,9 +7,8 @@ var XNAT = getObject(XNAT||{});
(function(XNAT){ (function(XNAT){
var popup, var popup,
window = this, window = this;
xurl = getObject(XNAT.url||{});
// base popup function // base popup function
function popupCentered( /* url, title, w, h, y, params */ ) { function popupCentered( /* url, title, w, h, y, params */ ) {
...@@ -91,8 +90,8 @@ var XNAT = getObject(XNAT||{}); ...@@ -91,8 +90,8 @@ var XNAT = getObject(XNAT||{});
// is the current window or 'loc' an XNAT popup? // is the current window or 'loc' an XNAT popup?
function isPopup(loc){ function isPopup(loc){
loc = xurl.splitUrl(loc || window.location.href); loc = XNAT.url.splitUrl(loc || window.location.href);
return (loc.base.indexOf('popup/true') > -1 || xurl.getParam('popup') === 'true') return (loc.base.indexOf('popup/true') > -1 || XNAT.url.getQueryStringValue('popup') === 'true')
} }
// save popup status for global usage // save popup status for global usage
window.isPopup = isPopup(); window.isPopup = isPopup();
...@@ -101,10 +100,10 @@ var XNAT = getObject(XNAT||{}); ...@@ -101,10 +100,10 @@ var XNAT = getObject(XNAT||{});
// process a url to add the 'popup' parts // process a url to add the 'popup' parts
function setupUrl(fullUrl){ function setupUrl(fullUrl){
var urlParts = xurl.splitUrl(fullUrl), var urlParts = XNAT.url.splitUrl(fullUrl),
newUrl = xurl.updateBase(fullUrl, urlParts.base.replace(/(\/popup\/(false|true))|(\/+$)/g,'') + '/popup/true'); newUrl = XNAT.url.updateBase(fullUrl, urlParts.base.replace(/(\/popup\/(false|true))|(\/+$)/g,'') + '/popup/true');
return xurl.addQueryString(newUrl, '?popup=true') return XNAT.url.addQueryString(newUrl, '?popup=true')
} }
popup.setupUrl = setupUrl; popup.setupUrl = setupUrl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment