Commit 578f64a5 authored by Alexey Golubev's avatar Alexey Golubev

Merge branch 'hotfix/staropramen'

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