Commit 2df8c2a1 authored by Alexander.Trofimov's avatar Alexander.Trofimov

Merged revision(s) 65903-65934 from...

Merged revision(s) 65903-65934 from AVS/Sources/TeamlabOffice/branches/TeamlabOffice_v3.5_NewUserColors:


git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@65935 954022d7-b5bf-4e40-9824-e11837661b57
parent acd036a5
......@@ -2850,20 +2850,15 @@ var CDocInfo = window["CDocInfo"];
var c_oAscArrUserColors = [15064320, 58807, 16724950, 1759488, 9981439, 56805, 15050496, 15224319, 10154496, 16731553,
62146, 47077, 1828096, 15859712, 15427327, 15919360, 15905024, 59890, 12733951, 13496832, 62072, 49906,16734720,
10682112, 7890687, 16731610, 65406, 38655, 16747008, 14221056, 16737966, 1896960, 65484, 10970879, 16759296,
16711680, 63231, 16774656, 2031360, 52479, 13330175, 16743219, 3386367, 11927347, 16752947, 9404671, 4980531,
16744678, 3407830, 11960575, 16724787, 10878873, 14745395, 16762931, 15696127, 3397375, 16744636,3407768, 3406079,
13926655, 15269734, 16751083, 6742271, 16766566, 13107046, 16775219, 16751718, 10852863, 6750176, 16737894,
14457343, 16759142, 6750130, 6865407, 15650047, 16769945, 7929702, 16751049, 6748927, 16751001, 12884479,
16775782, 16765081, 10087423, 10878873, 16757744, 10081791, 14352281, 15053823, 10092523, 16760217, 15728537,
13815039, 16776652, 16757719, 13432319, 16773580, 13828044, 15650047, 15893248, 16724883, 58737, 15007744, 36594,
12772608, 12137471, 6442495, 9561344, 15021055, 34789, 15039488, 44761, 16718470, 14274816, 11606783, 9099520,
53721, 16718545, 1625088, 15881472, 13419776, 50636, 14752511, 55659, 14261760, 32985, 11389952, 16711800,
8571904, 1490688, 16711884, 8991743, 13407488, 41932, 11010303, 7978752, 15028480, 52387, 15007927, 52325, 47295,
14549247, 12552960, 12564480, 39359, 15007852, 12114176, 1421824, 55726, 13041893, 10665728, 30924, 49049,
14251264, 48990, 14241024, 36530, 11709440, 13369507, 44210, 11698688, 7451136, 13397504, 45710, 34214];
var c_oAscArrUserColors = [16757719, 7929702, 56805, 10081791, 12884479, 16751001, 6748927, 16762931, 6865407,
15650047, 16737894, 3407768, 16759142, 10852863, 6750176, 16774656, 13926655, 13815039, 3397375, 11927347,
16752947, 9404671, 4980531, 16744678, 3407830, 15919360, 16731553, 52479, 13330175, 16743219, 3386367, 14221056,
16737966, 1896960, 65484, 10970879, 16759296, 16711680, 13496832, 62072, 49906, 16734720, 10682112, 7890687,
16731610, 65406, 38655, 16747008, 59890, 12733951, 15859712, 47077, 15050496, 15224319, 10154496, 58807, 16724950,
1759488, 9981439, 15064320, 15893248, 16724883, 58737, 15007744, 36594, 12772608, 12137471, 6442495, 15039488,
16718470, 14274816, 53721, 16718545, 1625088, 15881472, 13419776, 32985, 16711800, 1490688, 16711884, 8991743,
13407488, 41932, 7978752, 15028480, 52387, 15007927, 12114176, 1421824, 55726, 13041893, 10665728, 30924, 49049,
14241024, 36530, 11709440, 13397504, 45710, 34214];
// export
window["c_oAscArrUserColors"] = c_oAscArrUserColors;
......
"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.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.userName = val['username']; this.indexUser = val['indexUser']; this.color = c_oAscArrUserColors[this.indexUser % c_oAscArrUserColors.length]; this.state = val['state']; 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_getColorValue = function () { return this.color; }; asc_CUser.prototype.asc_getView = function () { return this.view; }; asc_CUser.prototype.asc_setId = function (val) { this.id = val; }; asc_CUser.prototype.asc_setUserName = function (val) { this.userName = val; }; asc_CUser.prototype.asc_setState = function (val) { this.state = val; }; asc_CUser.prototype.asc_setColor = function (val) { this.color = val; }; /* * Export * ----------------------------------------------------------------------------- */ window["Asc"]["asc_CUser"] = 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_setId"] = prot.asc_setId; prot["asc_getColor"] = prot.asc_getColor; prot["asc_getColorValue"] = prot.asc_getColorValue; prot["asc_getView"] = prot.asc_getView; prot["asc_setUserName"] = prot.asc_setUserName; prot["asc_setState"] = prot.asc_setState; prot["asc_setColor"] = prot.asc_setColor; } )(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.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.userName = val['username']; this.indexUser = val['indexUser']; this.color = c_oAscArrUserColors[(this.indexUser - 1) % c_oAscArrUserColors.length]; this.state = val['state']; 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_getColorValue = function () { return this.color; }; asc_CUser.prototype.asc_getView = function () { return this.view; }; asc_CUser.prototype.asc_setId = function (val) { this.id = val; }; asc_CUser.prototype.asc_setUserName = function (val) { this.userName = val; }; asc_CUser.prototype.asc_setState = function (val) { this.state = val; }; asc_CUser.prototype.asc_setColor = function (val) { this.color = val; }; /* * Export * ----------------------------------------------------------------------------- */ window["Asc"]["asc_CUser"] = 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_setId"] = prot.asc_setId; prot["asc_getColor"] = prot.asc_getColor; prot["asc_getColorValue"] = prot.asc_getColorValue; prot["asc_getView"] = prot.asc_getView; prot["asc_setUserName"] = prot.asc_setUserName; prot["asc_setState"] = prot.asc_setState; prot["asc_setColor"] = prot.asc_setColor; } )(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