diff --git a/www/img/finger.png b/www/img/finger.png new file mode 100644 index 0000000000000000000000000000000000000000..89a63c04de7c0baee79971524d59fc2f07c441f2 Binary files /dev/null and b/www/img/finger.png differ diff --git a/www/js/app.js b/www/js/app.js index 0c5cdca20554754ad4be12946ef109de590bc71f..a250e46a4b81367be8764632998d33217432aef2 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -6,9 +6,7 @@ // 'starter.controllers' is found in controllers.js angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht.translate', 'ngApi', 'angular-cache', 'angular.screenmatch', 'angular.bind.notifier', 'ImageCropper', 'ion-digit-keyboard', - // removeIf(device) - 'FBAngular', // angulmar-fullscreen - // endRemoveIf(device) + 'FBAngular', // = angular-fullscreen // removeIf(no-device) 'ngCordova', // endRemoveIf(no-device) diff --git a/www/plugins/es/js/controllers/settings-controllers.js b/www/plugins/es/js/controllers/settings-controllers.js index fbc14baad5a970bbef788f171d0032bdf843c82c..8635cb3f55b93f8dae44a8af0cca28e0db9f96cc 100644 --- a/www/plugins/es/js/controllers/settings-controllers.js +++ b/www/plugins/es/js/controllers/settings-controllers.js @@ -52,6 +52,7 @@ function ESPluginSettingsController ($scope, $window, $q, $translate, $ionicPop UIUtils, Modals, csHttp, csConfig, csSettings, esHttp, esSettings) { 'ngInject'; + $scope.hasWindowNotification = !!("Notification" in window); $scope.formData = {}; $scope.popupData = {}; // need for the node popup $scope.loading = true; @@ -223,8 +224,9 @@ function ESPluginSettingsController ($scope, $window, $q, $translate, $ionicPop $scope.onFormChanged = function() { if ($scope.loading) return; - if ($scope.formData.notifications.emitHtml5 !== (!!("Notification" in window) && Notification.permission === "granted")){ - Notification.requestPermission(function (permission) { + if ($scope.hasWindowNotification && + $scope.formData.notifications.emitHtml5 !== (window.Notification.permission === "granted")){ + window.Notification.requestPermission(function (permission) { // If the user accepts, let's create a notification $scope.formData.notifications.emitHtml5 = (permission === "granted"); // revert to false if permission not granted $scope.onFormChanged(); // Loop @@ -241,8 +243,6 @@ function ESPluginSettingsController ($scope, $window, $q, $translate, $ionicPop // Fix old settings (unused) delete csSettings.data.plugins.es.newNode; - - csSettings.store() .then(function() { $scope.loading = false;