Commit 57fa90b5 authored by Alexey.Golubev's avatar Alexey.Golubev

use relation address for ds

parent e31de797
...@@ -1327,7 +1327,7 @@ ...@@ -1327,7 +1327,7 @@
DocsCoApi.prototype.setDocId = function(docid) { DocsCoApi.prototype.setDocId = function(docid) {
//todo возможно надо менять sockjs_url //todo возможно надо менять sockjs_url
this._docid = docid; this._docid = docid;
this.sockjs_url = '/doc/' + docid + '/c'; this.sockjs_url = AscCommon.getBaseUrl() + '/doc/' + docid + '/c';
}; };
// Авторизация (ее нужно делать после выставления состояния редактора view-mode) // Авторизация (ее нужно делать после выставления состояния редактора view-mode)
DocsCoApi.prototype.auth = function(isViewer, opt_openCmd) { DocsCoApi.prototype.auth = function(isViewer, opt_openCmd) {
......
...@@ -118,11 +118,16 @@ String.prototype.strongMatch = function(regExp){ ...@@ -118,11 +118,16 @@ String.prototype.strongMatch = function(regExp){
if (typeof require =="function" && !window["XRegExp"]){window["XRegExp"] = require("xregexp");} if (typeof require =="function" && !window["XRegExp"]){window["XRegExp"] = require("xregexp");}
var oZipChanges = null; var oZipChanges = null;
var sDownloadServiceLocalUrl = "/downloadas"; var sDownloadServiceLocalUrl = "../../../../downloadas";
var sUploadServiceLocalUrl = "/upload"; var sUploadServiceLocalUrl = "../../../../upload";
var sUploadServiceLocalUrlOld = "/uploadold"; var sUploadServiceLocalUrlOld = "../../../../uploadold";
var nMaxRequestLength = 5242880;//5mb <requestLimits maxAllowedContentLength="30000000" /> default 30mb var nMaxRequestLength = 5242880;//5mb <requestLimits maxAllowedContentLength="30000000" /> default 30mb
function getBaseUrl() {
var index_html = location.href;
return index_html.substring(0, index_html.lastIndexOf("/") + 1) + "../../../..";
}
function getEncodingParams() { function getEncodingParams() {
var res = []; var res = [];
for(var i = 0; i < AscCommon.c_oAscEncodings.length; ++i) { for(var i = 0; i < AscCommon.c_oAscEncodings.length; ++i) {
...@@ -2787,6 +2792,7 @@ window["SetDoctRendererParams"] = function(_params) ...@@ -2787,6 +2792,7 @@ window["SetDoctRendererParams"] = function(_params)
//------------------------------------------------------------export--------------------------------------------------- //------------------------------------------------------------export---------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {}; window['AscCommon'] = window['AscCommon'] || {};
window["AscCommon"].getBaseUrl = getBaseUrl;
window["AscCommon"].getEncodingParams = getEncodingParams; window["AscCommon"].getEncodingParams = getEncodingParams;
window["AscCommon"].saveWithParts = saveWithParts; window["AscCommon"].saveWithParts = saveWithParts;
window["AscCommon"].loadFileContent = loadFileContent; window["AscCommon"].loadFileContent = loadFileContent;
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
SpellCheckApi.prototype.init = function(docid) { SpellCheckApi.prototype.init = function(docid) {
this._docid = docid; this._docid = docid;
//Begin send auth //Begin send auth
this.sockjs_url = this._url + '/doc/' + docid + '/c'; this.sockjs_url = AscCommon.getBaseUrl() + this._url + '/doc/' + docid + '/c';
this.sockjs = initSocksJs(this.sockjs_url, this); 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