summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorpliablepixels <pliablepixels@gmail.com>2016-01-25 17:04:20 -0500
committerpliablepixels <pliablepixels@gmail.com>2016-01-25 17:04:20 -0500
commitf815de3d4182b0218d175d3cf3efe5b1ce74d90e (patch)
tree5a7949f057e85c2238cbbe714848505a91905026 /www/js
parent27d1b22de74f6c6407d5a739772726a357cfe541 (diff)
trying out column balance, and other cleanups
Former-commit-id: 76b625b026e1cad972aed488793301039025bc3e
Diffstat (limited to 'www/js')
-rw-r--r--www/js/MontageCtrl.js8
-rw-r--r--www/js/app.js81
2 files changed, 29 insertions, 60 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index cd39a1c7..3631ad20 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -748,12 +748,14 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
//---------------------------------------------------------------------
$scope.onHold = function (index) {
montageIndex = index;
- isLongPressActive = true;
- intervalHandleMontage = $interval(function () {
+ //isLongPressActive = true;
+ scaleMontage();
+
+ /*intervalHandleMontage = $interval(function () {
scaleMontage();
}.bind(this), zm.montageScaleFrequency);
- console.log("****Interval handle started **********" + zm.montageScaleFrequency);
+ console.log("****Interval handle started **********" + zm.montageScaleFrequency);*/
};
//---------------------------------------------------------------------
diff --git a/www/js/app.js b/www/js/app.js
index 619ae051..e3f928eb 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -69,7 +69,9 @@ angular.module('zmApp', [
})
-
+// this can be used to route img-src through interceptors. Works well, but when
+// nph-zms streams images it doesn't work as success is never received
+// (keeps reading data). Hence not using it now
//credit: http://stackoverflow.com/questions/34958575/intercepting-img-src-via-http-interceptor-as-well-as-not-lose-the-ability-to-kee
.directive('httpSrc', [
'$http', 'imageLoadingDataShare', 'ZMDataModel',
@@ -120,62 +122,6 @@ angular.module('zmApp', [
])
-
-
-
-
-//credit http://stackoverflow.com/questions/20997406/force-http-interceptor-in-dynamic-ngsrc-request
-.directive('httpSrcOld', [
- '$http', 'imageLoadingDataShare', 'ZMDataModel', function ($http, imageLoadingDataShare, ZMDataModel) {
- var directive = {
- link: link,
- restrict: 'A'
- };
- return directive;
-
- function link(scope, element, attrs) {
-
- console.log ("HELLO OLD");
-
- var requestConfig = {
- method: 'Get',
- url: attrs.httpSrcOld,
- responseType: 'arraybuffer',
- cache: 'true'
- };
-
- console.log ("Calling " + requestConfig.url);
- imageLoadingDataShare.set(1);
- $http(requestConfig)
- .success(function(data) {
-
- console.log ("data got " + JSON.stringify(data));
- var arr = new Uint8Array(data);
-
- var raw = '';
- var i, j, subArray, chunk = 5000;
- for (i = 0, j = arr.length; i < j; i += chunk) {
- subArray = arr.subarray(i, i + chunk);
- raw += String.fromCharCode.apply(null, subArray);
- }
-
- var b64 = btoa(raw);
-
- attrs.$set('src', "data:image/jpeg;base64," + b64);
- imageLoadingDataShare.set(0);
- })
- .error (function(data) {
- attrs.$set('src', 'img/novideo.png');
- imageLoadingDataShare.set(0);
- ZMDataModel.zmDebug ("Inside http-src err");
- });
-
- }
-
- }
- ])
-
-
//------------------------------------------------------------------
// switch between collection repeat or ng-repeat
//-------------------------------------------------------------------
@@ -1254,6 +1200,27 @@ angular.module('zmApp', [
templateUrl: "templates/first-use.html",
controller: 'zmApp.FirstUseCtrl',
})
+
+ .state('montage-history', {
+ data: {
+ requireLogin: true
+ },
+ resolve: {
+ message: function (ZMDataModel) {
+ console.log("Inside app.events resolve");
+ return ZMDataModel.getMonitors(0);
+ }
+
+ },
+ url: "/montage-history",
+ templateUrl: "templates/montage-history.html",
+ controller: 'zmApp.MontageHistoryCtrl',
+ params: {
+ minimal: false,
+ isRefresh: false
+ }
+
+ })
.state('montage', {
data: {