summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/external/angular.dcb-img-fallback.min.js1
-rw-r--r--www/index.html2
-rw-r--r--www/js/EventCtrl.js106
-rw-r--r--www/js/app.js3
-rw-r--r--www/lang/locale-en.json31
-rw-r--r--www/templates/events.html9
6 files changed, 114 insertions, 38 deletions
diff --git a/www/external/angular.dcb-img-fallback.min.js b/www/external/angular.dcb-img-fallback.min.js
new file mode 100644
index 00000000..862377f8
--- /dev/null
+++ b/www/external/angular.dcb-img-fallback.min.js
@@ -0,0 +1 @@
+"use strict";!function(){angular.module("dcbImgFallback",[]).directive("fallbackSrc",["imageService",function(A){return{restrict:"A",link:function(M,g,I){var i=I.fallbackSrc?A.setMissing(I.fallbackSrc):A.getMissing(),D=function(){var M=I.fallbackSrc?A.setMissing(I.fallbackSrc):A.getMissing();g[0].src!==M&&(g[0].src=M)};g[0].src===A.getLoading()&&(g[0].src=i),g.on("error",D),M.$on("$destroy",function(){g.off("error",D)})}}}]).directive("loadingSrc",["$interpolate","imageService",function(A,M){var g=function(g,I,i){I[0].src=i.loadingSrc?M.setLoading(i.loadingSrc):M.getLoading();var D=new Image;D.src=A(i.imgSrc)(g),D.onload=function(){D.onload=null,I[0].src!==D.src&&(I[0].src=D.src)}};return{restrict:"A",compile:function(A,M){return M.imgSrc=M.ngSrc,delete M.ngSrc,g}}}]).factory("imageService",function(){var A="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAwIDEwMDAiPjxkZWZzPjxyYWRpYWxHcmFkaWVudCBpZD0icmFkaWFsLWdyYWRpZW50IiBjeD0iNTAwIiBjeT0iNTAwIiByPSI1MDAiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNkZmRmZGYiLz48c3RvcCBvZmZzZ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wIDAgMSA1NzIgNDUwWk01ODYgNTcySDQxNFY1NDNsNTAtODYgNTggNzJoMTRsNTAtNDN2ODZaIi8+PC9zdmc+";return{getLoading:function(){return M},getMissing:function(){return g},setLoading:function(A){return M=A},setMissing:function(A){return g=A}}})}(); \ No newline at end of file
diff --git a/www/index.html b/www/index.html
index fbc4d5a8..7da97e38 100644
--- a/www/index.html
+++ b/www/index.html
@@ -46,6 +46,7 @@
<script src="lib/ng-mfb/src/mfb-directive.js"></script>
<script src="lib/angular-touch/angular-touch.min.js"></script>
+
<!-- unmanaged externals -->
<script src="external/moment-timezone-with-data.min.js"></script>
<script src="external/angular-ios9-uiwebview.patch.js"></script>
@@ -67,6 +68,7 @@
<script src="external/polyfill.min.js"></script>
<script src="external/gifwriter.min.js"></script>
<script src="external/NeuQuant.min.js"></script>
+ <script src="external/angular.dcb-img-fallback.min.js"></script>
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js
index 3af0de79..bde55b86 100644
--- a/www/js/EventCtrl.js
+++ b/www/js/EventCtrl.js
@@ -63,6 +63,8 @@ angular.module('zmApp.controllers')
var nolangTo;
$scope.typeOfFrames = $translate.instant('kShowTimeDiffFrames');
+ $scope.outlineMotion = false;
+ $scope.outlineMotionParam = "";
var eventsListScrubHeight = eventsListScrubHeight;
var eventsListDetailsHeight = eventsListDetailsHeight;
@@ -808,11 +810,18 @@ angular.module('zmApp.controllers')
// console.log ("parray : " + JSON.stringify(parray));
// console.log ("index: " + ndx);
if ($scope.imode == 'path')
+ {
+ if ($scope.outlineMotion)
+ $scope.imgsrc = p + "/index.php?view=image&path=" + r + $scope.parray[$scope.ndx].aname;
+ else
+ $scope.imgsrc = p + "/index.php?view=image&path=" + r + $scope.parray[$scope.ndx].fname;
+ $scope.fallbackImgSrc = p + "/index.php?view=image&path=" + r + $scope.parray[$scope.ndx].fname;
+ }
- $scope.imgsrc = p + "/index.php?view=image&path=" + r + $scope.parray[$scope.ndx].fname;
else
{
- $scope.imgsrc = p + "/index.php?view=image&fid=" + $scope.parray[$scope.ndx].id;
+ $scope.imgsrc = p + "/index.php?view=image&fid=" + $scope.parray[$scope.ndx].id+$scope.outlineMotionParam;
+ $scope.fallbackImgSrc = p + "/index.php?view=image&fid=" + $scope.parray[$scope.ndx].id;
}
@@ -820,7 +829,7 @@ angular.module('zmApp.controllers')
$rootScope.zmPopup = $ionicPopup.show(
{
- template: '<center>' + $translate.instant('kFrame') + ':{{parray[ndx].frameid}}@{{prettifyTimeSec(parray[ndx].time)}}</center><br/><img src="{{imgsrc}}" width="100%" />',
+ template: '<center>' + $translate.instant('kFrame') + ':{{parray[ndx].frameid}}@{{prettifyTimeSec(parray[ndx].time)}}</center><br/><img ng-src="{{imgsrc}}" fallback-src="{{fallbackImgSrc}}" width="100%" />',
title: $translate.instant('kImages') + " (" + $translate.instant($scope.typeOfFrames) + ")",
subTitle: 'use left and right arrows to change',
scope: $scope,
@@ -861,15 +870,22 @@ angular.module('zmApp.controllers')
if (nndx == null) nndx = $scope.ndx;
$scope.ndx = nndx;
- if ($scope.imode == 'path')
- {
+ if ($scope.imode == 'path')
+ {
+ if ($scope.outlineMotion)
+ $scope.imgsrc = p + "/index.php?view=image&path=" + r + $scope.parray[$scope.ndx].aname;
+ else
+ $scope.imgsrc = p + "/index.php?view=image&path=" + r + $scope.parray[$scope.ndx].fname;
+ $scope.fallbackImgSrc = p + "/index.php?view=image&path=" + r + $scope.parray[$scope.ndx].fname;
+ }
+
+ else
+ {
+ $scope.imgsrc = p + "/index.php?view=image&fid=" + $scope.parray[$scope.ndx].id+$scope.outlineMotionParam;
+ $scope.fallbackImgSrc = p + "/index.php?view=image&fid=" + $scope.parray[$scope.ndx].id;
+
+ }
- $scope.imgsrc = p + "/index.php?view=image&path=" + r + $scope.parray[$scope.ndx].fname;
- }
- else
- {
- $scope.imgsrc = p + "/index.php?view=image&fid=" + $scope.parray[$scope.ndx].id;
- }
e.preventDefault();
@@ -901,14 +917,21 @@ angular.module('zmApp.controllers')
$scope.ndx = nndx;
if ($scope.imode == 'path')
- {
+ {
+ if ($scope.outlineMotion)
+ $scope.imgsrc = p + "/index.php?view=image&path=" + r + $scope.parray[$scope.ndx].aname;
+ else
+ $scope.imgsrc = p + "/index.php?view=image&path=" + r + $scope.parray[$scope.ndx].fname;
+ $scope.fallbackImgSrc = p + "/index.php?view=image&path=" + r + $scope.parray[$scope.ndx].fname;
+ }
+
+ else
+ {
+ $scope.imgsrc = p + "/index.php?view=image&fid=" + $scope.parray[$scope.ndx].id+$scope.outlineMotionParam;
+ $scope.fallbackImgSrc = p + "/index.php?view=image&fid=" + $scope.parray[$scope.ndx].id;
+
+ }
- $scope.imgsrc = p + "/index.php?view=image&path=" + r + $scope.parray[$scope.ndx].fname;
- }
- else
- {
- $scope.imgsrc = p + "/index.php?view=image&fid=" + $scope.parray[$scope.ndx].id;
- }
e.preventDefault();
@@ -927,6 +950,15 @@ angular.module('zmApp.controllers')
};
+ $scope.toggleMotionOutline = function()
+ {
+ $scope.outlineMotion = !$scope.outlineMotion;
+ if ($scope.outlineMotion)
+ $scope.outlineMotionParam = "&show=analyse";
+ else
+ $scope.outlineMotionParam = "";
+ };
+
$scope.toggleTypeOfAlarms = function()
{
// "kShowAllFrames" : "all",
@@ -1670,10 +1702,37 @@ angular.module('zmApp.controllers')
.success(function(data)
{
$ionicLoading.hide();
- NVRDataModel.debug("delete success: " + JSON.stringify(data));
- NVRDataModel.displayBanner('info', [$translate.instant('kDeleteEventSuccess')], 2000, 2000);
+ NVRDataModel.debug("delete output: " + JSON.stringify(data));
+
+ if (data.data.message == 'Error')
+ {
+ $ionicLoading.show(
+ {
+ template: "{{'kError' | translate}}...",
+ noBackdrop: true,
+ duration: 1500
+ });
+
+ }
+ else
+ {
+
+
+ $ionicLoading.show(
+ {
+ template: "{{'kSuccess' | translate}}...",
+ noBackdrop: true,
+ duration: 1000
+ });
+ $scope.events.splice(itemid, 1);
+
+ }
+
+ // NVRDataModel.displayBanner('info', [$translate.instant('kDeleteEventSuccess')], 2000, 2000);
+
+
+
- $scope.events.splice(itemid, 1);
//doRefresh();
})
@@ -1999,6 +2058,8 @@ angular.module('zmApp.controllers')
function toggleGroup(event, ndx, frames, groupType)
{
+ $ionicListDelegate.canSwipeItems(true);
+ NVRDataModel.debug ("enabling options swipe");
// If we are here and there is a record of a previous scroll
// then we need to scroll back to hide that view
@@ -2027,6 +2088,8 @@ angular.module('zmApp.controllers')
if (groupType == 'alarms')
{
+ $ionicListDelegate.canSwipeItems(false);
+ NVRDataModel.debug ("Disabling flag swipe as alarms are swipable");
$scope.alarm_images = [];
event.Event.height = (eventsListDetailsHeight + eventsListScrubHeight);
$ionicScrollDelegate.resize();
@@ -2065,6 +2128,7 @@ angular.module('zmApp.controllers')
frameid: data.event.Frame[i].FrameId,
score: data.event.Frame[i].Score,
fname: padToN(data.event.Frame[i].FrameId, eventImageDigits) + "-capture.jpg",
+ aname:padToN(data.event.Frame[i].FrameId, eventImageDigits) + "-analyse.jpg",
time: data.event.Frame[i].TimeStamp
});
timestamp = data.event.Frame[i].TimeStamp;
diff --git a/www/js/app.js b/www/js/app.js
index 0e7f13ee..7b95eddc 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -27,7 +27,8 @@ angular.module('zmApp', [
'mgo-angular-wizard',
'pascalprecht.translate',
'jett.ionic.scroll.sista',
- 'uk.ac.soton.ecs.videogular.plugins.cuepoints'
+ 'uk.ac.soton.ecs.videogular.plugins.cuepoints',
+ 'dcbImgFallback'
])
diff --git a/www/lang/locale-en.json b/www/lang/locale-en.json
index e214a366..8685f398 100644
--- a/www/lang/locale-en.json
+++ b/www/lang/locale-en.json
@@ -109,6 +109,7 @@
"kExploreEnjoy" :"Please explore the menu and enjoy",
"kFallback" :"Fallback configuration",
"kFallback2Configs" :"You need to have at least 2 distinct configurations created for a fallback",
+ "kFalse" :"false",
"kFastForward" :"fast forward",
"kFastRewind" :"fast rewind",
"kFillScreen" :"fill screen",
@@ -130,14 +131,14 @@
"kFrom" :"From",
"kFromDate" :"From Date",
"kFromTime" :"From Time",
+ "kGifNoCrosswalk" :"Sorry, you need to be on Android 5.0 (Lollipop) or above for this feature to work.",
"kGifWarning" :"The GIF animation will only be of alarmed frames and 1fps",
- "kGifNoCrosswalk" : "Sorry, you need to be on Android 5.0 (Lollipop) or above for this feature to work.",
"kGlobalConfiguration" :"Global Configuration",
"kGraphAlarmed" :"alarmed",
"kGraphAll" :"all",
"kGraphError" :"there was an error rendering the graph. Please see logs",
"kH264VideoSupport" :"H264 Video support",
- "kHelp" : "Help",
+ "kHelp" :"Help",
"kHideMonsWithoutEvents" :"Hide monitors without events",
"kHideTip" :"hide tip",
"kHighBWDisplay" :"high bandwidth",
@@ -150,16 +151,16 @@
"kImpMsg5" :"Reported Version",
"kImpMsg6" :"Recommended Version",
"kImpMsg7" :"Ok, got it",
- "kInvalidAPIHeader" : "Invalid API",
- "kInvalidAPIBody" : "API access failed. Please make sure your APIs are configured correctly. Tap on the button below to read the instructions",
- "kInvalidAPIRead" : "Read FAQ",
"kIncreaseSize" :"increase size",
+ "kInvalidAPIBody" :"API access failed. Please make sure your APIs are configured correctly. Tap on the button below to read the instructions",
+ "kInvalidAPIHeader" :"Invalid API",
+ "kInvalidAPIRead" :"Read FAQ",
"kLanguage" :"Language",
"kLatestEvents" :"latest events",
"kLiveView" :"Live View",
"kLoad" :"load",
"kLoading" :"loading",
- "kLoadingEvents" : "loading events",
+ "kLoadingEvents" :"loading events",
"kLoadingGraph" :"loading graph",
"kLoadingMonitors" :"loading monitors",
"kLocalTimeZone" :"use local timezone",
@@ -214,8 +215,8 @@
"kMore" :"more",
"kNeedToKnow" :"I need to know your ZoneMinder login and path details to get started",
"kNegotiatingStreamAuth" :"negotiating stream authentication",
+ "kNewPost" :"new post",
"kNews" :"News (latest 10)",
- "kNewPost" : "new post",
"kNext" :"Next",
"kNextEvent" :"next event",
"kNextMonitor" :"next monitor",
@@ -223,7 +224,7 @@
"kNoMonitors" :"No monitors to display",
"kNoMoreEvents" :"no more events",
"kNormalPlay" :"normal play",
- "kNote" : "Note",
+ "kNote" :"Note",
"kNow" :"now",
"kOff" :"off",
"kOn" :"on",
@@ -232,6 +233,7 @@
"kOnlyUseWebSocket" :"only use websockets",
"kOperationInProgressBody" :"The previous operation is still in progress. Please wait",
"kOperationInProgressTitle" :"Operation in Progress",
+ "kOutlineMotion" :"outline motion",
"kPTZ" :"pan/tilt/zoom",
"kPTZNotReady" :"Not ready for PTZ",
"kPTZnotConfigured" :"PTZ not configured for this monitor",
@@ -293,10 +295,10 @@
"kSec" :"sec",
"kSelect" :"Please Select",
"kSelectDelete" :"Selected profile will be deleted",
- "kSelectSwitch" :"Selected profile will be loaded",
"kSelectFallback" :"Select fallback",
"kSelectLanguage" :"Select Language",
"kSelectRunState" :"Select run state",
+ "kSelectSwitch" :"Selected profile will be loaded",
"kSendingPTZ" :"Sending PTZ",
"kSensitiveBody" :"will modify the logs when creating the final output to remove sensitive data like urls and passwords. However it is eventually your responsibility to make sure there is no sensitive data in the logs. Please make sure you review and edit the logs before you send it out",
"kSensitiveTitle" :"Sensitive Information",
@@ -343,9 +345,10 @@
"kToDate" :"To Date",
"kToTime" :"To Time",
"kToastSearchingPage" :"searching page ",
+ "kTrue" :"true",
"kTrying" :"trying",
"kType" :"type",
- "kUnflag" : "Unflag",
+ "kUnflag" :"Unflag",
"kUnknown" :"(unknown)",
"kUpdateTimeline" :"dynamic updates",
"kUseEventServer" :"Use event server",
@@ -359,10 +362,10 @@
"kVersionIncompatible" :"I am incompatible with your ZoneMinder version",
"kVibrateOnPush" :"Vibrate on push",
"kVideo" :"Video",
- "kVideoError" : "Video not playable.",
- "kVideoErrorMobile" : "Video not playable. Try enabling 'force image path for events' in Dev Settings. The format may also be incompatible with a mobile system view",
- "kVideoLoading" : "Loading Video",
- "kVideoMp4Warning" : "It is currently not possible to know when video is fully downloaded. Please track file size of download.",
+ "kVideoError" :"Video not playable.",
+ "kVideoErrorMobile" :"Video not playable. Try enabling 'force image path for events' in Dev Settings. The format may also be incompatible with a mobile system view",
+ "kVideoLoading" :"Loading Video",
+ "kVideoMp4Warning" :"It is currently not possible to know when video is fully downloaded. Please track file size of download.",
"kWake" :"Wake",
"kWarningLargeTimeline" :"A large value can affect timeline performance. If you find timeline performance slow, try reducing the value to 200 and work your way up from there.",
"kWeek" :"Week",
diff --git a/www/templates/events.html b/www/templates/events.html
index cb6809f3..a14452bc 100644
--- a/www/templates/events.html
+++ b/www/templates/events.html
@@ -121,6 +121,10 @@
<button ng-click="toggleTypeOfAlarms()" class="button button-small button-assertive button-outline">
<span translate="kType"></span>:{{typeOfFrames}}
</button>
+ <button
+ ng-click="toggleMotionOutline()" class="button button-small button-assertive button-outline">
+ <span translate="kOutlineMotion"></span>:{{outlineMotion}}
+ </button>
</p>
<ion-scroll direction="x" overflow-scroll="false">
<span ng-repeat="alarm in alarm_images | selectFrames: typeOfFrames">
@@ -128,8 +132,9 @@
<figure class = "animated slideInLeft" style="display:inline-block">
<!--{{event.Event.baseURL}} p:{{event.Event.imageMode}}-->
<figcaption class="smallnote"><span translate="kFrame"></span>:{{alarm.frameid}},<span translate="kScore"></span>:{{alarm.score}}, <span translate="kTime"></span>: {{prettifyTimeSec(alarm.time)}}</figcaption>
- <img ng-if="event.Event.imageMode=='path'" image-spinner-src="{{event.Event.baseURL}}/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(event.Event.baseURL,event.Event.relativePath,alarm.fname, alarm.frameid, event.Event.Id, event.Event.imageMode, alarm.id, alarm_images, $index)" />
- <img ng-if="event.Event.imageMode=='fid'" image-spinner-src="{{event.Event.baseURL}}/index.php?view=image&fid={{alarm.id}}" style="width: auto; height: auto;max-width: 100%;max-height: 170px" on-tap="showImage(event.Event.baseURL,event.Event.relativePath,alarm.fname, alarm.frameid, event.Event.Id, event.Event.imageMode, alarm.id, alarm_images, $index)" />
+ <img ng-if="event.Event.imageMode=='path'" ng-src="{{event.Event.baseURL}}/index.php?view=image&path={{event.Event.relativePath}}{{outlineMotion? alarm.aname:alarm.fname}}&height=380" fallback-src="{{event.Event.baseURL}}/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(event.Event.baseURL,event.Event.relativePath,alarm.fname, alarm.frameid, event.Event.Id, event.Event.imageMode, alarm.id, alarm_images, $index)" />
+
+ <img ng-if="event.Event.imageMode=='fid'" ng-src="{{event.Event.baseURL}}/index.php?view=image&fid={{alarm.id}}{{outlineMotionParam}}" fallback-src="{{event.Event.baseURL}}/index.php?view=image&fid={{alarm.id}}" style="width: auto; height: auto;max-width: 100%;max-height: 170px" on-tap="showImage(event.Event.baseURL,event.Event.relativePath,alarm.fname, alarm.frameid, event.Event.Id, event.Event.imageMode, alarm.id, alarm_images, $index)" />
</figure>
</span>
</ion-scroll>