Commit 8f11967d authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Добавил метод asc_getColorValue (хранится int)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55658 954022d7-b5bf-4e40-9824-e11837661b57
parent f35f069f
...@@ -189,6 +189,7 @@ ...@@ -189,6 +189,7 @@
prot["getA"] = prot.getA; prot["getA"] = prot.getA;
prot["get_hex"] = prot.get_hex; prot["get_hex"] = prot.get_hex;
/** @constructor */
function asc_ChartSettings() function asc_ChartSettings()
{ {
this.style = null; this.style = null;
...@@ -422,6 +423,7 @@ ...@@ -422,6 +423,7 @@
window["asc_ChartSettings"] = asc_ChartSettings; window["asc_ChartSettings"] = asc_ChartSettings;
/** @constructor */
function asc_ValAxisSettings() function asc_ValAxisSettings()
{ {
this.minValRule = null; this.minValRule = null;
...@@ -624,6 +626,7 @@ ...@@ -624,6 +626,7 @@
window["asc_ValAxisSettings"] = asc_ValAxisSettings; window["asc_ValAxisSettings"] = asc_ValAxisSettings;
/** @constructor */
function asc_CatAxisSettings() function asc_CatAxisSettings()
{ {
this.intervalBetweenTick = null; this.intervalBetweenTick = null;
......
...@@ -8,7 +8,7 @@ var CellValueType = ...@@ -8,7 +8,7 @@ var CellValueType =
String:1, String:1,
Bool:2, Bool:2,
Error:3 Error:3
} };
//NumFormat defines //NumFormat defines
var c_oAscNumFormatType = { var c_oAscNumFormatType = {
...@@ -23,7 +23,7 @@ var c_oAscNumFormatType = { ...@@ -23,7 +23,7 @@ var c_oAscNumFormatType = {
Time : 8, Time : 8,
Percent : 9, Percent : 9,
Fraction : 10 Fraction : 10
} };
......
"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) { if ( !(this instanceof asc_CUser) ) { return new asc_CUser(val); } this.id = null; // уникальный id - пользователя this.userName = null; // имя пользователя this.state = undefined; // состояние (true - подключен, false - отключился) this.color = null; // цвет пользователя this._setUser(val); return this; } asc_CUser.prototype = { constructor: asc_CUser, _setUser: function (val) { if (val) { this.id = val["id"]; this.userName = val["username"]; this.color = val["color"]; this.state = val["state"]; } else { this.color = asc.generateColor(); } }, asc_getId: function () { return this.id; }, asc_getUserName: function () { return this.userName; }, asc_getState: function () { return this.state; }, asc_getColor: function () { return this.color; }, asc_setId: function (val) { this.id = val; }, asc_setUserName: function (val) { this.userName = val; }, asc_setState: function (val) { this.state = val; }, 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_setUserName"] = prot.asc_setUserName; prot["asc_setState"] = prot.asc_setState; prot["asc_setColor"] = prot.asc_setColor; } )(window); "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) { if ( !(this instanceof asc_CUser) ) { return new asc_CUser(val); } this.id = null; // уникальный id - пользователя this.userName = null; // имя пользователя this.state = undefined; // состояние (true - подключен, false - отключился) this.color = null; // цвет пользователя this._setUser(val); return this; } asc_CUser.prototype = { constructor: asc_CUser, _setUser: function (val) { if (val) { this.id = val["id"]; this.userName = val["username"]; this.color = val["color"]; this.state = val["state"]; } else { this.color = asc.generateColor(); } }, asc_getId: function () { return this.id; }, asc_getUserName: function () { return this.userName; }, asc_getState: function () { return this.state; }, asc_getColor: function () { return '#' + ('000000' + this.color.toString(16)).substr(-6); }, asc_getColorValue: function () { return this.color; }, asc_setId: function (val) { this.id = val; }, asc_setUserName: function (val) { this.userName = val; }, asc_setState: function (val) { this.state = val; }, 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_setUserName"] = prot.asc_setUserName; prot["asc_setState"] = prot.asc_setState; prot["asc_setColor"] = prot.asc_setColor; } )(window);
\ No newline at end of file \ No newline at end of file
......
This diff is collapsed.
...@@ -1556,7 +1556,7 @@ asc_docs_api.prototype._coAuthoringInit = function() ...@@ -1556,7 +1556,7 @@ asc_docs_api.prototype._coAuthoringInit = function()
this.CoAuthoringApi.onSaveChanges = function (e, userId, bSendEvent) this.CoAuthoringApi.onSaveChanges = function (e, userId, bSendEvent)
{ {
var oUser = t.CoAuthoringApi.getUser(userId); var oUser = t.CoAuthoringApi.getUser(userId);
var oColor = oUser ? oUser.asc_getColor() : null; var oColor = oUser ? oUser.asc_getColorValue() : null;
// ToDo add select changes color // ToDo add select changes color
var Count = e.length; var Count = e.length;
......
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