[Erp5-report] r18958 - /erp5admin/trunk/content/erp5admin/erp5admin.js
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jan 31 22:56:00 CET 2008
Author: bartek
Date: Thu Jan 31 22:55:59 2008
New Revision: 18958
URL: http://svn.erp5.org?rev=18958&view=rev
Log:
fixed tool url construction - now it should work also on sites which skip rewrite '/erp5' out of the url
Modified:
erp5admin/trunk/content/erp5admin/erp5admin.js
Modified: erp5admin/trunk/content/erp5admin/erp5admin.js
URL: http://svn.erp5.org/erp5admin/trunk/content/erp5admin/erp5admin.js?rev=18958&r1=18957&r2=18958&view=diff
==============================================================================
--- erp5admin/trunk/content/erp5admin/erp5admin.js (original)
+++ erp5admin/trunk/content/erp5admin/erp5admin.js Thu Jan 31 22:55:59 2008
@@ -136,14 +136,6 @@
}
-function erp5admin_getSitePath(){
- loc = erp5admin_getLocation();
- path=loc.pathname;
- p = path.split('/');
- sitepath = p[1];
- return sitepath;
-}
-
function erp5admin_goto(tool,tab,newtab,gotonewtab){
/* go to a specified tool (relative to the site url)
* tool - says where to
@@ -154,14 +146,7 @@
*/
if(tab==undefined) tab='manage_main';
if(newtab==undefined) newtab=true;
- if(gotonewtab==undefined) gotonewtab=true;
- sitepath = erp5admin_getSitePath();
- loc = erp5admin_getLocation();
- path = loc.pathname
- p=path.split('/');
- sitepath=p[1];
- newpath = p[1] + '/' + tool + '/'+tab;
- newurl = loc.href.replace(path,'/'+newpath);
+ newurl = erp5admin_getSiteURL() + '/' + tool + '/'+tab;
erp5admin_openUrlInTab(newurl, newtab);
return;
}
More information about the Erp5-report
mailing list