From bfdcdcccee146f924f3311b6955ce81d2dab226f Mon Sep 17 00:00:00 2001 From: PliablePixels Date: Fri, 10 Jul 2015 10:50:12 -0400 Subject: New skin and SCSS implementation --- www/js/LogCtrl.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'www/js/LogCtrl.js') 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 //-------------------------------------------------------------------------- -- cgit v1.2.3