From f5fa4aff8e9c9f9317d10dddf77c4f6a4607dea6 Mon Sep 17 00:00:00 2001 From: Arjun Roychowdhury Date: Sat, 7 Nov 2015 16:00:22 -0500 Subject: #67 - make mousewheel work in desktop mode Former-commit-id: 804af14ecf932ca4f4bc2f3cbc4a3261cc096f30 --- www/js/app.js | 22 +++++ www/templates/events.html | 202 +++++++++++++++++++++++----------------------- 2 files changed, 121 insertions(+), 103 deletions(-) (limited to 'www') diff --git a/www/js/app.js b/www/js/app.js index d65e6d33..4d076f30 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -66,6 +66,28 @@ angular.module('zmApp', [ desktopApiUrl: "/api/zm" }) + + +//------------------------------------------------------------------ +// switch between collection repeat or ng-repeat +//------------------------------------------------------------------- +.directive('repeat', function ($compile, $rootScope) { + return { + restrict: 'A', + priority: 2000, + terminal: true, + link: function (scope, element) { + var repeatDirective = ($rootScope.platformOS == 'desktop') ? 'ng-repeat' : 'collection-repeat'; + //console.log ("*********** REPEAT SCROLL IS " + repeatDirective); + + element.attr(repeatDirective, element.attr('repeat')); + element.removeAttr('repeat'); + $compile(element)(scope); + } + }; +}) + + //------------------------------------------------------------------ // I use this factory to share data between carousel and lazy load // carousel will not progress autoslide till imageLoading is 0 or -1 diff --git a/www/templates/events.html b/www/templates/events.html index 5492289c..58ed0eca 100644 --- a/www/templates/events.html +++ b/www/templates/events.html @@ -36,75 +36,75 @@
- -
- + -      {{prettifyTime(event.Event.StartTime)}} + -      {{prettifyDate(event.Event.StartTime)}} +      {{prettifyTime(event.Event.StartTime)}} +      {{prettifyDate(event.Event.StartTime)}} -
-
- -
-
+
+
- -
- -
-
+ +
+
-
- -
- -
-
+
+
+
+ +
+
-
- -
- -
-
+
+
+
+ +
+
+
- - +
+ + -
- +
+ {{event.Event.Length}}s +
+ +
+
+ + {{event.Event.MonitorName}} ({{event.Event.Name}})
- -
-
- - {{event.Event.MonitorName}} ({{event.Event.Name}}) -
- {{event.Event.Frames}}   - {{event.Event.AlarmFrames}}   - {{event.Event.TotScore}} -
+ {{event.Event.Frames}}   + {{event.Event.AlarmFrames}}   + {{event.Event.TotScore}}
- +
+ -
-
  {{prettify(event.Event.StartTime)}} -
-   {{event.Event.Notes}} - -
+
+
  {{prettify(event.Event.StartTime)}} +
+   {{event.Event.Notes}} +
- - +
+ +