From 41e7abfd2ec68cf4c673dc87951669506b6f38c6 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sat, 23 Dec 2017 20:03:44 -0500 Subject: #570 persistent sort by --- www/js/MomentCtrl.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'www/js/MomentCtrl.js') diff --git a/www/js/MomentCtrl.js b/www/js/MomentCtrl.js index fc598456..39351a36 100644 --- a/www/js/MomentCtrl.js +++ b/www/js/MomentCtrl.js @@ -617,6 +617,10 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$ //---------------------------------------------------------------- $scope.getMoments = function (cond) { if (!cond) cond = momentType; + + var ld = NVRDataModel.getLogin(); + ld.momentArrangeBy = cond; + NVRDataModel.setLogin(ld); getMoments(cond); }; @@ -660,7 +664,7 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$ $scope.type = $translate.instant('kMomentMenuByScore'); else if (sortCondition == 'StartTime') $scope.type = $translate.instant('kMomentMenuByTime'); - else if (sortCondition == 'MonitorId') + else if (sortCondition == 'monitorName') $scope.type = $translate.instant('kMomentMenuByMonitor'); $scope.apiurl = NVRDataModel.getLogin().apiurl; @@ -789,6 +793,7 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$ $scope.loadingStatus = $translate.instant('kLoading'); $scope.gridSize = ld.momentGridSize; + momentType = ld.momentArrangeBy; //console.log ("---------->Filter before "+ld.momentMonitorFilter); try { -- cgit v1.2.3