updated by GasGit automation
This commit is contained in:
parent
73f730448a
commit
c00580c4bc
1 changed files with 9 additions and 1 deletions
|
@ -22,11 +22,16 @@ var Client = (function(client) {
|
|||
|
||||
client.startPicker = function () {
|
||||
|
||||
// disable inserting and saving
|
||||
Process.control.buttons.insert.disabled = Process.control.buttons.save.disabled = true;
|
||||
|
||||
google.script.run
|
||||
.withFailureHandler(function(error) {
|
||||
App.showNotification ("Failed to save", error);
|
||||
Process.control.buttons.insert.disabled = Process.control.buttons.save.disabled = false;
|
||||
})
|
||||
.withSuccessHandler(function (result) {
|
||||
Process.control.buttons.insert.disabled = Process.control.buttons.save.disabled = false;
|
||||
})
|
||||
.startPicker(Process.control.code.svg.value,Process.control.code.picker.value);
|
||||
};
|
||||
|
@ -34,14 +39,17 @@ var Client = (function(client) {
|
|||
client.insertImage = function (png) {
|
||||
|
||||
spinCursor();
|
||||
|
||||
Process.control.buttons.insert.disabled = Process.control.buttons.save.disabled = true;
|
||||
|
||||
google.script.run
|
||||
.withFailureHandler(function(error) {
|
||||
resetCursor();
|
||||
App.showNotification ("Failed to insert image", error);
|
||||
Process.control.buttons.insert.disabled = Process.control.buttons.save.disabled = false;
|
||||
})
|
||||
.withSuccessHandler(function (result) {
|
||||
resetCursor();
|
||||
Process.control.buttons.insert.disabled = Process.control.buttons.save.disabled = false;
|
||||
})
|
||||
.insertImage(png);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue