diff options
| -rw-r--r-- | config.xml | 3 | ||||
| -rw-r--r-- | package.json | 4 | ||||
| -rw-r--r-- | www/js/MontageCtrl.js | 26 |
3 files changed, 25 insertions, 8 deletions
@@ -186,6 +186,9 @@ <plugin name="cordova-plugin-app-version" spec="0.1.9" /> <plugin name="cordova-plugin-inappbrowser" spec="https://github.com/apache/cordova-plugin-inappbrowser.git" /> <plugin name="cordova-plugin-statusbar" spec="~2.4.4-dev" /> + <plugin name="cordova-plugin-ionic-webview" spec="https://github.com/pliablepixels/cordova-plugin-ionic-webview.git"> + <variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" /> + </plugin> <plugin name="cordova-plugin-media-pp-fork" spec="^1.0.2-dev" /> <engine name="android" spec="8.0.0" /> <engine name="ios" spec="5.1.1" /> diff --git a/package.json b/package.json index 42da4ad2..04a1ba1d 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,9 @@ "cordova-plugin-inappbrowser": {}, "cordova-plugin-app-version": {}, "cordova-plugin-statusbar-pp-fork": {}, + "cordova-plugin-ionic-webview": { + "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+" + }, "cordova-plugin-media-pp-fork": {} } }, @@ -86,6 +89,7 @@ "cordova-plugin-inappbrowser": "git+https://github.com/apache/cordova-plugin-inappbrowser.git", "cordova-plugin-insomnia": "^4.3.0", "cordova-plugin-ionic-keyboard": "2.2.0", + "cordova-plugin-ionic-webview": "git+https://github.com/pliablepixels/cordova-plugin-ionic-webview.git", "cordova-plugin-media-pp-fork": "^1.0.2-dev", "cordova-plugin-multi-window": "0.0.3", "cordova-plugin-network-information": "^2.0.2", diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 2f449896..15be6bba 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -974,7 +974,7 @@ angular.module('zmApp.controllers') $scope.tempZMGroups.push ({ 'name': $scope.zmGroups[i], 'selection': val - }) + }); } $scope.tempZMGroups.unshift({'name':$translate.instant('kAll'), 'selection':false}); @@ -1008,7 +1008,7 @@ angular.module('zmApp.controllers') } NVR.debug ("Group(s) selected:"+JSON.stringify(ld.currentZMGroupNames)); - var are_equal = ld.currentZMGroupNames.length === old_ZMGroupNames.length && ld.currentZMGroupNames.sort().every(function(value, index) { return value === old_ZMGroupNames.sort()[index]}); + var are_equal = ld.currentZMGroupNames.length === old_ZMGroupNames.length && ld.currentZMGroupNames.sort().every(function(value, index) { return value === old_ZMGroupNames.sort()[index];}); if (!are_equal) { @@ -1021,32 +1021,40 @@ angular.module('zmApp.controllers') if (simulStreaming) currentStreamState = streamState.STOPPED; - for (var i = 0; i < $scope.MontageMonitors.length; i++) { - if ($scope.MontageMonitors[i].Monitor.listDisplay == 'show' && simulStreaming) NVR.killLiveStream($scope.MontageMonitors[i].Monitor.connKey, $scope.MontageMonitors[i].Monitor.controlURL); + for (var iz = 0; iz < $scope.MontageMonitors.length; iz++) { + if ($scope.MontageMonitors[iz].Monitor.listDisplay == 'show' && simulStreaming) NVR.killLiveStream($scope.MontageMonitors[iz].Monitor.connKey, $scope.MontageMonitors[iz].Monitor.controlURL); // if length of selected groups is 0 then show all var isShow = ln? false: true; if (ln) { - for (var k=0; k < $scope.MontageMonitors[i].Monitor.Group.length; k++) { - if (ld.currentZMGroupNames.includes($scope.MontageMonitors[i].Monitor.Group[k].name)) { + for (var k=0; k < $scope.MontageMonitors[iz].Monitor.Group.length; k++) { + if (ld.currentZMGroupNames.includes($scope.MontageMonitors[iz].Monitor.Group[k].name)) { isShow = true; break; } } } - $scope.MontageMonitors[i].Monitor.listDisplay = isShow? 'show':'noshow'; + $scope.MontageMonitors[iz].Monitor.listDisplay = isShow? 'show':'noshow'; // console.log ('----> Setting '+ $scope.MontageMonitors[i].Monitor.Name+' to '+ $scope.MontageMonitors[i].Monitor.listDisplay); } + ld.packeryPositions = undefined; + NVR.setLogin(ld) + .then (function() { + initPackery(); + }) + + +/* $timeout ( function () { beforeReorderPositions = pckry.getShiftPositions('data-item-id'); finishReorder(); },300); - +*/ } else { NVR.debug ("No action taken as selection is same as current"); } @@ -1874,6 +1882,7 @@ angular.module('zmApp.controllers') // switch to another montage profile $scope.switchMontageProfile = function () { var posArray; + var i; try { posArray = NVR.getLogin().packeryPositionsArray; @@ -1892,6 +1901,7 @@ angular.module('zmApp.controllers') $scope.listdata.push(key); } } + if ($scope.listdata.indexOf($translate.instant('kMontageDefaultProfile')) == -1) $scope.listdata.push($translate.instant('kMontageDefaultProfile')); |
