summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpliablepixels <pliablepixels@gmail.com>2016-04-21 15:45:29 -0400
committerpliablepixels <pliablepixels@gmail.com>2016-04-21 15:45:29 -0400
commit2b9bd8037a0533f55cc37e35852263732f37f771 (patch)
tree867792d2302a5bb77addfc1879da667f7b07d9b1
parent3fe790551c69ba379615baffed6fa97a2d03399d (diff)
#229 - you can now tap on alarmed images
Former-commit-id: a644435fadcc4a96d6eceffa1cd963f67de3a1a5
-rw-r--r--www/js/EventCtrl.js11
-rw-r--r--www/templates/events.html2
2 files changed, 12 insertions, 1 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js
index 6bb83bd2..ab55822f 100644
--- a/www/js/EventCtrl.js
+++ b/www/js/EventCtrl.js
@@ -281,6 +281,17 @@ angular.module('zmApp.controllers')
});
+
+ //-------------------------------------------------------
+ // Tapping on a frame shows this image
+ //------------------------------------------------------
+
+ $scope.showImage = function (p,r,f, fid,e)
+ {
+ var img = "<img width='100%' ng-src='"+p+"/index.php?view=image&path="+r+f+"'>";
+ $rootScope.zmPopup = $ionicPopup.alert({title: 'frame:'+fid+'/Event:'+e,template:img, cssClass:'popup80'});
+ };
+
// not explictly handling error --> I have a default "No events found" message
diff --git a/www/templates/events.html b/www/templates/events.html
index c9400acb..f2369121 100644
--- a/www/templates/events.html
+++ b/www/templates/events.html
@@ -150,7 +150,7 @@
<figure style="display:inline-block">
<figcaption><p>frame:{{alarm.id}} score:{{alarm.score}}</p></figcaption>
- <img image-spinner-src="{{playbackURL}}/index.php?view=image&path={{event.Event.relativePath}}{{alarm.fname}}&height=380" style="width: auto; height: auto;max-width: 100%;max-height: 170px" />
+ <img image-spinner-src="{{playbackURL}}/index.php?view=image&path={{event.Event.relativePath}}{{alarm.fname}}&height=380" style="width: auto; height: auto;max-width: 100%;max-height: 170px" on-tap="showImage(playbackURL,event.Event.relativePath,alarm.fname, alarm.id, event.Event.Id)"/>
</figure>