summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2016-10-08 10:18:42 -0400
committerPliable Pixels <pliablepixels@gmail.com>2016-10-08 10:18:42 -0400
commit844368e1915f975eebf6c74b7f05a03c2f783877 (patch)
treece6bd83f18f9353a6209fa843894030764a65074 /www/js
parente86a3b8a9e1e6716b539adf010c528192c55dee1 (diff)
#346 - display system time only if width >=700px. Also useful to check if montage refresh is happening
Former-commit-id: d449a0a0f62e6c6b6c9226af3c4a3cba7ca32bb5
Diffstat (limited to 'www/js')
-rw-r--r--www/js/MontageCtrl.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index 64ee0891..6910f148 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -1,7 +1,7 @@
// Controller for the montage view
/* jshint -W041 */
/* jslint browser: true*/
-/* global cordova,StatusBar,angular,console,ionic,Packery, Draggabilly, imagesLoaded, ConnectSDK */
+/* global cordova,StatusBar,angular,console,ionic,Packery, Draggabilly, imagesLoaded, ConnectSDK, moment */
angular.module('zmApp.controllers')
@@ -101,6 +101,7 @@ angular.module('zmApp.controllers')
};*/
+
// called by afterEnter to load Packery
function initPackery() {
@@ -368,12 +369,15 @@ angular.module('zmApp.controllers')
function loadNotifications() {
- if (!$scope.allImagesLoaded) {
+ if ($scope.areImagesLoading) {
NVRDataModel.debug("skipping image refresh, packery is still loading");
return;
}
$rootScope.rand = Math.floor((Math.random() * 100000) + 1);
+
+ // if you see the time move, montage should move
+ $scope.timeNow = moment().format(NVRDataModel.getTimeFormatSec());
//console.log ("Inside Montage timer...");
@@ -853,8 +857,11 @@ angular.module('zmApp.controllers')
$scope.$on('$ionicView.afterEnter', function () {
NVRDataModel.debug("Setting image mode to snapshot, will change to image when packery is all done");
- $scope.allImagesLoaded = false;
+ $scope.areImagesLoading = true;
$scope.isDragabillyOn = false;
+
+ $scope.timeNow = moment().format(NVRDataModel.getTimeFormatSec());
+
$scope.gridScale = "grid-item-50";
$scope.LoginData = NVRDataModel.getLogin();