diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2017-12-20 14:08:20 -0500 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2017-12-20 14:08:20 -0500 |
| commit | 51ac4d1e37b0c5797e419caeaab427fcffc52937 (patch) | |
| tree | a453d219e4156e61d38610c47df4c3fc711ad993 | |
| parent | 7482599ccaf95c7a23ca2118052c53775a0514d5 (diff) | |
#570 enabled icon toggle so as not to overwhelm small screens. Also added pinning.
| -rwxr-xr-x | www/js/DataModel.js | 4 | ||||
| -rw-r--r-- | www/js/MomentCtrl.js | 10 | ||||
| -rw-r--r-- | www/templates/moment.html | 12 |
3 files changed, 19 insertions, 7 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 2a4ac72f..1c74255b 100755 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -171,7 +171,7 @@ angular.module('zmApp.controllers') 'reloadInMontage': false, 'momentGridSize': 40, 'momentMonitorFilter': [], - 'enableMomentSubMenu': false, + 'enableMomentSubMenu': true, }; @@ -1030,7 +1030,7 @@ angular.module('zmApp.controllers') if (typeof loginData.enableMomentSubMenu == 'undefined') { - loginData.enableMomentSubMenu = false; + loginData.enableMomentSubMenu = true; } diff --git a/www/js/MomentCtrl.js b/www/js/MomentCtrl.js index d4eceb7f..84af262e 100644 --- a/www/js/MomentCtrl.js +++ b/www/js/MomentCtrl.js @@ -239,7 +239,7 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$ $scope.togglePin =function(ndx) { $scope.moments[ndx].Event.pinned = !$scope.moments[ndx].Event.pinned; if ($scope.moments[ndx].Event.pinned) { - $scope.moments[ndx].Event.pinnedIcon ="animated infinite flash ion-pin"; + $scope.moments[ndx].Event.pinnedIcon =" ion-pin assertive"; } else { $scope.moments[ndx].Event.pinnedIcon ="ion-pin"; @@ -518,7 +518,7 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$ }; $scope.getMoments = function (cond) { - momentType = cond; + if (!cond) cond = momentType; getMoments(cond); }; @@ -670,6 +670,10 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$ }); + $scope.toggleIcons = function() { + + $scope.showIcons = !$scope.showIcons; + }; $scope.$on('$ionicView.beforeEnter', function () { /*var w = Math.round(parseInt($rootScope.devWidth) / parseInt($rootScope.pixelRatio)) ; @@ -682,6 +686,8 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$ p = Math.ceil(p/5)*5; console.log ("P="+p);*/ + $scope.showIcons = true; + var ld = NVRDataModel.getLogin(); $scope.loadingStatus = $translate.instant('kLoading'); diff --git a/www/templates/moment.html b/www/templates/moment.html index f90ea0de..d1c68f95 100644 --- a/www/templates/moment.html +++ b/www/templates/moment.html @@ -38,6 +38,9 @@ <li> <a href="" ng-click="reLayout()"> <i class="ion-grid"></i></a> </li> + <li> + <a href="" ng-click="toggleIcons()"> <i ng-class="showIcons? 'ion-eye':'ion-eye-disabled'"></i></a> + </li> </ul> </div> @@ -47,6 +50,9 @@ <a href="" ng-click="changeFrom(-1)"> <i class="ion-chevron-left"></i></a> </li> <li> + <a href="" ng-click="getMoments()"> <i class="ion-location"></i></a> + </li> + <li> <a href="" ng-click="changeFrom(1)"> <i class="ion-chevron-right"></i></a> </li> @@ -66,15 +72,15 @@ <figure class="grid-item grid-item-{{gridSize}}" ng-repeat="moment in moments | onlyEnabledMoments"> - <figcaption class="normal-figheader"> {{moment.Event.monitorName}}<span style="float:right"><button class="button button-small button-icon icon {{moment.Event.icon}}" ng-click="toggleCollapse(moment.Event.MonitorId, moment.Event.Id, $index)"></button>{{moment.Event.collapseCount}} </span></figcaption> + <figcaption ng-if="showIcons" class="normal-figheader"> {{moment.Event.monitorName}}<span style="float:right"><button class="button button-small button-icon icon {{moment.Event.icon}}" ng-click="toggleCollapse(moment.Event.MonitorId, moment.Event.Id, $index)"></button>{{moment.Event.collapseCount}} </span></figcaption> <img image-spinner-src="{{moment.Event.baseURL}}/index.php?view=image&fid={{moment.Event.MaxScoreFrameId}}&width={{moment.Event.thumbWidth*2}}&height={{moment.Event.thumbHeight*2}}" img-spinner-w="{{moment.Event.width}}" img-spinner-h="{{moment.Event.height}}" image-spinner-loader="lines" on-tap="playEvent(moment)"/> - <figcaption class="normal-subfigcaption"><span style="float:right"><button class="button button-small button-icon icon {{moment.Event.pinnedIcon}}" ng-click="togglePin( $index)"></button></span></figcaption> + <figcaption ng-if="showIcons" class="normal-subfigcaption"><span style="float:right"><button class="button button-small button-icon icon {{moment.Event.pinnedIcon}}" ng-click="togglePin( $index)"></button></span></figcaption> <!--on-tap="showThumbnail(moment.Event.baseURL,moment.Event.MaxScoreFrameId)"--> - <figcaption class="normal-figcaption"> {{moment.Event.humanizeTime}}<span style="float:right">{{hourmin(moment.Event.StartTime)}} </span></figcaption> + <figcaption ng-if="showIcons" class="normal-figcaption"> {{moment.Event.humanizeTime}}<span style="float:right">{{hourmin(moment.Event.StartTime)}} </span></figcaption> </figure> </div> |
