diff options
Diffstat (limited to 'www/js/LogCtrl.js')
| -rw-r--r-- | www/js/LogCtrl.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/www/js/LogCtrl.js b/www/js/LogCtrl.js index 942bd8da..eb66b71e 100644 --- a/www/js/LogCtrl.js +++ b/www/js/LogCtrl.js @@ -13,6 +13,25 @@ angular.module('zmApp.controllers').controller('zmApp.LogCtrl', ['$scope', '$roo $scope.zmAppVersion = ZMDataModel.getAppVersion(); + $scope.deleteLogs = function () { + + var confirmPopup = $ionicPopup.confirm({ + title: 'Please Confirm', + template: 'Are you sure you want to delete logs?', + }); + + confirmPopup.then(function (res) { + if (res) { + $fileLogger.deleteLogfile().then(function () { + console.log('Logfile deleted'); + $fileLogger.setStorageFilename('zmNinjaLog.txt'); + $scope.zmLog.logString = ""; + }); + } + }); + }; + + //-------------------------------------------------------------------------- // Make sure user knows information masking is best effort //-------------------------------------------------------------------------- |
