diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-09-29 13:58:31 -0400 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-09-29 13:58:31 -0400 |
| commit | 884bf8c92597c5864b500a478b91675d12c5a477 (patch) | |
| tree | 52e4298771f152b61a27f63e6e402614c295d222 /www/js | |
| parent | 1a4b28329bba3a30b83dd0538a2a159e8c17950b (diff) | |
show notification while deleting events
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/EventCtrl.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index e4f29c3b..27c12c20 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -247,9 +247,17 @@ angular.module('zmApp.controllers') var apiDelete = loginData.apiurl + "/events/" + id + ".json"; ZMDataModel.zmDebug("DeleteEvent: ID="+id+" item="+itemid); ZMDataModel.zmLog("Delete event " + apiDelete); + + $ionicLoading.show({ + template: "deleting event...", + noBackdrop: true, + duration: zm.httpTimeout + }); + $http.delete(apiDelete) .success(function(data) { + $ionicLoading.hide(); ZMDataModel.zmDebug ("delete success: " + JSON.stringify(data)); ZMDataModel.displayBanner ('info', ['deleted event'],2000,2000); @@ -269,6 +277,7 @@ angular.module('zmApp.controllers') }) .error (function (data) { + $ionicLoading.hide(); ZMDataModel.zmDebug ("delete error: " + JSON.stringify(data)); ZMDataModel.displayBanner ('error', ['could not delete event', 'please check logs']); }); |
