Fix 'save to drive' icon displayed for anonymous users in whiteboard
This commit is contained in:
@@ -333,15 +333,6 @@ define([
|
|||||||
framework.localChange();
|
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
|
// Embed image
|
||||||
var onUpload = function (e) {
|
var onUpload = function (e) {
|
||||||
var file = e.target.files[0];
|
var file = e.target.files[0];
|
||||||
@@ -390,6 +381,15 @@ define([
|
|||||||
};
|
};
|
||||||
framework._.sfCommon.openFilePicker(pickerCfg);
|
framework._.sfCommon.openFilePicker(pickerCfg);
|
||||||
}).appendTo($rightside);
|
}).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()) {
|
if (framework.isReadOnly()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user