Commit f43279c2 authored by Alexey.Golubev's avatar Alexey.Golubev

Support absolute url for spellchecker

parent 59a89882
...@@ -241,8 +241,15 @@ ...@@ -241,8 +241,15 @@
SpellCheckApi.prototype.init = function(docid) { SpellCheckApi.prototype.init = function(docid) {
this._docid = docid; this._docid = docid;
var re = /^https?:\/\//;
var spellcheckUrl = this._url + '/doc/' + docid + '/c'
if(re.test(this._url))
this.sockjs_url = spellcheckUrl;
else
this.sockjs_url = AscCommon.getBaseUrl() + "../../../.." + spellcheckUrl;
//Begin send auth //Begin send auth
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