Commit b3f2e3e9 authored by Alexey.Musinov's avatar Alexey.Musinov

mobile-coautoring

parent 18ee6a2a
......@@ -2757,6 +2757,34 @@ function asc_WriteAutoFiltersOptions(c, s) {
s['WriteByte'](255);
}
function asc_WriteUsers(c, s) {
if (!c) return;
var len = 0, name, user;
for (name in c) {
if (undefined !== name) {
len++;
}
}
s["WriteLong"](len);
for (name in c) {
if (undefined !== name) {
user = c[name];
if (user) {
s['WriteString2'](user.asc_getId());
s['WriteString2'](user.asc_getFirstName());
s['WriteString2'](user.asc_getLastName());
s['WriteString2'](user.asc_getUserName());
s['WriteBool'](user.asc_getView());
asc_menu_WriteColor(0, user.asc_getColor(), s);
}
}
}
}
//--------------------------------------------------------------------------------
// defines
//--------------------------------------------------------------------------------
......@@ -3895,6 +3923,13 @@ function OfflineEditor () {
window["native"]["OnCallMenuEvent"](3060, stream); // ASC_SPREADSHEETS_EVENT_TYPE_FILTER_DIALOG
});
_api.asc_registerCallback('asc_onAuthParticipantsChanged', function(users) {
var stream = global_memory_stream_menu;
stream["ClearNoAttack"]();
asc_WriteUsers(users, stream);
window["native"]["OnCallMenuEvent"](2416, stream); // ASC_MENU_EVENT_TYPE_AUTH_PARTICIPANTS_CHANGED
});
_api.asc_registerCallback('asc_onSheetsChanged', function () {
t.asc_WriteAllWorksheets(true, true);
});
......
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