Commit c1a08a35 authored by Alexander.Trofimov's avatar Alexander.Trofimov

change eof error

parent 7257509d
......@@ -1114,7 +1114,7 @@
if (this._isReSaveAfterAuth) {
var callbackAskSaveChanges = function(e) {
if (false == e["saveLock"]) {
if (false === e["saveLock"]) {
t._reSaveChanges();
} else {
setTimeout(function() {
......
......@@ -22,4 +22,100 @@
* Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"use strict"; /* docscoapicommon.js * * Author: Alexander.Trofimov * Date: 09.11.12 */(/** * @param {Window} window * @param {undefined} undefined */ function(window, undefined) { /* * Import * ----------------------------------------------------------------------------- */ var asc = window["Asc"] ? window["Asc"] : (window["Asc"] = {}); var prot; /** * Класс user для совместного редактирования/просмотра документа * ----------------------------------------------------------------------------- * * @constructor * @memberOf Asc */ function asc_CUser(val) { this.id = null; // уникальный id - пользователя this.idOriginal = null; // уникальный id - пользователя this.userName = null; // имя пользователя this.state = undefined; // состояние (true - подключен, false - отключился) this.indexUser = -1; // Индекс пользователя (фактически равно числу заходов в документ на сервере) this.color = null; // цвет пользователя this.view = false; // просмотр(true), редактор(false) this._setUser(val); return this; } asc_CUser.prototype._setUser = function(val) { if (val) { this.id = val['id']; this.idOriginal = val['idOriginal']; this.userName = val['username']; this.indexUser = val['indexUser']; this.color = getUserColorById(this.idOriginal, this.userName, false, true); this.view = val['view']; } }; asc_CUser.prototype.asc_getId = function() { return this.id; }; asc_CUser.prototype.asc_getUserName = function() { return this.userName; }; asc_CUser.prototype.asc_getState = function() { return this.state; }; asc_CUser.prototype.asc_getColor = function() { return '#' + ('000000' + this.color.toString(16)).substr(-6); }; asc_CUser.prototype.asc_getView = function() { return this.view; }; asc_CUser.prototype.setId = function(val) { this.id = val; }; asc_CUser.prototype.setUserName = function(val) { this.userName = val; }; asc_CUser.prototype.setState = function(val) { this.state = val; }; /* * Export * ----------------------------------------------------------------------------- */ window["Asc"].asc_CUser = asc_CUser; prot = asc_CUser.prototype; prot["asc_getId"] = prot.asc_getId; prot["asc_getUserName"] = prot.asc_getUserName; prot["asc_getState"] = prot.asc_getState; prot["asc_getColor"] = prot.asc_getColor; prot["asc_getView"] = prot.asc_getView; })(window); var ConnectionState = { Reconnect: -1, // reconnect state None: 0, // not initialized WaitAuth: 1, // waiting session id Authorized: 2, // authorized ClosedCoAuth: 3, // closed coauthoring ClosedAll: 4, // closed all SaveChanges: 10 // save };
\ No newline at end of file
"use strict";
/* docscoapicommon.js
*
* Author: Alexander.Trofimov
* Date: 09.11.12
*/
(/**
* @param {Window} window
* @param {undefined} undefined
*/
function(window, undefined) {
/*
* Import
* -----------------------------------------------------------------------------
*/
var asc = window["Asc"] ? window["Asc"] : (window["Asc"] = {});
var prot;
/**
* Класс user для совместного редактирования/просмотра документа
* -----------------------------------------------------------------------------
*
* @constructor
* @memberOf Asc
*/
function asc_CUser(val) {
this.id = null; // уникальный id - пользователя
this.idOriginal = null; // уникальный id - пользователя
this.userName = null; // имя пользователя
this.state = undefined; // состояние (true - подключен, false - отключился)
this.indexUser = -1; // Индекс пользователя (фактически равно числу заходов в документ на сервере)
this.color = null; // цвет пользователя
this.view = false; // просмотр(true), редактор(false)
this._setUser(val);
return this;
}
asc_CUser.prototype._setUser = function(val) {
if (val) {
this.id = val['id'];
this.idOriginal = val['idOriginal'];
this.userName = val['username'];
this.indexUser = val['indexUser'];
this.color = getUserColorById(this.idOriginal, this.userName, false, true);
this.view = val['view'];
}
};
asc_CUser.prototype.asc_getId = function() {
return this.id;
};
asc_CUser.prototype.asc_getUserName = function() {
return this.userName;
};
asc_CUser.prototype.asc_getState = function() {
return this.state;
};
asc_CUser.prototype.asc_getColor = function() {
return '#' + ('000000' + this.color.toString(16)).substr(-6);
};
asc_CUser.prototype.asc_getView = function() {
return this.view;
};
asc_CUser.prototype.setId = function(val) {
this.id = val;
};
asc_CUser.prototype.setUserName = function(val) {
this.userName = val;
};
asc_CUser.prototype.setState = function(val) {
this.state = val;
};
/*
* Export
* -----------------------------------------------------------------------------
*/
window["Asc"].asc_CUser = asc_CUser;
prot = asc_CUser.prototype;
prot["asc_getId"] = prot.asc_getId;
prot["asc_getUserName"] = prot.asc_getUserName;
prot["asc_getState"] = prot.asc_getState;
prot["asc_getColor"] = prot.asc_getColor;
prot["asc_getView"] = prot.asc_getView;
})(window);
var ConnectionState = {
Reconnect: -1, // reconnect state
None: 0, // not initialized
WaitAuth: 1, // waiting session id
Authorized: 2, // authorized
ClosedCoAuth: 3, // closed coauthoring
ClosedAll: 4, // closed all
SaveChanges: 10 // save
};
\ No newline at end of file
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