|
|
@ -1089,7 +1089,7 @@ define([
|
|
|
|
changes: parseChanges(obj.changes),
|
|
|
|
changes: parseChanges(obj.changes),
|
|
|
|
changesIndex: ooChannel.cpIndex || 0,
|
|
|
|
changesIndex: ooChannel.cpIndex || 0,
|
|
|
|
locks: getUserLock(getId()),
|
|
|
|
locks: getUserLock(getId()),
|
|
|
|
excelAdditionalInfo: null
|
|
|
|
excelAdditionalInfo: obj.excelAdditionalInfo
|
|
|
|
}, null, function (err, hash) {
|
|
|
|
}, null, function (err, hash) {
|
|
|
|
if (err) {
|
|
|
|
if (err) {
|
|
|
|
return void console.error(err);
|
|
|
|
return void console.error(err);
|
|
|
@ -1164,6 +1164,17 @@ define([
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "cursor":
|
|
|
|
|
|
|
|
cursor.updateCursor({
|
|
|
|
|
|
|
|
type: "cursor",
|
|
|
|
|
|
|
|
messages: [{
|
|
|
|
|
|
|
|
cursor: obj.cursor,
|
|
|
|
|
|
|
|
time: +new Date(),
|
|
|
|
|
|
|
|
user: myUniqueOOId,
|
|
|
|
|
|
|
|
useridoriginal: myOOId
|
|
|
|
|
|
|
|
}]
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
break;
|
|
|
|
case "getLock":
|
|
|
|
case "getLock":
|
|
|
|
handleLock(obj, send);
|
|
|
|
handleLock(obj, send);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -1438,6 +1449,29 @@ define([
|
|
|
|
};
|
|
|
|
};
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
APP.getUserColor = function (userId) {
|
|
|
|
|
|
|
|
var hex;
|
|
|
|
|
|
|
|
Object.keys(content.ids || {}).some(function (k) {
|
|
|
|
|
|
|
|
var u = content.ids[k];
|
|
|
|
|
|
|
|
if (Number(u.ooid) === Number(userId)) {
|
|
|
|
|
|
|
|
var md = common.getMetadataMgr().getMetadataLazy();
|
|
|
|
|
|
|
|
if (md && md.users && md.users[u.netflux]) {
|
|
|
|
|
|
|
|
hex = md.users[u.netflux].color;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
if (hex) {
|
|
|
|
|
|
|
|
var rgb = Util.hexToRGB(hex);
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
r: rgb[0],
|
|
|
|
|
|
|
|
g: rgb[1],
|
|
|
|
|
|
|
|
b: rgb[2],
|
|
|
|
|
|
|
|
a: 255
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
APP.UploadImageFiles = function (files, type, id, jwt, cb) {
|
|
|
|
APP.UploadImageFiles = function (files, type, id, jwt, cb) {
|
|
|
|
return void cb();
|
|
|
|
return void cb();
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -1500,6 +1534,12 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
APP.loadingImage = 0;
|
|
|
|
APP.loadingImage = 0;
|
|
|
|
APP.getImageURL = function(name, callback) {
|
|
|
|
APP.getImageURL = function(name, callback) {
|
|
|
|
|
|
|
|
if (name && /^data:image/.test(name)) {
|
|
|
|
|
|
|
|
var b = Util.dataURIToBlob(name);
|
|
|
|
|
|
|
|
var url = URL.createObjectURL(blob);
|
|
|
|
|
|
|
|
return void callback(url);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var mediasSources = getMediasSources();
|
|
|
|
var mediasSources = getMediasSources();
|
|
|
|
var data = mediasSources[name];
|
|
|
|
var data = mediasSources[name];
|
|
|
|
|
|
|
|
|
|
|
@ -2243,6 +2283,7 @@ define([
|
|
|
|
$contentContainer: $('#cp-app-oo-container')
|
|
|
|
$contentContainer: $('#cp-app-oo-container')
|
|
|
|
};
|
|
|
|
};
|
|
|
|
toolbar = APP.toolbar = Toolbar.create(configTb);
|
|
|
|
toolbar = APP.toolbar = Toolbar.create(configTb);
|
|
|
|
|
|
|
|
toolbar.showColors();
|
|
|
|
Title.setToolbar(toolbar);
|
|
|
|
Title.setToolbar(toolbar);
|
|
|
|
|
|
|
|
|
|
|
|
if (window.CP_DEV_MODE) {
|
|
|
|
if (window.CP_DEV_MODE) {
|
|
|
@ -2530,6 +2571,15 @@ define([
|
|
|
|
initializing = false;
|
|
|
|
initializing = false;
|
|
|
|
common.openPadChat(APP.onLocal);
|
|
|
|
common.openPadChat(APP.onLocal);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!readOnly) {
|
|
|
|
|
|
|
|
common.openCursorChannel(APP.onLocal);
|
|
|
|
|
|
|
|
cursor = common.createCursor(APP.onLocal);
|
|
|
|
|
|
|
|
cursor.onCursorUpdate(function (data) {
|
|
|
|
|
|
|
|
if (!data || !data.cursor) { return; }
|
|
|
|
|
|
|
|
ooChannel.send(data.cursor);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (APP.startWithTemplate) {
|
|
|
|
if (APP.startWithTemplate) {
|
|
|
|
var template = APP.startWithTemplate;
|
|
|
|
var template = APP.startWithTemplate;
|
|
|
|
loadTemplate(template.href, template.password, template.content);
|
|
|
|
loadTemplate(template.href, template.password, template.content);
|
|
|
|