diff options
Diffstat (limited to 'www/js/MenuController.js')
| -rw-r--r-- | www/js/MenuController.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/www/js/MenuController.js b/www/js/MenuController.js index 318e4d15..92aca6da 100644 --- a/www/js/MenuController.js +++ b/www/js/MenuController.js @@ -400,6 +400,35 @@ angular.module('zmApp.controllers').controller('MenuController', ['$scope', '$io }; + $scope.flushAPICache = function() { + + NVR.flushAPICache() + .then ( function () { + showCachePopup($translate.instant('kFlushAllCachesMessageOk')); + }) + .catch (function (err) { + showCachePopup($translate.instant('kFlushAllCachesMessageOk')+JSON.stringify(err)); + }); + + function showCachePopup(str) { + $rootScope.zmPopup = $ionicPopup.alert({ + template: str, + + title: $translate.instant('kNote'), + + buttons: [ + { + text: $translate.instant('kButtonOk'), + } + ] + }); + + + } + + }; + + $scope.switchLang = function () { $scope.lang = NVR.getLanguages(); $scope.myopt = { |
