diff --git a/Products/zms/plugins/www/ZMS/zmi_body_content_search.js b/Products/zms/plugins/www/ZMS/zmi_body_content_search.js index b7b20787a..014ea40b7 100644 --- a/Products/zms/plugins/www/ZMS/zmi_body_content_search.js +++ b/Products/zms/plugins/www/ZMS/zmi_body_content_search.js @@ -126,21 +126,13 @@ function zmiBodyContentSearch(q,pageSize,pageIndex) { fq.push('home_id_s:'+zmiParams['home_id']); } p['fq'] = fq; - var baseurl = $('meta[name=physical_path]').attr('content'); - if (typeof baseurl == "undefined") { - try { - baseurl = zmiParams['base_url']; - } catch(e) { - console.log(e); - baseurl = window.location['pathname']; - } - } - if (baseurl.indexOf("/content")>0) { - baseurl = baseurl.substring(0,baseurl.indexOf("/content")+"/content".length); + var base_url = self.location.origin + self.location.pathname; + if (base_url.indexOf("/content")>0) { + base_url = base_url.substring(0,base_url.indexOf("/content")+"/content".length); } var adapter = $ZMI.getConfProperty('zms.search.adapter.id','zcatalog_adapter'); var connector = $ZMI.getConfProperty('zms.search.connector.id','zcatalog_connector'); - var url = baseurl+'/'+adapter+'/'+connector+'/search_json'; + var url = base_url+'/'+adapter+'/'+connector+'/search_json'; $.ajax({ url:url, data:p, diff --git a/Products/zms/plugins/www/bootstrap/plugin/bootstrap.plugin.zmi.js b/Products/zms/plugins/www/bootstrap/plugin/bootstrap.plugin.zmi.js index d2db962c8..ffc436b4f 100644 --- a/Products/zms/plugins/www/bootstrap/plugin/bootstrap.plugin.zmi.js +++ b/Products/zms/plugins/www/bootstrap/plugin/bootstrap.plugin.zmi.js @@ -1468,6 +1468,7 @@ ZMIActionList.prototype.over = function(el, e, cb) { action += context_id+"/manage_main"; } action += "?lang=" + lang; + // TODO: navigate to href with htmx self.location.href = action; } else { @@ -1477,7 +1478,7 @@ ZMIActionList.prototype.over = function(el, e, cb) { return false; }); // Build action and params. - var action = zmiParams['base_url']; + var action = self.location.origin + self.location.pathname; action = action.substring(0,action.lastIndexOf("/")); action += "/manage_ajaxZMIActions"; var params = {}; diff --git a/Products/zms/plugins/www/zmi.core.js b/Products/zms/plugins/www/zmi.core.js index c865ea56e..ce7320723 100644 --- a/Products/zms/plugins/www/zmi.core.js +++ b/Products/zms/plugins/www/zmi.core.js @@ -82,7 +82,6 @@ $ZMI.registerReady(function(){ } } } - zmiParams['base_url'] = base_url; // Content-Editable //////////////////////////////////////////////////////// if ( self.location.href.indexOf('/manage')>0 || self.location.href.indexOf('preview=preview')>0 ) { diff --git a/Products/zms/zpt/ZMS/manage_users.zpt b/Products/zms/zpt/ZMS/manage_users.zpt index 4a099c04e..c8b45e709 100644 --- a/Products/zms/zpt/ZMS/manage_users.zpt +++ b/Products/zms/zpt/ZMS/manage_users.zpt @@ -109,7 +109,7 @@ function zmiModalInsertUserLoad(url) { $(this).parents(".ZMSRecordSet.main_grid").css({overflow:"visible"}); }); $("#zmiModalinsertUser #insertUserForm input:radio").change(function() { - self.location.href = zmiParams['base_url'] + self.location.href = self.location.origin + self.location.pathname +'?lang='+getZMILang() +'&id='+$(this).prop("value"); });