Fix 'save to drive' icon displayed for anonymous users in whiteboard

pull/1/head
yflory 6 years ago
parent 1629d7bb1d
commit 3a7d1e5beb

@ -333,15 +333,6 @@ define([
framework.localChange();
};
// Export to drive as PNG
framework._.sfCommon.createButton('savetodrive', true, {}).click(function () {
var defaultName = framework._.title.getTitle();
UI.prompt(Messages.exportPrompt, defaultName + '.png', function (name) {
if (name === null || !name.trim()) { return; }
APP.upload(name);
});
}).appendTo($rightside);
// Embed image
var onUpload = function (e) {
var file = e.target.files[0];
@ -390,6 +381,15 @@ define([
};
framework._.sfCommon.openFilePicker(pickerCfg);
}).appendTo($rightside);
// Export to drive as PNG
framework._.sfCommon.createButton('savetodrive', true, {}).click(function () {
var defaultName = framework._.title.getTitle();
UI.prompt(Messages.exportPrompt, defaultName + '.png', function (name) {
if (name === null || !name.trim()) { return; }
APP.upload(name);
});
}).appendTo($rightside);
}
if (framework.isReadOnly()) {

Loading…
Cancel
Save