PCS with owners and password for spreadsheets

This commit is contained in:
yflory
2019-02-05 15:58:49 +01:00
parent a0049b360a
commit 412670c8a6
8 changed files with 77 additions and 31 deletions

View File

@@ -870,10 +870,12 @@ define([
var $rightside = toolbar.$rightside;
/*var $save = common.createButton('save', true, {}, function () {
saveToServer();
});
$save.appendTo($rightside);*/
if (window.CP_DEV_MODE) {
var $save = common.createButton('save', true, {}, function () {
saveToServer();
});
$save.appendTo($rightside);
}
var $export = common.createButton('export', true, {}, exportFile);
$export.appendTo($rightside);
@@ -940,6 +942,12 @@ define([
});
};
config.onError = function (err) {
common.onServerError(err, toolbar, function () {
setEditable(false);
});
};
config.onRemote = function () {
if (initializing) { return; }
var userDoc = APP.realtime.getUserDoc();
@@ -1013,6 +1021,10 @@ define([
UI.addLoadingScreen();
}));
SFCommon.create(waitFor(function (c) { APP.common = common = c; }));
}).nThen(function (waitFor) {
common.handleNewFile(waitFor, {
noTemplates: true
});
}).nThen(function (/*waitFor*/) {
andThen(common);
});