From 976f50450cf338d03306ec715f6138ca19750d21 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sat, 23 Dec 2017 10:58:33 -0500 Subject: #576 eliminate reload for filters --- www/external/ion-pullup.min.js | 11 +- www/external/origjs/README.TXT | 1 + www/external/origjs/ion-pullup.js | 600 ++++++++++++++++------------ www/external/origjs/ion-pullup.js.23Dec2017 | 261 ++++++++++++ www/js/EventCtrl.js | 48 ++- www/js/MomentCtrl.js | 1 + www/templates/events.html | 4 +- www/templates/moment.html | 2 +- 8 files changed, 653 insertions(+), 275 deletions(-) mode change 100755 => 100644 www/external/origjs/ion-pullup.js create mode 100755 www/external/origjs/ion-pullup.js.23Dec2017 diff --git a/www/external/ion-pullup.min.js b/www/external/ion-pullup.min.js index 047f0837..efbcc552 100644 --- a/www/external/ion-pullup.min.js +++ b/www/external/ion-pullup.min.js @@ -1,10 +1 @@ -angular.module("ionic-pullup",[]).constant("ionPullUpFooterState",{COLLAPSED:"COLLAPSED",MINIMIZED:"MINIMIZED",EXPANDED:"EXPANDED"}).constant("ionPullUpFooterBehavior",{HIDE:"HIDE",EXPAND:"EXPAND"}).directive("ionPullUpFooter",["$timeout","$rootScope","$window","$ionicPlatform",function(t,e,n,i){return{restrict:"AE",scope:{onExpand:"&",onCollapse:"&",onMinimize:"&"},controller:["$scope","$element","$attrs","ionPullUpFooterState","ionPullUpFooterBehavior",function(o,a,r,s,l){function u(){c(),a.css({transition:"300ms ease-in-out",padding:0}),P&&E&&a.css("bottom",P.offsetHeight+"px")}function c(){P=document.querySelector(".tabs"),E=document.querySelector(".tabs-bottom"),D=document.querySelector(".bar-header"),H=P?P.offsetHeight:0,x=D?D.offsetHeight:0}function p(){I.height=I.maxHeight>0?I.maxHeight:n.innerHeight-x-v-H,"ios"==e.platformOS&&(I.height-=60),"android"==e.platformOS&&(I.height-=40),a.css({height:I.height+"px"}),I.initialState==s.MINIMIZED?m():f()}function h(){t(function(){p()},300),a.css({transition:"none",padding:0})}function d(){c(),I.height=I.maxHeight>0?I.maxHeight:n.innerHeight-x-v-H,"ios"==e.platformOS&&(I.height-=60),"android"==e.platformOS&&(I.height-=40)}function g(){d(),I.lastPosY=0,a.css({height:I.height+"px","-webkit-transform":"translate3d(0, 0, 0)",transform:"translate3d(0, 0, 0)"}),a.css({transition:"300ms ease-in-out",padding:0}),o.onExpand(),I.state=s.EXPANDED}function f(){I.lastPosY=P&&E?I.height-H:I.height-I.defaultHeight,a.css({"-webkit-transform":"translate3d(0, "+I.lastPosY+"px, 0)",transform:"translate3d(0, "+I.lastPosY+"px, 0)"}),o.onCollapse(),I.state=s.COLLAPSED}function m(){I.lastPosY=I.height,a.css({"-webkit-transform":"translate3d(0, "+I.lastPosY+"px, 0)",transform:"translate3d(0, "+I.lastPosY+"px, 0)"}),o.onMinimize(),I.state=s.MINIMIZED}var P,E,D,H,x,v=0,I={height:0,posY:0,lastPosY:0,state:s.COLLAPSED,defaultHeight:a[0].offsetHeight,maxHeight:parseInt(r.maxHeight,10)||0,initialState:r.initialState?r.initialState.toUpperCase():s.COLLAPSED,defaultBehavior:r.defaultBehavior?r.defaultBehavior.toUpperCase():l.EXPAND} -this.setHandleHeight=function(t){v=t,p()},this.getHeight=function(){return a[0].offsetHeight},this.getBackground=function(){return n.getComputedStyle(a[0]).background},this.onTap=function(t){t.gesture.srcEvent.preventDefault(),t.gesture.preventDefault(),I.state==s.COLLAPSED?I.defaultBehavior==l.HIDE?m():g():I.state==s.MINIMIZED?I.defaultBehavior==l.HIDE?f():g():I.initialState==s.MINIMIZED?m():f(),e.$broadcast("ionPullUp:tap",I.state)},this.onDrag=function(t){switch(t.gesture.srcEvent.preventDefault(),t.gesture.preventDefault(),t.type){case"dragstart":a.css("transition","none") -break -case"drag":if(I.posY=Math.round(t.gesture.deltaY)+I.lastPosY,I.posY<0||I.posY>I.height)return -a.css({"-webkit-transform":"translate3d(0, "+I.posY+"px, 0)",transform:"translate3d(0, "+I.posY+"px, 0)"}) -break -case"dragend":a.css({transition:"300ms ease-in-out"}),I.lastPosY=I.posY}},u(),i.ready(function(){n.addEventListener("orientationchange",h),i.on("resume",h)})}],compile:function(t,e){e.defaultHeight&&t.css("height",parseInt(e.defaultHeight,10)+"px"),t.addClass("bar bar-footer")}}}]).directive("ionPullUpContent",[function(){return{restrict:"AE",require:"^ionPullUpFooter",link:function(t,e,n,i){var o=i.getHeight() -e.css({display:"block","margin-top":o+"px",width:"100%"}),n.scroll&&"TRUE"==n.scroll.toUpperCase()&&e.css({"overflow-y":"scroll","overflow-x":"hidden"})}}}]).directive("ionPullUpBar",[function(){return{restrict:"AE",require:"^ionPullUpFooter",link:function(t,e,n,i){var o=i.getHeight() -e.css({display:"flex",height:o+"px",position:"absolute",right:"0",left:"0"})}}}]).directive("ionPullUpTrigger",["$ionicGesture",function(t){return{restrict:"AE",require:"^ionPullUpFooter",link:function(e,n,i,o){t.on("tap",o.onTap,n),t.on("drag dragstart dragend",o.onDrag,n)}}}]).directive("ionPullUpHandle",["$ionicGesture","$ionicPlatform","$timeout","$window",function(t,e,n,i){return{restrict:"AE",require:"^ionPullUpFooter",link:function(o,a,r,s){function l(){n(function(){a.css("left",(i.innerWidth-c)/2+"px")},300)}var u=parseInt(r.height,10)||25,c=parseInt(r.width,10)||100,p=s.getBackground(),h=r.toggle -s.setHandleHeight(u),a.css({display:"block",background:p,position:"absolute",top:1-u+"px",left:(i.innerWidth-c)/2+"px",height:u+"px",width:c+"px","text-align":"center"}),t.on("tap",s.onTap,a),t.on("drag dragstart dragend",s.onDrag,a),o.$on("ionPullUp:tap",function(){a.find("i").toggleClass(h)}),e.ready(function(){i.addEventListener("orientationchange",l),e.on("resume",l)})}}}]) +angular.module("ionic-pullup",[]).constant("ionPullUpFooterState",{COLLAPSED:"COLLAPSED",MINIMIZED:"MINIMIZED",EXPANDED:"EXPANDED"}).constant("ionPullUpFooterBehavior",{HIDE:"HIDE",EXPAND:"EXPAND"}).directive("ionPullUpFooter",[function(){return{restrict:"AE",scope:{state:"=?",onExpand:"&",onCollapse:"&",onMinimize:"&",allowMidRange:"="},controller:["$scope","$element","$attrs","$timeout","$rootScope","$window","$ionicPlatform","ionPullUpFooterState","ionPullUpFooterBehavior",function(t,e,o,n,i,a,s,r,l){function c(){var t=e[0];f=t.closest("ion-tabs"),g=f&&f.classList.contains("tabs-bottom"),E=document.querySelector("ion-nav-bar .nav-bar-block[nav-bar=entering] > .bar-header"),D=f?f.querySelector(".tabs").offsetHeight:0,I=E?E.offsetHeight:0}function u(){n(function(){m.height=m.maxHeight>0?m.maxHeight:a.innerHeight-I-P-D,m.height-=50,"ios"==i.platformOS&&(m.height-=30),e.css({height:m.height+"px"}),m.initialState==r.MINIMIZED?d():p()},300),e.css({transition:"none",padding:0})}function h(){c(),m.height=m.maxHeight>0?m.maxHeight:a.innerHeight-I-P-D,m.height-=50,"ios"==i.platformOS&&(m.height-=30),m.lastPosY=0,e.css({height:m.height+"px","-webkit-transform":"translate3d(0, 0, 0)",transform:"translate3d(0, 0, 0)"}),e.css({transition:"300ms ease-in-out",padding:0}),t.onExpand(),t.state=r.EXPANDED}function p(){m.lastPosY=f?m.height-D:m.height-m.defaultHeight,e.css({"-webkit-transform":"translate3d(0, "+m.lastPosY+"px, 0)",transform:"translate3d(0, "+m.lastPosY+"px, 0)"}),t.onCollapse(),t.state=r.COLLAPSED}function d(){m.lastPosY=m.height,e.css({"-webkit-transform":"translate3d(0, "+m.lastPosY+"px, 0)",transform:"translate3d(0, "+m.lastPosY+"px, 0)"}),t.onMinimize(),t.state=r.MINIMIZED}var f,g,E,D,I,P=0,m={height:0,posY:0,lastPosY:0,defaultHeight:e[0].offsetHeight,maxHeight:parseInt(o.maxHeight,10)||0,initialState:o.initialState?o.initialState.toUpperCase():r.COLLAPSED,defaultBehavior:o.defaultBehavior?o.defaultBehavior.toUpperCase():l.EXPAND};this.$onInit=function(){n(function(){c(),e.css({transition:"300ms ease-in-out",padding:0}),f&&g&&e.css("bottom",D+"px")}),u()},this.setHandleHeight=function(t){P=t},this.getHeight=function(){return e[0].offsetHeight},this.getBackground=function(){return a.getComputedStyle(e[0]).background},this.getInitialState=function(){return m.initialState},this.getDefaultBehavior=function(){return m.defaultBehavior},this.onTap=function(e){e.gesture.srcEvent.preventDefault(),e.gesture.preventDefault(),n(function(){t.state==r.COLLAPSED?m.defaultBehavior==l.HIDE?t.state=r.MINIMIZED:t.state=r.EXPANDED:t.state==r.MINIMIZED?m.defaultBehavior==l.HIDE?t.state=r.COLLAPSED:t.state=r.EXPANDED:t.state=m.initialState==r.MINIMIZED?r.MINIMIZED:r.COLLAPSED})},this.onDrag=function(o){switch(o.gesture.srcEvent.preventDefault(),o.gesture.preventDefault(),o.type){case"dragstart":e.css("transition","none");break;case"drag":if(m.posY=Math.round(o.gesture.deltaY)+m.lastPosY,m.posY<0||m.posY>m.height)return;e.css({"-webkit-transform":"translate3d(0, "+m.posY+"px, 0)",transform:"translate3d(0, "+m.posY+"px, 0)"});break;case"dragend":e.css({transition:"300ms ease-in-out"}),t.allowMidRange?m.lastPosY=m.posY:n(function(){m.lastPosY>m.posY?t.state=r.EXPANDED:m.lastPosY"),this.$onInit=function(){var t=this.FooterController;a.on("tap",t.onTap,e),a.on("drag dragstart dragend",t.onDrag,e),t.setHandleHeight(h);c(t.getInitialState(),t.getDefaultBehavior()),u()},t.$on("ionPullUp:tap",function(t,e,o){c(e,o)}),s.ready(function(){l.addEventListener("orientationchange",u),s.on("resume",u)})}]}); diff --git a/www/external/origjs/README.TXT b/www/external/origjs/README.TXT index 19a2b36d..96602ef5 100644 --- a/www/external/origjs/README.TXT +++ b/www/external/origjs/README.TXT @@ -1,3 +1,4 @@ These are original JS files. I minified then in externals/ using npm minify + minify file.js > ../file.min.js ~pp diff --git a/www/external/origjs/ion-pullup.js b/www/external/origjs/ion-pullup.js old mode 100755 new mode 100644 index ae9109a8..9c0b2470 --- a/www/external/origjs/ion-pullup.js +++ b/www/external/origjs/ion-pullup.js @@ -1,261 +1,363 @@ +/* +ionic-pullup v1.1.0 + +Copyright 2016 Ariel Faur (https://github.com/arielfaur) + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + angular.module('ionic-pullup', []) - .constant('ionPullUpFooterState', { - COLLAPSED: 'COLLAPSED', - MINIMIZED: 'MINIMIZED', - EXPANDED: 'EXPANDED' - }) - .constant('ionPullUpFooterBehavior', { - HIDE: 'HIDE', - EXPAND: 'EXPAND' - }) - .directive('ionPullUpFooter', ['$timeout', '$rootScope', '$window', '$ionicPlatform', function($timeout, $rootScope, $window, $ionicPlatform) { - return { - restrict: 'AE', - scope: { - onExpand: '&', - onCollapse: '&', - onMinimize: '&' - }, - controller: ['$scope', '$element', '$attrs', 'ionPullUpFooterState', 'ionPullUpFooterBehavior', function($scope, $element, $attrs, FooterState, FooterBehavior) { - var - tabs, hasBottomTabs, header, tabsHeight, headerHeight, handleHeight = 0, - footer = { - height: 0, - posY: 0, - lastPosY: 0, - state: FooterState.COLLAPSED, - defaultHeight : $element[0].offsetHeight, - maxHeight: parseInt($attrs.maxHeight, 10) || 0, - initialState: $attrs.initialState ? $attrs.initialState.toUpperCase() : FooterState.COLLAPSED, - defaultBehavior: $attrs.defaultBehavior ? $attrs.defaultBehavior.toUpperCase() : FooterBehavior.EXPAND - }; + .constant('ionPullUpFooterState', { + COLLAPSED: 'COLLAPSED', + MINIMIZED: 'MINIMIZED', + EXPANDED: 'EXPANDED' + }) + .constant('ionPullUpFooterBehavior', { + HIDE: 'HIDE', + EXPAND: 'EXPAND' + }) + .directive('ionPullUpFooter', [function () { + return { + restrict: 'AE', + scope: { + state: '=?', + onExpand: '&', + onCollapse: '&', + onMinimize: '&', + allowMidRange: '=' + }, + controller: ['$scope', '$element', '$attrs', '$timeout', '$rootScope', '$window', '$ionicPlatform', 'ionPullUpFooterState', 'ionPullUpFooterBehavior', function ($scope, $element, $attrs, $timeout, $rootScope, $window, $ionicPlatform, FooterState, FooterBehavior) { + var + tabs, hasBottomTabs, header, tabsHeight, headerHeight, handleHeight = 0, + footer = { + height: 0, + posY: 0, + lastPosY: 0, + defaultHeight: $element[0].offsetHeight, + maxHeight: parseInt($attrs.maxHeight, 10) || 0, + initialState: $attrs.initialState ? $attrs.initialState.toUpperCase() : FooterState.COLLAPSED, + defaultBehavior: $attrs.defaultBehavior ? $attrs.defaultBehavior.toUpperCase() : FooterBehavior.EXPAND + }; - function init() { - computeDefaultHeights(); + this.$onInit = function () { + $timeout(function () { + computeDefaultHeights(); + $element.css({ 'transition': '300ms ease-in-out', 'padding': 0 }); + if (tabs && hasBottomTabs) { + $element.css('bottom', tabsHeight + 'px'); + } + }); + updateUI(); + } - $element.css({'transition': '300ms ease-in-out', 'padding': 0}); - if (tabs && hasBottomTabs) { - $element.css('bottom', tabs.offsetHeight + 'px'); - } - } - - function computeDefaultHeights() { - tabs = document.querySelector('.tabs'); - hasBottomTabs = document.querySelector('.tabs-bottom'); - header = document.querySelector('.bar-header'); - tabsHeight = tabs ? tabs.offsetHeight : 0; - headerHeight = header ? header.offsetHeight : 0; - - /*if ($rootScope.platformOS == 'ios') - { - tabsHeight +=40; - headerHeight +=40; - }*/ - } - - function computeHeights() { - footer.height = footer.maxHeight > 0 ? footer.maxHeight : $window.innerHeight - headerHeight - handleHeight - tabsHeight; - if ($rootScope.platformOS == 'ios') footer.height -=60; - if ($rootScope.platformOS == 'android') footer.height -=40; - $element.css({'height': footer.height + 'px'}); - - if (footer.initialState == FooterState.MINIMIZED) { - - minimize(); - } else { - collapse(); - } - } - - function updateUI() { - $timeout(function() { - computeHeights(); - }, 300); - $element.css({'transition': 'none', 'padding': 0}); - } - - function recomputeAllHeights() { - computeDefaultHeights(); - footer.height = footer.maxHeight > 0 ? footer.maxHeight : $window.innerHeight - headerHeight - handleHeight - tabsHeight; - if ($rootScope.platformOS == 'ios') footer.height -=60; - if ($rootScope.platformOS == 'android') footer.height -=40; + function computeDefaultHeights() { + var el = $element[0]; + tabs = el.closest('ion-tabs'); + hasBottomTabs = tabs && tabs.classList.contains('tabs-bottom'); + header = document.querySelector('ion-nav-bar .nav-bar-block[nav-bar=entering] > .bar-header'); + tabsHeight = tabs ? tabs.querySelector('.tabs').offsetHeight : 0; + headerHeight = header ? header.offsetHeight : 0; } - function expand() { - // recompute height right here to make sure we have the latest - recomputeAllHeights(); - footer.lastPosY = 0; - // adjust CSS values with new heights in case they changed - $element.css({'height':footer.height + 'px', '-webkit-transform': 'translate3d(0, 0, 0)', 'transform': 'translate3d(0, 0, 0)'}); - $element.css({'transition': '300ms ease-in-out', 'padding': 0}); - $scope.onExpand(); - footer.state = FooterState.EXPANDED; - } - - function collapse() { - footer.lastPosY = (tabs && hasBottomTabs) ? footer.height - tabsHeight : footer.height - footer.defaultHeight; - $element.css({'-webkit-transform': 'translate3d(0, ' + footer.lastPosY + 'px, 0)', 'transform': 'translate3d(0, ' + footer.lastPosY + 'px, 0)'}); - $scope.onCollapse(); - footer.state = FooterState.COLLAPSED - } - - function minimize() { - footer.lastPosY = footer.height; - $element.css({'-webkit-transform': 'translate3d(0, ' + footer.lastPosY + 'px, 0)', 'transform': 'translate3d(0, ' + footer.lastPosY + 'px, 0)'}); - $scope.onMinimize(); - footer.state = FooterState.MINIMIZED; - } - - - this.setHandleHeight = function(height) { - handleHeight = height; - computeHeights(); - }; - - this.getHeight = function() { - return $element[0].offsetHeight; - }; - - this.getBackground = function() { - return $window.getComputedStyle($element[0]).background; - }; - - this.onTap = function(e) { - e.gesture.srcEvent.preventDefault(); - e.gesture.preventDefault(); - - if (footer.state == FooterState.COLLAPSED) { - if (footer.defaultBehavior == FooterBehavior.HIDE) { - minimize(); - } else { - expand(); - } - } else { - if (footer.state == FooterState.MINIMIZED) { - if (footer.defaultBehavior == FooterBehavior.HIDE) - collapse(); - else - expand(); - } else { - // footer is expanded - footer.initialState == FooterState.MINIMIZED ? minimize() : collapse(); - } - } + //PP + function recomputeAllHeights() { + computeDefaultHeights(); + footer.height = footer.maxHeight > 0 ? footer.maxHeight : $window.innerHeight - headerHeight - handleHeight - tabsHeight; + + // PP + footer.height -=50; - $rootScope.$broadcast('ionPullUp:tap', footer.state); - }; - - this.onDrag = function(e) { - e.gesture.srcEvent.preventDefault(); - e.gesture.preventDefault(); - - switch (e.type) { - case 'dragstart': - $element.css('transition', 'none'); - break; - case 'drag': - footer.posY = Math.round(e.gesture.deltaY) + footer.lastPosY; - if (footer.posY < 0 || footer.posY > footer.height) return; - $element.css({'-webkit-transform': 'translate3d(0, ' + footer.posY + 'px, 0)', 'transform': 'translate3d(0, ' + footer.posY + 'px, 0)'}); - break; - case 'dragend': - $element.css({'transition': '300ms ease-in-out'}); - footer.lastPosY = footer.posY; - break; + if ($rootScope.platformOS == 'ios') footer.height -=30; + //if ($rootScope.platformOS == 'android') footer.height -=10; } - }; - init(); + function computeHeights() { + footer.height = footer.maxHeight > 0 ? footer.maxHeight : $window.innerHeight - headerHeight - handleHeight - tabsHeight; + + // PP + + // PP + footer.height -=50; + + if ($rootScope.platformOS == 'ios') footer.height -=30; + //if ($rootScope.platformOS == 'android') footer.height -=10; - $ionicPlatform.ready(function() { - $window.addEventListener('orientationchange', updateUI); - $ionicPlatform.on("resume", updateUI); - }); + $element.css({ 'height': footer.height + 'px' }); + + if (footer.initialState == FooterState.MINIMIZED) { + + minimize(); + } else { + collapse(); + } + } - }], - compile: function(element, attrs) { + function updateUI() { + $timeout(function () { + computeHeights(); + }, 300); + $element.css({ 'transition': 'none', 'padding': 0 }); + } + + function expand() { + recomputeAllHeights(); + footer.lastPosY = 0; + // adjust CSS values with new heights in case they changed + // PP added height + $element.css({ 'height':footer.height + 'px', '-webkit-transform': 'translate3d(0, 0, 0)', 'transform': 'translate3d(0, 0, 0)' }); + $element.css({ 'transition': '300ms ease-in-out', 'padding': 0 }); + $scope.onExpand(); + $scope.state = FooterState.EXPANDED; + } + + function collapse() { + footer.lastPosY = tabs ? footer.height - tabsHeight : footer.height - footer.defaultHeight; + $element.css({ '-webkit-transform': 'translate3d(0, ' + footer.lastPosY + 'px, 0)', 'transform': 'translate3d(0, ' + footer.lastPosY + 'px, 0)' }); + $scope.onCollapse(); + $scope.state = FooterState.COLLAPSED; + } + + function minimize() { + footer.lastPosY = footer.height; + $element.css({ '-webkit-transform': 'translate3d(0, ' + footer.lastPosY + 'px, 0)', 'transform': 'translate3d(0, ' + footer.lastPosY + 'px, 0)' }); + $scope.onMinimize(); + $scope.state = FooterState.MINIMIZED; + } + + + this.setHandleHeight = function (height) { + handleHeight = height; + }; + + this.getHeight = function () { + return $element[0].offsetHeight; + }; + + this.getBackground = function () { + return $window.getComputedStyle($element[0]).background; + }; + + this.getInitialState = function () { + return footer.initialState; + }; + + this.getDefaultBehavior = function () { + return footer.defaultBehavior; + }; + + this.onTap = function (e) { + e.gesture.srcEvent.preventDefault(); + e.gesture.preventDefault(); + + $timeout(function () { + if ($scope.state == FooterState.COLLAPSED) { + if (footer.defaultBehavior == FooterBehavior.HIDE) { + $scope.state = FooterState.MINIMIZED; + } else { + $scope.state = FooterState.EXPANDED; + } + } else { + if ($scope.state == FooterState.MINIMIZED) { + if (footer.defaultBehavior == FooterBehavior.HIDE) + $scope.state = FooterState.COLLAPSED; + else + $scope.state = FooterState.EXPANDED; + } else { + // footer is expanded + $scope.state = footer.initialState == FooterState.MINIMIZED ? FooterState.MINIMIZED : FooterState.COLLAPSED; + } + } + }); + }; + + this.onDrag = function (e) { + e.gesture.srcEvent.preventDefault(); + e.gesture.preventDefault(); + + switch (e.type) { + case 'dragstart': + $element.css('transition', 'none'); + break; + case 'drag': + footer.posY = Math.round(e.gesture.deltaY) + footer.lastPosY; + if (footer.posY < 0 || footer.posY > footer.height) return; + $element.css({ '-webkit-transform': 'translate3d(0, ' + footer.posY + 'px, 0)', 'transform': 'translate3d(0, ' + footer.posY + 'px, 0)' }); + break; + case 'dragend': + $element.css({ 'transition': '300ms ease-in-out' }); + if (!$scope.allowMidRange) { + $timeout(function () { + if (footer.lastPosY > footer.posY) { + $scope.state = FooterState.EXPANDED; + } + else if (footer.lastPosY < footer.posY) { + $scope.state = (footer.initialState == FooterState.MINIMIZED) ? FooterState.MINIMIZED : FooterState.COLLAPSED; + } + }); + } + else { + footer.lastPosY = footer.posY; + } + break; + } + }; + + var deregisterWatch = $scope.$watch('state', function (newState, oldState) { + if (oldState === undefined || newState == oldState) return; + switch (newState) { + case FooterState.COLLAPSED: + collapse(); + break; + case FooterState.EXPANDED: + expand(); + break; + case FooterState.MINIMIZED: + minimize(); + break; + } + $rootScope.$broadcast('ionPullUp:tap', $scope.state, footer.defaultBehavior); + }); + + $scope.$on('$destroy', deregisterWatch); + + $ionicPlatform.ready(function () { + $window.addEventListener('orientationchange', updateUI); + $ionicPlatform.on("resume", updateUI); + }); + + }], + compile: function(element, attrs) { attrs.defaultHeight && element.css('height', parseInt(attrs.defaultHeight, 10) + 'px'); element.addClass('bar bar-footer'); - } - } - }]) - .directive('ionPullUpContent', [function() { - return { - restrict: 'AE', - require: '^ionPullUpFooter', - link: function (scope, element, attrs, controller) { - var - footerHeight = controller.getHeight(); - element.css({'display': 'block', 'margin-top': footerHeight + 'px', width: '100%'}); - // add scrolling if needed - if (attrs.scroll && attrs.scroll.toUpperCase() == 'TRUE') { - element.css({'overflow-y': 'scroll', 'overflow-x': 'hidden'}); - } - } - } - }]) - .directive('ionPullUpBar', [function() { - return { - restrict: 'AE', - require: '^ionPullUpFooter', - link: function (scope, element, attrs, controller) { - var - footerHeight = controller.getHeight(); - element.css({'display': 'flex', 'height': footerHeight + 'px', position: 'absolute', right: '0', left: '0'}); - - } - } - }]) - .directive('ionPullUpTrigger', ['$ionicGesture', function($ionicGesture) { - return { - restrict: 'AE', - require: '^ionPullUpFooter', - link: function (scope, element, attrs, controller) { - // add gesture - $ionicGesture.on('tap', controller.onTap, element); - $ionicGesture.on('drag dragstart dragend', controller.onDrag, element); - } - } - }]) - .directive('ionPullUpHandle', ['$ionicGesture', '$ionicPlatform', '$timeout', '$window', function($ionicGesture, $ionicPlatform, $timeout, $window) { - return { - restrict: 'AE', - require: '^ionPullUpFooter', - link: function (scope, element, attrs, controller) { - var height = parseInt(attrs.height,10) || 25, width = parseInt(attrs.width, 10) || 100, - background = controller.getBackground(), - toggleClasses = attrs.toggle; - - controller.setHandleHeight(height); - - element.css({ - display: 'block', - background: background, - position: 'absolute', - top: 1-height + 'px', - left: (($window.innerWidth - width) / 2) + 'px', - height: height + 'px', - width: width + 'px', - 'text-align': 'center' - }); - - // add gesture - $ionicGesture.on('tap', controller.onTap, element); - $ionicGesture.on('drag dragstart dragend', controller.onDrag, element); - - scope.$on('ionPullUp:tap', function() { - element.find('i').toggleClass(toggleClasses); - }); - - function updateUI() { - $timeout ( function() { - element.css('left', (($window.innerWidth - width) / 2) + 'px');},300); - } - - $ionicPlatform.ready(function() { - $window.addEventListener('orientationchange', updateUI); - $ionicPlatform.on("resume", updateUI); - }); - } - } - }]); + } + } + }]) + .component('ionPullUpContent', { + require: { + FooterController: '^ionPullUpFooter' + }, + controller: ['$element', '$attrs', function ($element, $attrs) { + this.$onInit = function () { + var controller = this.FooterController, + footerHeight = controller.getHeight(); + $element.css({ 'display': 'block', 'margin-top': footerHeight + 'px', width: '100%' }); + // add scrolling if needed + if ($attrs.scroll && $attrs.scroll.toUpperCase() == 'TRUE') { + $element.css({ 'overflow-y': 'scroll', 'overflow-x': 'hidden' }); + } + } + }] + }) + .component('ionPullUpBar', { + require: { + FooterController: '^ionPullUpFooter' + }, + controller: ['$element', function ($element) { + this.$onInit = function () { + var controller = this.FooterController, + footerHeight = controller.getHeight(); + $element.css({ 'display': 'flex', 'height': footerHeight + 'px', position: 'absolute', right: '0', left: '0' }); + } + }] + }) + .directive('ionPullUpTrigger', ['$ionicGesture', function ($ionicGesture) { + return { + restrict: 'AE', + require: '^ionPullUpFooter', + link: function (scope, element, attrs, controller) { + // add gesture + $ionicGesture.on('tap', controller.onTap, element); + $ionicGesture.on('drag dragstart dragend', controller.onDrag, element); + } + } + }]) + .component('ionPullUpHandle', { + require: { + FooterController: '^ionPullUpFooter' + }, + controller: ['$scope', '$element', '$attrs', 'ionPullUpFooterState', 'ionPullUpFooterBehavior', '$ionicGesture', '$ionicPlatform', '$timeout', '$window', function ($scope, $element, $attrs, FooterState, FooterBehavior, $ionicGesture, $ionicPlatform, $timeout, $window) { + var height = parseInt($attrs.height, 10) || 25, width = parseInt($attrs.width, 10) || 100, + iconExpand = $attrs.iconExpand, + iconCollapse = $attrs.iconCollapse; + + $element + .css({ + display: 'block', + 'background-color': 'inherit', + position: 'absolute', + top: 1 - height + 'px', + left: (($window.innerWidth - width) / 2) + 'px', + height: height + 'px', + width: width + 'px', + 'text-align': 'center' + }) + .append(''); + + this.$onInit = function () { + var controller = this.FooterController; + + // add gesture + $ionicGesture.on('tap', controller.onTap, $element); + $ionicGesture.on('drag dragstart dragend', controller.onDrag, $element); + + controller.setHandleHeight(height); + + var state = controller.getInitialState(), + behavior = controller.getDefaultBehavior(); + + toggleIcons(state, behavior); + + updateUI(); + } + + $scope.$on('ionPullUp:tap', function (e, state, behavior) { + toggleIcons(state, behavior); + }); + + function toggleIcons(state, behavior) { + if (!iconExpand || !iconCollapse) return; + + //remove any icons + $element.find('i').removeClass([iconExpand, iconCollapse].join(' ')); + + if (state == FooterState.COLLAPSED) { + if (behavior == FooterBehavior.HIDE) { + $element.find('i').addClass(iconCollapse); + } else { + $element.find('i').addClass(iconExpand); + } + } else { + if (state == FooterState.MINIMIZED) { + if (behavior == FooterBehavior.HIDE) + $element.find('i').addClass(iconExpand); + else + $element.find('i').addClass(iconExpand); + } else { + // footer is expanded + $element.find('i').addClass(iconCollapse); + } + } + } + + function updateUI() { + $timeout(function () { + $element.css('left', (($window.innerWidth - width) / 2) + 'px'); + }, 300); + } + + $ionicPlatform.ready(function () { + $window.addEventListener('orientationchange', updateUI); + $ionicPlatform.on("resume", updateUI); + }); + }] + }); diff --git a/www/external/origjs/ion-pullup.js.23Dec2017 b/www/external/origjs/ion-pullup.js.23Dec2017 new file mode 100755 index 00000000..ae9109a8 --- /dev/null +++ b/www/external/origjs/ion-pullup.js.23Dec2017 @@ -0,0 +1,261 @@ +angular.module('ionic-pullup', []) + .constant('ionPullUpFooterState', { + COLLAPSED: 'COLLAPSED', + MINIMIZED: 'MINIMIZED', + EXPANDED: 'EXPANDED' + }) + .constant('ionPullUpFooterBehavior', { + HIDE: 'HIDE', + EXPAND: 'EXPAND' + }) + .directive('ionPullUpFooter', ['$timeout', '$rootScope', '$window', '$ionicPlatform', function($timeout, $rootScope, $window, $ionicPlatform) { + return { + restrict: 'AE', + scope: { + onExpand: '&', + onCollapse: '&', + onMinimize: '&' + }, + controller: ['$scope', '$element', '$attrs', 'ionPullUpFooterState', 'ionPullUpFooterBehavior', function($scope, $element, $attrs, FooterState, FooterBehavior) { + var + tabs, hasBottomTabs, header, tabsHeight, headerHeight, handleHeight = 0, + footer = { + height: 0, + posY: 0, + lastPosY: 0, + state: FooterState.COLLAPSED, + defaultHeight : $element[0].offsetHeight, + maxHeight: parseInt($attrs.maxHeight, 10) || 0, + initialState: $attrs.initialState ? $attrs.initialState.toUpperCase() : FooterState.COLLAPSED, + defaultBehavior: $attrs.defaultBehavior ? $attrs.defaultBehavior.toUpperCase() : FooterBehavior.EXPAND + }; + + function init() { + computeDefaultHeights(); + + $element.css({'transition': '300ms ease-in-out', 'padding': 0}); + if (tabs && hasBottomTabs) { + $element.css('bottom', tabs.offsetHeight + 'px'); + } + } + + function computeDefaultHeights() { + tabs = document.querySelector('.tabs'); + hasBottomTabs = document.querySelector('.tabs-bottom'); + header = document.querySelector('.bar-header'); + tabsHeight = tabs ? tabs.offsetHeight : 0; + headerHeight = header ? header.offsetHeight : 0; + + /*if ($rootScope.platformOS == 'ios') + { + tabsHeight +=40; + headerHeight +=40; + }*/ + } + + function computeHeights() { + footer.height = footer.maxHeight > 0 ? footer.maxHeight : $window.innerHeight - headerHeight - handleHeight - tabsHeight; + if ($rootScope.platformOS == 'ios') footer.height -=60; + if ($rootScope.platformOS == 'android') footer.height -=40; + $element.css({'height': footer.height + 'px'}); + + if (footer.initialState == FooterState.MINIMIZED) { + + minimize(); + } else { + collapse(); + } + } + + function updateUI() { + $timeout(function() { + computeHeights(); + }, 300); + $element.css({'transition': 'none', 'padding': 0}); + } + + function recomputeAllHeights() { + computeDefaultHeights(); + footer.height = footer.maxHeight > 0 ? footer.maxHeight : $window.innerHeight - headerHeight - handleHeight - tabsHeight; + if ($rootScope.platformOS == 'ios') footer.height -=60; + if ($rootScope.platformOS == 'android') footer.height -=40; + } + + function expand() { + // recompute height right here to make sure we have the latest + recomputeAllHeights(); + footer.lastPosY = 0; + // adjust CSS values with new heights in case they changed + $element.css({'height':footer.height + 'px', '-webkit-transform': 'translate3d(0, 0, 0)', 'transform': 'translate3d(0, 0, 0)'}); + $element.css({'transition': '300ms ease-in-out', 'padding': 0}); + $scope.onExpand(); + footer.state = FooterState.EXPANDED; + } + + function collapse() { + footer.lastPosY = (tabs && hasBottomTabs) ? footer.height - tabsHeight : footer.height - footer.defaultHeight; + $element.css({'-webkit-transform': 'translate3d(0, ' + footer.lastPosY + 'px, 0)', 'transform': 'translate3d(0, ' + footer.lastPosY + 'px, 0)'}); + $scope.onCollapse(); + footer.state = FooterState.COLLAPSED + } + + function minimize() { + footer.lastPosY = footer.height; + $element.css({'-webkit-transform': 'translate3d(0, ' + footer.lastPosY + 'px, 0)', 'transform': 'translate3d(0, ' + footer.lastPosY + 'px, 0)'}); + $scope.onMinimize(); + footer.state = FooterState.MINIMIZED; + } + + + this.setHandleHeight = function(height) { + handleHeight = height; + computeHeights(); + }; + + this.getHeight = function() { + return $element[0].offsetHeight; + }; + + this.getBackground = function() { + return $window.getComputedStyle($element[0]).background; + }; + + this.onTap = function(e) { + e.gesture.srcEvent.preventDefault(); + e.gesture.preventDefault(); + + if (footer.state == FooterState.COLLAPSED) { + if (footer.defaultBehavior == FooterBehavior.HIDE) { + minimize(); + } else { + expand(); + } + } else { + if (footer.state == FooterState.MINIMIZED) { + if (footer.defaultBehavior == FooterBehavior.HIDE) + collapse(); + else + expand(); + } else { + // footer is expanded + footer.initialState == FooterState.MINIMIZED ? minimize() : collapse(); + } + } + + $rootScope.$broadcast('ionPullUp:tap', footer.state); + }; + + this.onDrag = function(e) { + e.gesture.srcEvent.preventDefault(); + e.gesture.preventDefault(); + + switch (e.type) { + case 'dragstart': + $element.css('transition', 'none'); + break; + case 'drag': + footer.posY = Math.round(e.gesture.deltaY) + footer.lastPosY; + if (footer.posY < 0 || footer.posY > footer.height) return; + $element.css({'-webkit-transform': 'translate3d(0, ' + footer.posY + 'px, 0)', 'transform': 'translate3d(0, ' + footer.posY + 'px, 0)'}); + break; + case 'dragend': + $element.css({'transition': '300ms ease-in-out'}); + footer.lastPosY = footer.posY; + break; + } + }; + + init(); + + $ionicPlatform.ready(function() { + $window.addEventListener('orientationchange', updateUI); + $ionicPlatform.on("resume", updateUI); + }); + + }], + compile: function(element, attrs) { + attrs.defaultHeight && element.css('height', parseInt(attrs.defaultHeight, 10) + 'px'); + element.addClass('bar bar-footer'); + } + } + }]) + .directive('ionPullUpContent', [function() { + return { + restrict: 'AE', + require: '^ionPullUpFooter', + link: function (scope, element, attrs, controller) { + var + footerHeight = controller.getHeight(); + element.css({'display': 'block', 'margin-top': footerHeight + 'px', width: '100%'}); + // add scrolling if needed + if (attrs.scroll && attrs.scroll.toUpperCase() == 'TRUE') { + element.css({'overflow-y': 'scroll', 'overflow-x': 'hidden'}); + } + } + } + }]) + .directive('ionPullUpBar', [function() { + return { + restrict: 'AE', + require: '^ionPullUpFooter', + link: function (scope, element, attrs, controller) { + var + footerHeight = controller.getHeight(); + element.css({'display': 'flex', 'height': footerHeight + 'px', position: 'absolute', right: '0', left: '0'}); + + } + } + }]) + .directive('ionPullUpTrigger', ['$ionicGesture', function($ionicGesture) { + return { + restrict: 'AE', + require: '^ionPullUpFooter', + link: function (scope, element, attrs, controller) { + // add gesture + $ionicGesture.on('tap', controller.onTap, element); + $ionicGesture.on('drag dragstart dragend', controller.onDrag, element); + } + } + }]) + .directive('ionPullUpHandle', ['$ionicGesture', '$ionicPlatform', '$timeout', '$window', function($ionicGesture, $ionicPlatform, $timeout, $window) { + return { + restrict: 'AE', + require: '^ionPullUpFooter', + link: function (scope, element, attrs, controller) { + var height = parseInt(attrs.height,10) || 25, width = parseInt(attrs.width, 10) || 100, + background = controller.getBackground(), + toggleClasses = attrs.toggle; + + controller.setHandleHeight(height); + + element.css({ + display: 'block', + background: background, + position: 'absolute', + top: 1-height + 'px', + left: (($window.innerWidth - width) / 2) + 'px', + height: height + 'px', + width: width + 'px', + 'text-align': 'center' + }); + + // add gesture + $ionicGesture.on('tap', controller.onTap, element); + $ionicGesture.on('drag dragstart dragend', controller.onDrag, element); + + scope.$on('ionPullUp:tap', function() { + element.find('i').toggleClass(toggleClasses); + }); + + function updateUI() { + $timeout ( function() { + element.css('left', (($window.innerWidth - width) / 2) + 'px');},300); + } + + $ionicPlatform.ready(function() { + $window.addEventListener('orientationchange', updateUI); + $ionicPlatform.on("resume", updateUI); + }); + } + } + }]); diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 2bfb18ff..9c128ad1 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -37,7 +37,7 @@ angular.module('zmApp.controllers') }) -.controller('zmApp.EventCtrl', ['$scope', '$rootScope', 'zm', 'NVRDataModel', 'message', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$ionicPlatform', '$ionicSlideBoxDelegate', '$ionicPosition', '$ionicPopover', '$ionicPopup', 'EventServer', '$sce', '$cordovaBadge', '$cordovaLocalNotification', '$q', 'carouselUtils', '$translate', '$cordovaFileTransfer', '$cordovaFile', '$ionicListDelegate',function($scope, $rootScope, zm, NVRDataModel, message, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, $ionicPlatform, $ionicSlideBoxDelegate, $ionicPosition, $ionicPopover, $ionicPopup, EventServer, $sce, $cordovaBadge, $cordovaLocalNotification, $q, carouselUtils, $translate, $cordovaFileTransfer, $cordovaFile, $ionicListDelegate) +.controller('zmApp.EventCtrl', ['$scope', '$rootScope', 'zm', 'NVRDataModel', 'message', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$ionicPlatform', '$ionicSlideBoxDelegate', '$ionicPosition', '$ionicPopover', '$ionicPopup', 'EventServer', '$sce', '$cordovaBadge', '$cordovaLocalNotification', '$q', 'carouselUtils', '$translate', '$cordovaFileTransfer', '$cordovaFile', '$ionicListDelegate', 'ionPullUpFooterState',function($scope, $rootScope, zm, NVRDataModel, message, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, $ionicPlatform, $ionicSlideBoxDelegate, $ionicPosition, $ionicPopover, $ionicPopup, EventServer, $sce, $cordovaBadge, $cordovaLocalNotification, $q, carouselUtils, $translate, $cordovaFileTransfer, $cordovaFile, $ionicListDelegate,ionPullUpFooterState) { // events in last 5 minutes @@ -114,10 +114,11 @@ angular.module('zmApp.controllers') $scope.tzAbbr = moment().tz(NVRDataModel.getTimeZoneNow()).zoneAbbr(); } + //console.log ("************** CLEARING EVENTS"); $scope.events = []; $timeout ( function() { - console.log ("DEFERRED ACTION EVENTS"); + // console.log ("DEFERRED ACTION EVENTS"); getInitialEvents(); setupWatchers(); footerExpand(); @@ -154,6 +155,8 @@ angular.module('zmApp.controllers') //console.log ("********* BEFORE ENTER"); // + + $scope.footerState = ionPullUpFooterState.MINIMIZED; $scope.gifshotSupported = true; document.addEventListener("pause", onPause, false); //console.log("I got STATE PARAM " + $stateParams.id); @@ -162,7 +165,7 @@ angular.module('zmApp.controllers') console.log("BEFORE ENTER >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); - NVRDataModel.log("EventCtrl called with: EID=" + $scope.id + " playEvent = " + $scope.showEvent); + NVRDataModel.log("EventCtrl called with: E/MID=" + $scope.id + " playEvent = " + $scope.showEvent); @@ -345,7 +348,7 @@ angular.module('zmApp.controllers') var tempMon = message; $scope.monitors = NVRDataModel.applyMontageMonitorPrefs(tempMon, 2)[0]; } else*/ - $scope.monitors = message; + $scope.monitors =message; if ($scope.monitors.length == 0) { @@ -409,6 +412,9 @@ angular.module('zmApp.controllers') NVRDataModel.debug("EventCtrl: success, got " + myevents.length + " events"); var loginData = NVRDataModel.getLogin(); + + //console.log ("-------->MON LEN"+$scope.monitors.length); + for (var i = 0; i < myevents.length; i++) { @@ -420,6 +426,7 @@ angular.module('zmApp.controllers') { if ($scope.monitors[ii].Monitor.Id == myevents[i].Event.MonitorId && (NVRDataModel.isNotHidden(myevents[i].Event.MonitorId) || showHiddenMonitors)) { + // console.log ("FOUND IT"); idfound = true; break; @@ -427,7 +434,7 @@ angular.module('zmApp.controllers') } } - console.log ("IDFOUND="+idfound + " AND MON LEN="+$scope.monitors.length); + //console.log ("IDFOUND="+idfound + " AND MON LEN="+$scope.monitors.length); myevents[i].Event.humanizeTime = humanizeTime(myevents[i].Event.StartTime); myevents[i].Event.streamingURL = NVRDataModel.getStreamingURL(myevents[i].Event.MonitorId); @@ -484,7 +491,7 @@ angular.module('zmApp.controllers') } // swap - console.log ("--------->" +"MW:"+myevents[i].Event.thumbWidth+ " MH:"+ myevents[i].Event.thumbHeight + " for Monitor:" + myevents[i].Event.MonitorName); + // console.log ("--------->" +"MW:"+myevents[i].Event.thumbWidth+ " MH:"+ myevents[i].Event.thumbHeight + " for Monitor:" + myevents[i].Event.MonitorName); @@ -513,9 +520,9 @@ angular.module('zmApp.controllers') if (idfound) { - console.log ("PUSHING "+JSON.stringify(myevents[i])); + //console.log ("PUSHING "+JSON.stringify(myevents[i])); $scope.events.push(myevents[i]); - console.log ("SCOPE EVENTS LEN="+$scope.events.length); + //console.log ("SCOPE EVENTS LEN="+$scope.events.length); } else { @@ -534,8 +541,9 @@ angular.module('zmApp.controllers') //console.log("**Loading Next Page ***"); if (myevents.length < 50) { + console.log ("EVENTS LOADED="+JSON.stringify($scope.events)); NVRDataModel.debug("EventCtrl:loading one more page just in case we don't have enough to display"); - loadMore(); + loadMore(); } }); @@ -1124,7 +1132,12 @@ angular.module('zmApp.controllers') // reloading - may solve https://github.com/pliablepixels/zmNinja/issues/36 // if you are in the same mid event page $state.go won't work - console.log ("---> SENDING TO EVENTS WITH mid " + monitorId); + $scope.id = monitorId; + $scope.showEvent = false; + $scope.footerState = ionPullUpFooterState.MINIMIZED; + getInitialEvents(); + + /* console.log ("---> SENDING TO EVENTS WITH mid " + monitorId); $state.go("app.events", { "id": monitorId, @@ -1132,7 +1145,7 @@ angular.module('zmApp.controllers') }, { reload: true - }); + });*/ }; //---------------------------------------------------------------- @@ -1881,6 +1894,13 @@ angular.module('zmApp.controllers') $rootScope.toTime = ""; $rootScope.fromString = ""; $rootScope.toString = ""; + + $scope.id = 0; + $scope.showEvent = false; + $scope.footerState = ionPullUpFooterState.MINIMIZED; + getInitialEvents(); + + /* $ionicHistory.nextViewOptions( { disableBack: true @@ -1888,8 +1908,10 @@ angular.module('zmApp.controllers') $state.go("app.events", { "id": 0, - "playEvent": false - }); + "playEvent": false, + refresh:true + });*/ + return; } else diff --git a/www/js/MomentCtrl.js b/www/js/MomentCtrl.js index 64631f89..1cb080b3 100644 --- a/www/js/MomentCtrl.js +++ b/www/js/MomentCtrl.js @@ -267,6 +267,7 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$ NVRDataModel.log ("Uh oh, ndx returned -1, this should never happen. Event passed was "+eid); return; } + $scope.moments[ndx].Event.pinned = !$scope.moments[ndx].Event.pinned; }; diff --git a/www/templates/events.html b/www/templates/events.html index 25ef3e78..afb4c502 100644 --- a/www/templates/events.html +++ b/www/templates/events.html @@ -288,8 +288,8 @@
- + diff --git a/www/templates/moment.html b/www/templates/moment.html index da321f16..3ce02627 100644 --- a/www/templates/moment.html +++ b/www/templates/moment.html @@ -102,7 +102,7 @@ - +
 {{moment.Event.humanizeTime}} -- cgit v1.2.3