summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorPliablePixels <pliablepixels@gmail.com>2015-06-06 18:14:07 -0400
committerPliablePixels <pliablepixels@gmail.com>2015-06-06 18:14:07 -0400
commit29b1c060760d77cc2b49829f615e1442698f2980 (patch)
treec62ac4300262c2f278ac481f2b250e4f03eeca65 /www/js
parent41411b6201fa5e6ca0f78bb78073bbf525d4b573 (diff)
added a full screen option for montage view too - no status bars and sliders
Diffstat (limited to 'www/js')
-rw-r--r--www/js/EventsGraphsCtrl.js11
-rw-r--r--www/js/MonitorCtrl.js4
-rw-r--r--www/js/MontageCtrl.js19
-rw-r--r--www/js/app.js4
4 files changed, 33 insertions, 5 deletions
diff --git a/www/js/EventsGraphsCtrl.js b/www/js/EventsGraphsCtrl.js
index 830528e3..b8bf7d97 100644
--- a/www/js/EventsGraphsCtrl.js
+++ b/www/js/EventsGraphsCtrl.js
@@ -34,6 +34,7 @@ angular.module('zmApp.controllers').controller('zmApp.EventsGraphsCtrl', ['$ioni
$scope.navTitle = 'Tab Page';
+ // $scope.chart="";
$scope.leftButtons = [{
type: 'button-icon icon ion-navicon',
tap: function (e) {
@@ -48,6 +49,16 @@ angular.module('zmApp.controllers').controller('zmApp.EventsGraphsCtrl', ['$ioni
console.log('****DOCUMENT READY******');
});
+ // FIXME: No idea why this is not working
+ // it seems it can't get a handle to chart
+ $scope.handleChartClick = function(event)
+ {
+
+ // console.log (JSON.stringify( $scope.chart1.getBarsAtEvent(event)));
+
+ };
+
+
$scope.generateTCChart = function(id,chartTitle, hrs)
{
var monitors = [];
diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js
index 63d27ea2..a8d8771e 100644
--- a/www/js/MonitorCtrl.js
+++ b/www/js/MonitorCtrl.js
@@ -7,6 +7,10 @@
angular.module('zmApp.controllers').controller('zmApp.MonitorCtrl', ['$ionicPopup', '$scope', 'ZMDataModel', 'message', '$ionicSideMenuDelegate', '$ionicLoading', '$ionicModal', '$state', '$http', function ($ionicPopup, $scope, ZMDataModel, message, $ionicSideMenuDelegate, $ionicLoading, $ionicModal, $state, $http, $rootScope, $timeout) {
+
+ //FIXME:curl http://server/zm/api/monitors/daemonStatus/id:5/daemon:zmc.json to check if daemon is alive
+ // but reutrns true for pending
+
$scope.monitors = [];
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index 3fff9c7c..45701c9b 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -1,17 +1,28 @@
// Controller for the montage view
/* jshint -W041 */
/* jslint browser: true*/
-/* global cordova,StatusBar,angular,console */
+/* global cordova,StatusBar,angular,console,ionic */
-angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '$rootScope', 'ZMDataModel', 'message', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', function ($scope, $rootScope, ZMDataModel, message, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http) {
+angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '$rootScope', 'ZMDataModel', 'message', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$stateParams','$ionicHistory',function ($scope, $rootScope, ZMDataModel, message, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http,$state, $stateParams, $ionicHistory) {
var timestamp = new Date().getUTCMilliseconds();
- $scope.isMinimal = false;
+ $scope.minimal = $stateParams.minimal;
+ $scope.isRefresh = $stateParams.isRefresh;
$scope.switchMinimal = function()
{
$scope.minimal = !$scope.minimal;
+ console.log ("Hide Statusbar");
+ ionic.Platform.fullScreen($scope.minimal,!$scope.minimal);
+ $interval.cancel(intervalHandle); //we will renew on reload
+ $ionicHistory.nextViewOptions({
+ disableAnimate: true,
+ disableBack: true
+ });
+ $state.go("montage", {minimal: $scope.minimal,
+ isRefresh:true});
+ //$state.reload();
};
$scope.togglePTZ = function () {
@@ -316,8 +327,10 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
//console.log ("**** NOTIFICATION with rand="+$scope.randomval+"*****");
};
+
var intervalHandle = $interval(function () {
this.loadNotifications();
+ // console.log ("Refreshing Image...");
}.bind(this), 1000);
this.loadNotifications();
diff --git a/www/js/app.js b/www/js/app.js
index 7832a7bf..a19f6a7d 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -6,8 +6,7 @@
// core app start stuff
angular.module('zmApp', [
'ionic',
- 'zmApp.controllers',
-
+ 'zmApp.controllers'
])
@@ -333,6 +332,7 @@ angular.module('zmApp', [
url: "/montage",
templateUrl: "templates/montage.html",
controller: 'zmApp.MontageCtrl',
+ params: {minimal:false, isRefresh:false}
});