Skip to content

Commit

Permalink
#229 - you can now tap on alarmed images
Browse files Browse the repository at this point in the history
  • Loading branch information
pliablepixels committed Apr 21, 2016
1 parent e155261 commit 7263939
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions www/js/EventCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion www/templates/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 7263939

Please sign in to comment.