From c6c23b69ec85b0668e03c9fef95923b2b124ca1b Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sat, 12 May 2018 12:54:44 -0400 Subject: initial --- config.xml | 3 ++- hooks/before_prepare/01_pp_hacks.sh | 2 ++ package.json | 8 +++++--- resources/android/icon/drawable-hdpi-icon.png | Bin 3161 -> 3161 bytes resources/android/icon/drawable-ldpi-icon.png | Bin 1398 -> 1398 bytes resources/android/icon/drawable-mdpi-icon.png | Bin 2078 -> 2078 bytes resources/android/icon/drawable-xhdpi-icon.png | Bin 4154 -> 4154 bytes resources/android/icon/drawable-xxhdpi-icon.png | Bin 6195 -> 6195 bytes resources/android/icon/drawable-xxxhdpi-icon.png | Bin 8231 -> 8231 bytes .../android/splash/drawable-land-hdpi-screen.png | Bin 17726 -> 17726 bytes .../android/splash/drawable-land-ldpi-screen.png | Bin 6771 -> 6771 bytes .../android/splash/drawable-land-mdpi-screen.png | Bin 10105 -> 10105 bytes .../android/splash/drawable-land-xhdpi-screen.png | Bin 30192 -> 30192 bytes .../android/splash/drawable-land-xxhdpi-screen.png | Bin 40693 -> 40693 bytes .../android/splash/drawable-land-xxxhdpi-screen.png | Bin 53718 -> 53718 bytes .../android/splash/drawable-port-hdpi-screen.png | Bin 18160 -> 18160 bytes .../android/splash/drawable-port-ldpi-screen.png | Bin 6903 -> 6903 bytes .../android/splash/drawable-port-mdpi-screen.png | Bin 10366 -> 10366 bytes .../android/splash/drawable-port-xhdpi-screen.png | Bin 31026 -> 31026 bytes .../android/splash/drawable-port-xxhdpi-screen.png | Bin 41584 -> 41584 bytes .../android/splash/drawable-port-xxxhdpi-screen.png | Bin 54940 -> 54940 bytes resources/ios/icon/icon-1024.png | Bin 32775 -> 32775 bytes resources/ios/icon/icon-40.png | Bin 1526 -> 1526 bytes resources/ios/icon/icon-40@2x.png | Bin 3486 -> 3486 bytes resources/ios/icon/icon-40@3x.png | Bin 5265 -> 5265 bytes resources/ios/icon/icon-50.png | Bin 2181 -> 2181 bytes resources/ios/icon/icon-50@2x.png | Bin 4386 -> 4386 bytes resources/ios/icon/icon-60.png | Bin 2647 -> 2647 bytes resources/ios/icon/icon-60@2x.png | Bin 5265 -> 5265 bytes resources/ios/icon/icon-60@3x.png | Bin 7814 -> 7814 bytes resources/ios/icon/icon-72.png | Bin 3161 -> 3161 bytes resources/ios/icon/icon-72@2x.png | Bin 6195 -> 6195 bytes resources/ios/icon/icon-76.png | Bin 3352 -> 3352 bytes resources/ios/icon/icon-76@2x.png | Bin 6643 -> 6643 bytes resources/ios/icon/icon-83.5@2x.png | Bin 7168 -> 7168 bytes resources/ios/icon/icon-small.png | Bin 1205 -> 1205 bytes resources/ios/icon/icon-small@2x.png | Bin 2520 -> 2520 bytes resources/ios/icon/icon-small@3x.png | Bin 3803 -> 3803 bytes resources/ios/icon/icon.png | Bin 2451 -> 2451 bytes resources/ios/icon/icon@2x.png | Bin 4988 -> 4988 bytes resources/ios/splash/Default-568h@2x~iphone.png | Bin 26982 -> 26982 bytes resources/ios/splash/Default-667h.png | Bin 32395 -> 32395 bytes resources/ios/splash/Default-736h.png | Bin 62886 -> 62886 bytes resources/ios/splash/Default-Landscape-736h.png | Bin 62629 -> 62629 bytes resources/ios/splash/Default-Landscape@2x~ipad.png | Bin 59305 -> 59305 bytes resources/ios/splash/Default-Landscape@~ipadpro.png | Bin 87979 -> 87979 bytes resources/ios/splash/Default-Landscape~ipad.png | Bin 25129 -> 25129 bytes resources/ios/splash/Default-Portrait@2x~ipad.png | Bin 59374 -> 59374 bytes resources/ios/splash/Default-Portrait@~ipadpro.png | Bin 88671 -> 88671 bytes resources/ios/splash/Default-Portrait~ipad.png | Bin 25496 -> 25496 bytes resources/ios/splash/Default@2x~iphone.png | Bin 22993 -> 22993 bytes .../ios/splash/Default@2x~universal~anyany.png | Bin 97293 -> 97293 bytes resources/ios/splash/Default~iphone.png | Bin 10366 -> 10366 bytes www/external/android-tv-banner/banner.png | Bin 0 -> 13241 bytes 54 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 www/external/android-tv-banner/banner.png diff --git a/config.xml b/config.xml index 7fb94c18..3f407d9f 100644 --- a/config.xml +++ b/config.xml @@ -146,6 +146,7 @@ + - + diff --git a/hooks/before_prepare/01_pp_hacks.sh b/hooks/before_prepare/01_pp_hacks.sh index cde25dab..06980e1e 100755 --- a/hooks/before_prepare/01_pp_hacks.sh +++ b/hooks/before_prepare/01_pp_hacks.sh @@ -49,6 +49,8 @@ echo "Copying Android notification icons to resource dir" echo "--------------------------------------------------" if [ -d "platforms/android/res/" ]; then exe cp -R www/external/android-notification-icons/ platforms/android/res/ + exe cp -f www/external/android-tv-banner/banner.png platforms/android/res/drawable + else echo "Directory platforms/android/res/ does not exist, skipping..." fi diff --git a/package.json b/package.json index 25c7fd3d..77bb68fd 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ }, "phonegap-plugin-mobile-accessibility": {}, "cordova-custom-config": {}, - "cordova.plugins.diagnostic": {}, "cordova-plugin-email": {}, "cordova-plugin-touch-id": {}, "cordova-plugin-android-fingerprint-auth": {}, @@ -50,7 +49,9 @@ "cordova-plugin-add-swift-support": {}, "ionic-plugin-keyboard": {}, "cordova-library-helper": {}, - "cordova-plugin-certificates": {} + "cordova-plugin-certificates": {}, + "cordova.plugins.diagnostic": {}, + "cordova-plugin-android-tv": {} } }, "dependencies": { @@ -59,13 +60,14 @@ "clivas": "^0.2.0", "com.telerik.plugins.nativepagetransitions": "^0.6.5", "cordova": "^8.0.0", - "cordova-android": "^6.3.0", + "cordova-android": "6.4.0", "cordova-custom-config": "~4.0.2", "cordova-ios": "^4.5.4", "cordova-library-helper": "git+https://github.com/FlyingDonkeyDev/cordova-library-helper.git", "cordova-plugin-add-swift-support": "^1.7.1", "cordova-plugin-android-fingerprint-auth": "^1.4.0", "cordova-plugin-android-permissions": "^1.0.0", + "cordova-plugin-android-tv": "git+https://github.com/pliablepixels/cordova-plugin-android-tv.git", "cordova-plugin-app-version": "^0.1.9", "cordova-plugin-canvas2image": "git+https://github.com/flache/Canvas2ImagePlugin.git", "cordova-plugin-certificates": "git+https://github.com/hypery2k/cordova-certificate-plugin.git", diff --git a/resources/android/icon/drawable-hdpi-icon.png b/resources/android/icon/drawable-hdpi-icon.png index 29f6e23a..97d7bd5d 100644 Binary files a/resources/android/icon/drawable-hdpi-icon.png and b/resources/android/icon/drawable-hdpi-icon.png differ diff --git a/resources/android/icon/drawable-ldpi-icon.png b/resources/android/icon/drawable-ldpi-icon.png index 82fdb670..d41cc430 100644 Binary files a/resources/android/icon/drawable-ldpi-icon.png and b/resources/android/icon/drawable-ldpi-icon.png differ diff --git a/resources/android/icon/drawable-mdpi-icon.png b/resources/android/icon/drawable-mdpi-icon.png index 5b11045c..ec0b29f4 100644 Binary files a/resources/android/icon/drawable-mdpi-icon.png and b/resources/android/icon/drawable-mdpi-icon.png differ diff --git a/resources/android/icon/drawable-xhdpi-icon.png b/resources/android/icon/drawable-xhdpi-icon.png index c4c6730a..4b461f62 100644 Binary files a/resources/android/icon/drawable-xhdpi-icon.png and b/resources/android/icon/drawable-xhdpi-icon.png differ diff --git a/resources/android/icon/drawable-xxhdpi-icon.png b/resources/android/icon/drawable-xxhdpi-icon.png index d6512f1b..d145c8af 100644 Binary files a/resources/android/icon/drawable-xxhdpi-icon.png and b/resources/android/icon/drawable-xxhdpi-icon.png differ diff --git a/resources/android/icon/drawable-xxxhdpi-icon.png b/resources/android/icon/drawable-xxxhdpi-icon.png index 8cee414d..bba2de11 100644 Binary files a/resources/android/icon/drawable-xxxhdpi-icon.png and b/resources/android/icon/drawable-xxxhdpi-icon.png differ diff --git a/resources/android/splash/drawable-land-hdpi-screen.png b/resources/android/splash/drawable-land-hdpi-screen.png index b8dd869c..0a61890d 100644 Binary files a/resources/android/splash/drawable-land-hdpi-screen.png and b/resources/android/splash/drawable-land-hdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-ldpi-screen.png b/resources/android/splash/drawable-land-ldpi-screen.png index c138f74b..781674a5 100644 Binary files a/resources/android/splash/drawable-land-ldpi-screen.png and b/resources/android/splash/drawable-land-ldpi-screen.png differ diff --git a/resources/android/splash/drawable-land-mdpi-screen.png b/resources/android/splash/drawable-land-mdpi-screen.png index cae7657e..7ce49379 100644 Binary files a/resources/android/splash/drawable-land-mdpi-screen.png and b/resources/android/splash/drawable-land-mdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-xhdpi-screen.png b/resources/android/splash/drawable-land-xhdpi-screen.png index 56872897..991e7041 100644 Binary files a/resources/android/splash/drawable-land-xhdpi-screen.png and b/resources/android/splash/drawable-land-xhdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-xxhdpi-screen.png b/resources/android/splash/drawable-land-xxhdpi-screen.png index 19fc10c0..bc116630 100644 Binary files a/resources/android/splash/drawable-land-xxhdpi-screen.png and b/resources/android/splash/drawable-land-xxhdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-xxxhdpi-screen.png b/resources/android/splash/drawable-land-xxxhdpi-screen.png index 368a3e70..9d03c6b5 100644 Binary files a/resources/android/splash/drawable-land-xxxhdpi-screen.png and b/resources/android/splash/drawable-land-xxxhdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-hdpi-screen.png b/resources/android/splash/drawable-port-hdpi-screen.png index 08f065bf..67532137 100644 Binary files a/resources/android/splash/drawable-port-hdpi-screen.png and b/resources/android/splash/drawable-port-hdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-ldpi-screen.png b/resources/android/splash/drawable-port-ldpi-screen.png index 64bc2d66..93b76d69 100644 Binary files a/resources/android/splash/drawable-port-ldpi-screen.png and b/resources/android/splash/drawable-port-ldpi-screen.png differ diff --git a/resources/android/splash/drawable-port-mdpi-screen.png b/resources/android/splash/drawable-port-mdpi-screen.png index ebc915e4..5a7618e1 100644 Binary files a/resources/android/splash/drawable-port-mdpi-screen.png and b/resources/android/splash/drawable-port-mdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-xhdpi-screen.png b/resources/android/splash/drawable-port-xhdpi-screen.png index 7d46beb7..a78808c2 100644 Binary files a/resources/android/splash/drawable-port-xhdpi-screen.png and b/resources/android/splash/drawable-port-xhdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-xxhdpi-screen.png b/resources/android/splash/drawable-port-xxhdpi-screen.png index 0e52c7db..a3171a84 100644 Binary files a/resources/android/splash/drawable-port-xxhdpi-screen.png and b/resources/android/splash/drawable-port-xxhdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-xxxhdpi-screen.png b/resources/android/splash/drawable-port-xxxhdpi-screen.png index ed5ca0c7..8f221644 100644 Binary files a/resources/android/splash/drawable-port-xxxhdpi-screen.png and b/resources/android/splash/drawable-port-xxxhdpi-screen.png differ diff --git a/resources/ios/icon/icon-1024.png b/resources/ios/icon/icon-1024.png index f37b5159..dc83bb2b 100644 Binary files a/resources/ios/icon/icon-1024.png and b/resources/ios/icon/icon-1024.png differ diff --git a/resources/ios/icon/icon-40.png b/resources/ios/icon/icon-40.png index 68076c16..d62bb9e9 100644 Binary files a/resources/ios/icon/icon-40.png and b/resources/ios/icon/icon-40.png differ diff --git a/resources/ios/icon/icon-40@2x.png b/resources/ios/icon/icon-40@2x.png index 3c2bfa7b..0fceaad5 100644 Binary files a/resources/ios/icon/icon-40@2x.png and b/resources/ios/icon/icon-40@2x.png differ diff --git a/resources/ios/icon/icon-40@3x.png b/resources/ios/icon/icon-40@3x.png index 322bb744..c501fe60 100644 Binary files a/resources/ios/icon/icon-40@3x.png and b/resources/ios/icon/icon-40@3x.png differ diff --git a/resources/ios/icon/icon-50.png b/resources/ios/icon/icon-50.png index 6470a9f5..40fdaf38 100644 Binary files a/resources/ios/icon/icon-50.png and b/resources/ios/icon/icon-50.png differ diff --git a/resources/ios/icon/icon-50@2x.png b/resources/ios/icon/icon-50@2x.png index ae858faa..fb5a4b3f 100644 Binary files a/resources/ios/icon/icon-50@2x.png and b/resources/ios/icon/icon-50@2x.png differ diff --git a/resources/ios/icon/icon-60.png b/resources/ios/icon/icon-60.png index 898c4b60..cf9decf2 100644 Binary files a/resources/ios/icon/icon-60.png and b/resources/ios/icon/icon-60.png differ diff --git a/resources/ios/icon/icon-60@2x.png b/resources/ios/icon/icon-60@2x.png index 322bb744..c501fe60 100644 Binary files a/resources/ios/icon/icon-60@2x.png and b/resources/ios/icon/icon-60@2x.png differ diff --git a/resources/ios/icon/icon-60@3x.png b/resources/ios/icon/icon-60@3x.png index d68a766f..4193570d 100644 Binary files a/resources/ios/icon/icon-60@3x.png and b/resources/ios/icon/icon-60@3x.png differ diff --git a/resources/ios/icon/icon-72.png b/resources/ios/icon/icon-72.png index 88fd9594..a218b11a 100644 Binary files a/resources/ios/icon/icon-72.png and b/resources/ios/icon/icon-72.png differ diff --git a/resources/ios/icon/icon-72@2x.png b/resources/ios/icon/icon-72@2x.png index 90425a78..c31bf79d 100644 Binary files a/resources/ios/icon/icon-72@2x.png and b/resources/ios/icon/icon-72@2x.png differ diff --git a/resources/ios/icon/icon-76.png b/resources/ios/icon/icon-76.png index 5060dd22..947c8352 100644 Binary files a/resources/ios/icon/icon-76.png and b/resources/ios/icon/icon-76.png differ diff --git a/resources/ios/icon/icon-76@2x.png b/resources/ios/icon/icon-76@2x.png index 295365eb..c3de0284 100644 Binary files a/resources/ios/icon/icon-76@2x.png and b/resources/ios/icon/icon-76@2x.png differ diff --git a/resources/ios/icon/icon-83.5@2x.png b/resources/ios/icon/icon-83.5@2x.png index 67434740..680fa48a 100644 Binary files a/resources/ios/icon/icon-83.5@2x.png and b/resources/ios/icon/icon-83.5@2x.png differ diff --git a/resources/ios/icon/icon-small.png b/resources/ios/icon/icon-small.png index 8801c466..51fb4050 100644 Binary files a/resources/ios/icon/icon-small.png and b/resources/ios/icon/icon-small.png differ diff --git a/resources/ios/icon/icon-small@2x.png b/resources/ios/icon/icon-small@2x.png index cf83c273..c9528174 100644 Binary files a/resources/ios/icon/icon-small@2x.png and b/resources/ios/icon/icon-small@2x.png differ diff --git a/resources/ios/icon/icon-small@3x.png b/resources/ios/icon/icon-small@3x.png index 0d65e805..36a0a2de 100644 Binary files a/resources/ios/icon/icon-small@3x.png and b/resources/ios/icon/icon-small@3x.png differ diff --git a/resources/ios/icon/icon.png b/resources/ios/icon/icon.png index 8fc8862c..e63ce03f 100644 Binary files a/resources/ios/icon/icon.png and b/resources/ios/icon/icon.png differ diff --git a/resources/ios/icon/icon@2x.png b/resources/ios/icon/icon@2x.png index 139233e2..c380a703 100644 Binary files a/resources/ios/icon/icon@2x.png and b/resources/ios/icon/icon@2x.png differ diff --git a/resources/ios/splash/Default-568h@2x~iphone.png b/resources/ios/splash/Default-568h@2x~iphone.png index cac62e36..17941bcd 100644 Binary files a/resources/ios/splash/Default-568h@2x~iphone.png and b/resources/ios/splash/Default-568h@2x~iphone.png differ diff --git a/resources/ios/splash/Default-667h.png b/resources/ios/splash/Default-667h.png index 94114802..6f6dd023 100644 Binary files a/resources/ios/splash/Default-667h.png and b/resources/ios/splash/Default-667h.png differ diff --git a/resources/ios/splash/Default-736h.png b/resources/ios/splash/Default-736h.png index 02cfcace..62cbc78e 100644 Binary files a/resources/ios/splash/Default-736h.png and b/resources/ios/splash/Default-736h.png differ diff --git a/resources/ios/splash/Default-Landscape-736h.png b/resources/ios/splash/Default-Landscape-736h.png index 8b77eb03..21c72d97 100644 Binary files a/resources/ios/splash/Default-Landscape-736h.png and b/resources/ios/splash/Default-Landscape-736h.png differ diff --git a/resources/ios/splash/Default-Landscape@2x~ipad.png b/resources/ios/splash/Default-Landscape@2x~ipad.png index ba0edbda..a280675e 100644 Binary files a/resources/ios/splash/Default-Landscape@2x~ipad.png and b/resources/ios/splash/Default-Landscape@2x~ipad.png differ diff --git a/resources/ios/splash/Default-Landscape@~ipadpro.png b/resources/ios/splash/Default-Landscape@~ipadpro.png index 893bc568..78d3e942 100644 Binary files a/resources/ios/splash/Default-Landscape@~ipadpro.png and b/resources/ios/splash/Default-Landscape@~ipadpro.png differ diff --git a/resources/ios/splash/Default-Landscape~ipad.png b/resources/ios/splash/Default-Landscape~ipad.png index 07a3669d..d721e074 100644 Binary files a/resources/ios/splash/Default-Landscape~ipad.png and b/resources/ios/splash/Default-Landscape~ipad.png differ diff --git a/resources/ios/splash/Default-Portrait@2x~ipad.png b/resources/ios/splash/Default-Portrait@2x~ipad.png index 3e6a6c1c..85496fa8 100644 Binary files a/resources/ios/splash/Default-Portrait@2x~ipad.png and b/resources/ios/splash/Default-Portrait@2x~ipad.png differ diff --git a/resources/ios/splash/Default-Portrait@~ipadpro.png b/resources/ios/splash/Default-Portrait@~ipadpro.png index 96e5f1a8..adbc5538 100644 Binary files a/resources/ios/splash/Default-Portrait@~ipadpro.png and b/resources/ios/splash/Default-Portrait@~ipadpro.png differ diff --git a/resources/ios/splash/Default-Portrait~ipad.png b/resources/ios/splash/Default-Portrait~ipad.png index 3ad79c2a..12149532 100644 Binary files a/resources/ios/splash/Default-Portrait~ipad.png and b/resources/ios/splash/Default-Portrait~ipad.png differ diff --git a/resources/ios/splash/Default@2x~iphone.png b/resources/ios/splash/Default@2x~iphone.png index d654833d..a5d954c6 100644 Binary files a/resources/ios/splash/Default@2x~iphone.png and b/resources/ios/splash/Default@2x~iphone.png differ diff --git a/resources/ios/splash/Default@2x~universal~anyany.png b/resources/ios/splash/Default@2x~universal~anyany.png index 3a0f0e53..f6bdcd09 100644 Binary files a/resources/ios/splash/Default@2x~universal~anyany.png and b/resources/ios/splash/Default@2x~universal~anyany.png differ diff --git a/resources/ios/splash/Default~iphone.png b/resources/ios/splash/Default~iphone.png index 67b76e25..bbd4c24a 100644 Binary files a/resources/ios/splash/Default~iphone.png and b/resources/ios/splash/Default~iphone.png differ diff --git a/www/external/android-tv-banner/banner.png b/www/external/android-tv-banner/banner.png new file mode 100644 index 00000000..2a161b34 Binary files /dev/null and b/www/external/android-tv-banner/banner.png differ -- cgit v1.2.3 From 91da4b8a12e7fb3dbc0183197a209a524abd851b Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Mon, 14 May 2018 12:22:53 -0400 Subject: initial framework code for tv navigation --- config.xml | 1 - package.json | 4 +- www/css/style.css | 7 +++ www/js/MenuController.js | 13 +++- www/js/app.js | 136 ++++++++++++++++++++++++++++++++++++++++-- www/templates/devoptions.html | 8 +-- www/templates/menu.html | 24 ++++---- www/templates/monitors.html | 6 +- www/templates/montage.html | 32 +++++----- 9 files changed, 186 insertions(+), 45 deletions(-) diff --git a/config.xml b/config.xml index 3f407d9f..7f41090d 100644 --- a/config.xml +++ b/config.xml @@ -146,7 +146,6 @@ - diff --git a/package.json b/package.json index 77bb68fd..d7590fe0 100644 --- a/package.json +++ b/package.json @@ -50,8 +50,7 @@ "ionic-plugin-keyboard": {}, "cordova-library-helper": {}, "cordova-plugin-certificates": {}, - "cordova.plugins.diagnostic": {}, - "cordova-plugin-android-tv": {} + "cordova.plugins.diagnostic": {} } }, "dependencies": { @@ -67,7 +66,6 @@ "cordova-plugin-add-swift-support": "^1.7.1", "cordova-plugin-android-fingerprint-auth": "^1.4.0", "cordova-plugin-android-permissions": "^1.0.0", - "cordova-plugin-android-tv": "git+https://github.com/pliablepixels/cordova-plugin-android-tv.git", "cordova-plugin-app-version": "^0.1.9", "cordova-plugin-canvas2image": "git+https://github.com/flache/Canvas2ImagePlugin.git", "cordova-plugin-certificates": "git+https://github.com/hypery2k/cordova-certificate-plugin.git", diff --git a/www/css/style.css b/www/css/style.css index a2ab08e5..2847d2be 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -1036,10 +1036,17 @@ videogular div.event-time { border: 2px dotted #3498db; } + + .dragborder-selected { border: 4px solid #e74c3c; } +.dpadSelected { + border: 4px solid #45AAF2 !important; + +} + .grid-sizer { width: 5%; } diff --git a/www/js/MenuController.js b/www/js/MenuController.js index 477849a6..f09d1c69 100644 --- a/www/js/MenuController.js +++ b/www/js/MenuController.js @@ -2,7 +2,7 @@ /* jslint browser: true*/ /* global cordova,StatusBar,angular,console */ -angular.module('zmApp.controllers').controller('MenuController', ['$scope', '$ionicSideMenuDelegate', 'zm', '$stateParams', '$ionicHistory', '$state', 'NVRDataModel', '$rootScope', '$ionicPopup', '$translate', '$timeout', function ($scope, $ionicSideMenuDelegate, zm, $stateParams, $ionicHistory, $state, NVRDataModel, $rootScope, $ionicPopup, $translate, $timeout) { +angular.module('zmApp.controllers').controller('MenuController', ['$scope', '$ionicSideMenuDelegate', 'zm', '$stateParams', '$ionicHistory', '$state', 'NVRDataModel', '$rootScope', '$ionicPopup', '$translate', '$timeout', '$location',function ($scope, $ionicSideMenuDelegate, zm, $stateParams, $ionicHistory, $state, NVRDataModel, $rootScope, $ionicPopup, $translate, $timeout, $location) { $scope.openMenu = function () { $ionicSideMenuDelegate.toggleLeft(); }; @@ -13,6 +13,17 @@ angular.module('zmApp.controllers').controller('MenuController', ['$scope', '$io //---------------------------------------------------------------- + $scope.go = function(p) { + + + $ionicHistory.nextViewOptions({ + historyRoot: true, + disableAnimate: true, + expire: 300 + }); + $ionicSideMenuDelegate.toggleLeft(); + $location.path(p); + }; $scope.navigateView = function (view, args) { diff --git a/www/js/app.js b/www/js/app.js index 284bc90d..0a19b987 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -11,6 +11,8 @@ var appVersion = "0.0.0"; + + // core app start stuff angular.module('zmApp', [ 'ionic', @@ -202,6 +204,8 @@ angular.module('zmApp', [ }) + + //credit: http://stackoverflow.com/a/23931217/1361529 .directive('hidepassword', function () { @@ -1210,6 +1214,7 @@ angular.module('zmApp', [ $ionicPlatform.ready(function () { //console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>INSIDE RUN"); + $rootScope.dpadId = 0; $rootScope.textScaleFactor = 1.0; $rootScope.isLoggedIn = false; $rootScope.apiValid = false; @@ -1316,6 +1321,120 @@ angular.module('zmApp', [ }); } + // DPAD Handler - disabled for now + // when ready add ionic cordova plugin add https://github.com/pliablepixels/cordova-plugin-android-tv.git + + // console.log (JSON.stringify(ionic.Platform.device())); + if (0 && $ionicPlatform.is('android')) { + window.addEventListener('keydown', dPadHandler, true); + } + else { + NVRDataModel.log ("Not registering D-PAD handler, as you are not on android"); + } + + + function dPadHandler(evt){ + + var handled = false; + + var keyCodes = { + MKEYB: 77, + SELECT: 13, + + LEFT: 37, + UP: 38, + RIGHT: 39, + DOWN: 40, + + PLAYPAUSE: 179, + REWIND: 227, + FORWARD:228 + }; + + $timeout (function() { + var st = '#'+$rootScope.dpadState+'-move-'; + // console.log ("IN STATE="+$rootScope.dpadState+ " with st="+st); + var keyCode=evt.keyCode; + var el, nextel; + + if (keyCode == keyCodes.REWIND) { + if (!$ionicSideMenuDelegate.isOpen()) { + $ionicSideMenuDelegate.toggleLeft(); + $rootScope.dpadState = "menu"; + $rootScope.dpadId = 0; + + } + else { + el = angular.element(document.querySelector(st +$rootScope.dpadId)); + if (el.length) el[0].classList.remove('dpadSelected'); + $ionicSideMenuDelegate.toggleLeft(); + $rootScope.dpadId = 0; + $rootScope.dpadState = $state.current.name.replace('app.',""); + } + console.log ("dpad State is: "+$rootScope.dpadState); + handled = true; + } + + else if (keyCode == keyCodes.SELECT ) { // select + if ($rootScope.dpadId >0) { + el = angular.element(document.querySelector('#'+$rootScope.dpadState+'-move-' +$rootScope.dpadId)); + // if in menu, unselect + if ($rootScope.dpadState == 'menu') { + if (el.length) { + el[0].classList.remove('dpadSelected'); + $rootScope.dpadId = 0; + } + } + el.triggerHandler('click'); + + } + handled = true; + } + + // arrows + else if (keyCode >= keyCodes.LEFT && keyCode <= keyCodes.DOWN) { + + // might be open by mouse or other event, so check first + if ($ionicSideMenuDelegate.isOpen() && $rootScope.dpadState != 'menu') { + $rootScope.dpadState = "menu"; + $rootScope.dpadId = 0; + } + + if ($rootScope.dpadId < 1) { + // console.log ("First dpad usage with st="+st); + $rootScope.dpadId = 1; + + //console.log ("looking for st="+st); + el = angular.element(document.querySelector(st+'1')); + if (el.length) { + el[0].classList.add('dpadSelected'); + el[0].scrollIntoView(); + } + + } else { + // unselect old + //console.log ("looking for st="+st); + el = angular.element(document.querySelector(st +$rootScope.dpadId)); + + var nextId = (keyCode == keyCodes.LEFT || keyCode == keyCodes.UP) ? $rootScope.dpadId -1: $rootScope.dpadId + 1; + nextel = angular.element(document.querySelector(st +nextId)); + if (nextel.length) { + if (el.length) el[0].classList.remove('dpadSelected'); + nextel[0].classList.add('dpadSelected'); + nextel[0].scrollIntoView(); + $rootScope.dpadId = nextId; + } + console.log ("dpadID="+$rootScope.dpadId+ " with state="+$rootScope.dpadState); + } + handled = true; + } + + + return handled; + + }); + } + // register callbacks for online/offline // lets see if it really works $rootScope.online = navigator.onLine; @@ -1370,9 +1489,12 @@ angular.module('zmApp', [ if (!$ionicSideMenuDelegate.isOpenLeft()) { e.preventDefault(); $ionicSideMenuDelegate.toggleLeft(); + + $rootScope.dState = "menu"; + $rootScope.dpadId = 0; //console.log("Status of SIDE MENU IS : " + $ionicSideMenuDelegate.isOpen()); } else { - + window.stop(); //ionic.Platform.exitApp(); //navigator.app.exitApp(); @@ -1420,26 +1542,29 @@ angular.module('zmApp', [ $rootScope.$on('$stateChangeStart', function (event, toState, toParams) { var requireLogin = toState.data.requireLogin; - + $rootScope.dpadId = 0; + //console.log("HERE"); if ($rootScope.apiValid == false && toState.name != 'app.invalidapi' && toState.data.requireLogin == true) { event.preventDefault(); - $state.transitionTo('app.invalidapi'); + $rootScope.dpadState = "invalidapi"; + $state.transitionTo('invalidapi'); return; } if (NVRDataModel.hasLoginInfo() || toState.data.requireLogin == false) { //console.log("State transition is authorized"); - + $rootScope.dpadState = toState.name.replace("app.",""); return; } else { NVRDataModel.log("In Auth State trans: Not logged in, requested to go to " + JSON.stringify(toState)); // event.preventDefault(); // - $state.transitionTo('app.login'); + $rootScope.dpadState = "login"; + $state.transitionTo('login'); } @@ -1452,6 +1577,7 @@ angular.module('zmApp', [ // for whatever reason, .go was resulting in digest loops. // if you don't prevent, states will stack event.preventDefault(); + $rootScope.dpadState = "login"; $state.transitionTo('app.login'); return; } diff --git a/www/templates/devoptions.html b/www/templates/devoptions.html index e81e536f..80a1d80a 100644 --- a/www/templates/devoptions.html +++ b/www/templates/devoptions.html @@ -1,12 +1,12 @@ - +   - +
@@ -16,11 +16,11 @@
{{'kFrameUpdate'|translate}} ({{'kSec'|translate}}.) 
diff --git a/www/templates/menu.html b/www/templates/menu.html index 3b69b544..43833490 100644 --- a/www/templates/menu.html +++ b/www/templates/menu.html @@ -16,7 +16,7 @@ - + @@ -25,28 +25,28 @@ - + {{'kMenuTimeline'|translate}} - + {{'kMenuEvents'|translate}} - + {{'kMoment24Heading'|translate}} - + {{'kMenuEventMontage'|translate}} @@ -54,21 +54,21 @@ - + {{'kMenuMonitors'|translate}} - + {{'kMenuSystemStatus'|translate}} - + {{'kMenuZMSettings'|translate}} @@ -79,7 +79,7 @@ - + @@ -93,7 +93,7 @@ - + {{'kMenuHelp'|translate}} @@ -101,7 +101,7 @@ - + {{'kMenuWizard'|translate}} @@ -118,7 +118,7 @@
- + {{'kMenuLogs'|translate}} diff --git a/www/templates/monitors.html b/www/templates/monitors.html index 2bd5d819..6f37a6d3 100644 --- a/www/templates/monitors.html +++ b/www/templates/monitors.html @@ -1,6 +1,6 @@ - @@ -9,7 +9,7 @@
diff --git a/www/templates/montage.html b/www/templates/montage.html index 876e1125..b37e16b6 100644 --- a/www/templates/montage.html +++ b/www/templates/montage.html @@ -1,28 +1,28 @@ {{currentProfileName}} - +   - - - + {{timeNow}}  - - - @@ -39,34 +39,34 @@ --> -
  • - +
  • +
  • -
  • - +
  • +
  • -
  • - +
  • +
  • - + :{{getCycleStatus()}}
  • - +
  • - +
  • -- cgit v1.2.3