get_base_url fix
if url contains the 'desk' then the get_base_url function was removes the desk from url e.g. if url is www.helpdesk.com/desk then get_base_url() returns <b>http://help</b> instead of <b>http://www.helpdesk.com</b>
This commit is contained in:
parent
425c00ca53
commit
dfc787a0b9
1 changed files with 2 additions and 1 deletions
|
|
@ -180,7 +180,8 @@ frappe.urllib = {
|
|||
|
||||
// returns the base url with http + domain + path (-index.cgi or # or ?)
|
||||
get_base_url: function() {
|
||||
var url= (frappe.base_url || window.location.href).split('#')[0].split('?')[0].split('desk')[0];
|
||||
// var url= (frappe.base_url || window.location.href).split('#')[0].split('?')[0].split('desk')[0];
|
||||
var url = (frappe.base_url || window.location.origin)
|
||||
if(url.substr(url.length-1, 1)=='/') url = url.substr(0, url.length-1)
|
||||
return url
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue