summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rwxr-xr-xwww/js/DataModel.js8
-rw-r--r--www/js/MomentCtrl.js7
2 files changed, 14 insertions, 1 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index 1c74255b..a748bc2d 100755
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -172,6 +172,7 @@ angular.module('zmApp.controllers')
'momentGridSize': 40,
'momentMonitorFilter': [],
'enableMomentSubMenu': true,
+ 'momentArrangeBy': 'StartTime',
};
@@ -1039,6 +1040,13 @@ angular.module('zmApp.controllers')
loginData.momentMonitorFilter = JSON.stringify([]);
}
+
+
+ if (typeof loginData.momentArrangeBy == 'undefined') {
+
+ loginData.momentArrangeBy = "StartTime";
+
+ }
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 {