Commit 6e3d3d2e authored by Alexey.Golubev's avatar Alexey.Golubev

Refactored getBaseUrl function

parent 57fa90b5
......@@ -1327,7 +1327,7 @@
DocsCoApi.prototype.setDocId = function(docid) {
//todo возможно надо менять sockjs_url
this._docid = docid;
this.sockjs_url = AscCommon.getBaseUrl() + '/doc/' + docid + '/c';
this.sockjs_url = AscCommon.getBaseUrl() + '../../../../doc/' + docid + '/c';
};
// Авторизация (ее нужно делать после выставления состояния редактора view-mode)
DocsCoApi.prototype.auth = function(isViewer, opt_openCmd) {
......
......@@ -125,7 +125,7 @@ var nMaxRequestLength = 5242880;//5mb <requestLimits maxAllowedContentLength="30
function getBaseUrl() {
var index_html = location.href;
return index_html.substring(0, index_html.lastIndexOf("/") + 1) + "../../../..";
return index_html.substring(0, index_html.lastIndexOf("/") + 1);
}
function getEncodingParams() {
......
......@@ -242,7 +242,7 @@
SpellCheckApi.prototype.init = function(docid) {
this._docid = docid;
//Begin send auth
this.sockjs_url = AscCommon.getBaseUrl() + this._url + '/doc/' + docid + '/c';
this.sockjs_url = AscCommon.getBaseUrl() + "../../../.." + this._url + '/doc/' + docid + '/c';
this.sockjs = initSocksJs(this.sockjs_url, this);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment