updated by GasGit automation

This commit is contained in:
Bruce McPherson 2016-06-10 09:18:11 +01:00
parent 82b14b1280
commit 5cdfd47170

View file

@ -10,14 +10,25 @@ var Home = (function (home) {
Process.control.buttons.generate.addEventListener('click',function () {
// spin the cursor
DomUtils.hide ('spinner',false);
// disable the button
Process.control.buttons.generate.disabled = true;
Provoke.run("Server","generateTestData")
.then (function (result) {
App.toast ("Sample data generated","You can delete this sheet at any time");
finallyPromise();
})
['catch'](function (err) {
App.showNotification ("Failed to generate sample data", err);
finallyPromise();
});
function finallyPromise () {
DomUtils.hide ('spinner', true);
Process.control.buttons.generate.disabled = false;
}
});
// insert in sheet