From 724fec3a208e7f42ed9e657740484b3b6be9f27e Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Fri, 2 Dec 2016 11:45:22 -0500 Subject: if running crosswalk, disable this feature (doesn't work) #398 --- www/js/EventCtrl.js | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'www/js') diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index c17071ea..3ff6c1ce 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -1179,14 +1179,30 @@ angular.module('zmApp.controllers') // make sure the user knows the GIF is not full fps/all frames function gifAlert(e) { - $ionicPopup.alert( - { - title: $translate.instant('kNote'), - template: "{{'kGifWarning' | translate }}" - }).then(function() + if(navigator.userAgent.toLowerCase().indexOf('crosswalk') == -1) { + $ionicPopup.confirm( + { + title: $translate.instant('kNote'), + template: "{{'kGifWarning' | translate }}" + }).then(function(res) + { + if (res) + { + downloadAsGif2(e); + } + else + NVRDataModel.debug ("User cancelled GIF"); + + }); + } + else { - downloadAsGif2(e); - }); + $ionicPopup.alert({ + title:$translate.instant ('kNote'), + template:"{{'kGifNoCrosswalk' | translate}}" + }); + } + } -- cgit v1.2.3