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 () {
|
client.startPicker = function () {
|
||||||
|
|
||||||
|
// disable inserting and saving
|
||||||
|
Process.control.buttons.insert.disabled = Process.control.buttons.save.disabled = true;
|
||||||
|
|
||||||
google.script.run
|
google.script.run
|
||||||
.withFailureHandler(function(error) {
|
.withFailureHandler(function(error) {
|
||||||
App.showNotification ("Failed to save", error);
|
App.showNotification ("Failed to save", error);
|
||||||
|
Process.control.buttons.insert.disabled = Process.control.buttons.save.disabled = false;
|
||||||
})
|
})
|
||||||
.withSuccessHandler(function (result) {
|
.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);
|
.startPicker(Process.control.code.svg.value,Process.control.code.picker.value);
|
||||||
};
|
};
|
||||||
|
@ -34,14 +39,17 @@ var Client = (function(client) {
|
||||||
client.insertImage = function (png) {
|
client.insertImage = function (png) {
|
||||||
|
|
||||||
spinCursor();
|
spinCursor();
|
||||||
|
Process.control.buttons.insert.disabled = Process.control.buttons.save.disabled = true;
|
||||||
|
|
||||||
google.script.run
|
google.script.run
|
||||||
.withFailureHandler(function(error) {
|
.withFailureHandler(function(error) {
|
||||||
resetCursor();
|
resetCursor();
|
||||||
App.showNotification ("Failed to insert image", error);
|
App.showNotification ("Failed to insert image", error);
|
||||||
|
Process.control.buttons.insert.disabled = Process.control.buttons.save.disabled = false;
|
||||||
})
|
})
|
||||||
.withSuccessHandler(function (result) {
|
.withSuccessHandler(function (result) {
|
||||||
resetCursor();
|
resetCursor();
|
||||||
|
Process.control.buttons.insert.disabled = Process.control.buttons.save.disabled = false;
|
||||||
})
|
})
|
||||||
.insertImage(png);
|
.insertImage(png);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue