mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- Made the client side context path dynamically driven
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4570 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
// Gavin Cornwell 14-07-2006
|
||||
//
|
||||
|
||||
var _alfContextPath = null;
|
||||
|
||||
/**
|
||||
* Default handler for errors when using the dojo toolkit
|
||||
*/
|
||||
@@ -35,6 +37,19 @@ function handleErrorYahoo(msg)
|
||||
*/
|
||||
function getContextPath()
|
||||
{
|
||||
var w = window.location;
|
||||
alert(w.pathname);
|
||||
}
|
||||
if (_alfContextPath == null)
|
||||
{
|
||||
var path = window.location.pathname;
|
||||
var idx = path.indexOf("/", 1);
|
||||
if (idx != -1)
|
||||
{
|
||||
_alfContextPath = path.substring(0, idx);
|
||||
}
|
||||
else
|
||||
{
|
||||
_alfContextPath = "";
|
||||
}
|
||||
}
|
||||
|
||||
return _alfContextPath;
|
||||
}
|
||||
|
Reference in New Issue
Block a user