summaryrefslogtreecommitdiff
path: root/www/js/EventCtrl.js
diff options
context:
space:
mode:
authorARC <arjunrc@gmail.com>2015-04-29 13:32:58 -0400
committerARC <arjunrc@gmail.com>2015-04-29 13:32:58 -0400
commita3f1e385fc0f5a99d6d19aa6fc2ebfef65533070 (patch)
tree794e48eb5d92e5c654942a971a967d446e1b2348 /www/js/EventCtrl.js
parent1a57eaad4dd25afc1f59c83968bcd408300a1270 (diff)
added support to refresh image feeds
Diffstat (limited to 'www/js/EventCtrl.js')
-rw-r--r--www/js/EventCtrl.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js
index cbb810f2..49475029 100644
--- a/www/js/EventCtrl.js
+++ b/www/js/EventCtrl.js
@@ -2,7 +2,7 @@
// This was before I got access to the new APIs. FIXME: Revisit this code to see what I am doing with it
// and whether the new API has a better mechanism
-angular.module('zmApp.controllers').controller('zmApp.EventCtrl', function ($ionicPlatform, $scope, $stateParams, message, ZMDataModel, $ionicSideMenuDelegate, $ionicModal, $ionicLoading, $http) {
+angular.module('zmApp.controllers').controller('zmApp.EventCtrl', function ($ionicPlatform, $scope, $stateParams, message, ZMDataModel, $ionicSideMenuDelegate, $ionicModal, $ionicLoading, $http, $state, $window) {
console.log("I got STATE PARAM " + $stateParams.id);
$scope.id = parseInt($stateParams.id, 10);
$scope.connKey = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111;
@@ -11,6 +11,19 @@ angular.module('zmApp.controllers').controller('zmApp.EventCtrl', function ($ion
$ionicSideMenuDelegate.toggleLeft();
}
+$scope.reloadView = function ()
+{
+ console.log ("*** Refreshing Modal view ***");
+ //$state.go($state.current, {}, {reload: true});
+ $scope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111;
+ $ionicLoading.show({
+ template: "refreshed view",
+ noBackdrop: true,
+ duration: 3000
+ });
+
+}
+
$scope.$on('$ionicView.loaded', function(){
console.log("**VIEW ** Events Ctrl Loaded");
});
@@ -148,6 +161,7 @@ angular.module('zmApp.controllers').controller('zmApp.EventCtrl', function ($ion
$scope.eventId = eid;
$scope.eventDur = Math.round(edur);
$scope.loginData = ZMDataModel.getLogin();
+ $scope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111;
$scope.modal.show();
};
$scope.closeModal = function () {
@@ -204,3 +218,6 @@ angular.module('zmApp.controllers').controller('zmApp.EventCtrl', function ($ion
}; //dorefresh
});
+
+
+