From 79d2427d6d44df8cf20907420eccf87c06b821d9 Mon Sep 17 00:00:00 2001 From: PliablePixels Date: Tue, 14 Jul 2015 16:02:57 -0400 Subject: Feed screens now have a grey background, also have ability to scale images to crop or fit --- www/js/EventCtrl.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'www/js/EventCtrl.js') diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 8d9bd57b..dacb5345 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -17,6 +17,7 @@ angular.module('zmApp.controllers').controller('zmApp.EventCtrl', ['$scope', '$r var segmentHandle = 0; // holds timer for progress bar $scope.totalEventTime = 0; // used to display max of progress bar $scope.currentEventTime = 0; + $scope.imageStyle=true; @@ -136,7 +137,7 @@ angular.module('zmApp.controllers').controller('zmApp.EventCtrl', ['$scope', '$r // which is the view - and when you are in the modal it will go away console.log("*** Refreshing Modal view ***"); //$state.go($state.current, {}, {reload: true}); - $scope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111; + $rootScope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111; $ionicLoading.show({ template: "refreshed view", noBackdrop: true, @@ -428,7 +429,7 @@ angular.module('zmApp.controllers').controller('zmApp.EventCtrl', ['$scope', '$r $scope.eventId = eid; $scope.eventDur = Math.round(edur); $scope.loginData = ZMDataModel.getLogin(); - $scope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111; + $rootScope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111; $scope.totalEventTime = Math.round(parseFloat(edur)) - 1; $scope.currentEventTime = 0; @@ -632,4 +633,10 @@ angular.module('zmApp.controllers').controller('zmApp.EventCtrl', ['$scope', '$r }); }; //dorefresh + $scope.scaleImage = function() { + console.log ("Switching image style"); + $scope.imageStyle = !$scope.imageStyle; + + }; + }]); -- cgit v1.2.3