From 628e4f52203f2d6f8202515207b4801efec8e301 Mon Sep 17 00:00:00 2001 From: PliablePixels Date: Sun, 26 Jul 2015 18:28:46 -0400 Subject: reduce image loading buffer of carousel (for low config devices) also made sure scrub carousel is cleared if full screen is opened so as not to double images --- config.xml | 2 +- www/css/style.css | 5 +++++ www/external/angular-carousel.js | 2 +- www/js/EventCtrl.js | 18 ++++++++++++++++-- www/js/ModalCtrl.js | 9 +++++++++ .../dist/css/.angular-awesome-slider.min.css.swp | Bin 24576 -> 0 bytes www/templates/events-modal.html | 2 +- www/templates/events.html | 2 +- 8 files changed, 34 insertions(+), 6 deletions(-) delete mode 100644 www/lib/angular-awesome-slider/dist/css/.angular-awesome-slider.min.css.swp diff --git a/config.xml b/config.xml index b63f6c6d..9aa2eeef 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + zmNinja High performance ZoneMinder client diff --git a/www/css/style.css b/www/css/style.css index a1815802..f911ef13 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -287,6 +287,11 @@ ul[rn-carousel] img { border-radius:2px } + +/*.mySliderClass.jslider.sliderCSS div.jslider-pointer +{top:-10px;left:15px;width:60px;height:60px;margin-left:-5px;background-color:silver;background-color:#615959;border-radius:50% +}*/ + /* .bgimage { text-align:right; diff --git a/www/external/angular-carousel.js b/www/external/angular-carousel.js index 28bd401b..505aed8a 100644 --- a/www/external/angular-carousel.js +++ b/www/external/angular-carousel.js @@ -287,7 +287,7 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach transitionDuration: parseFloat(iAttributes.rnCarouselDuration, 10) || 300, isSequential: true, autoSlideDuration: 3, - bufferSize: 31, + bufferSize: 9, /* in container % how much we need to drag to trigger the slide change */ moveTreshold: 0.1, defaultIndex: 0 diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 1f535507..93fdba0e 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -226,7 +226,12 @@ angular.module('zmApp.controllers') // This function is called when a user enables or disables // scrub view for an event. //------------------------------------------------------------------------- - $scope.toggleGroup = function (event, ndx, frames) { + + $scope.toggleGroup = function(event,ndx,frames) + { + toggleGroup(event, ndx, frames); + }; + function toggleGroup(event, ndx, frames) { // If we are here and there is a record of a previous scroll // then we need to scroll back to hide that view @@ -357,8 +362,17 @@ angular.module('zmApp.controllers') // we are turning off, so scroll by back } - }; + } + $scope.closeIfOpen = function(event) + { + if (event != undefined) + { + if (event.Event.ShowScrub) + toggleGroup(event); + + } + }; $scope.isGroupShown = function (event) { // console.log ("IS SHOW INDEX is " + ndx); diff --git a/www/js/ModalCtrl.js b/www/js/ModalCtrl.js index eb7e7754..8b48c077 100644 --- a/www/js/ModalCtrl.js +++ b/www/js/ModalCtrl.js @@ -19,6 +19,15 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco //var imageStyle=1; //$scope.imageAspect = "max-width: 100%;max-height: 100%;"; $scope.imageFit=false; + // FIXME: This is a hack - for some reason + // the custom slider view is messed up till the image loads + // in modal view + $scope.showModalRangeSider = false; + + $timeout( function() { + $scope.showModalRangeSider = true; + console.log ("****SHOWING SLIDER"); + },2000); $scope.radialMenuOptions = { content: '', diff --git a/www/lib/angular-awesome-slider/dist/css/.angular-awesome-slider.min.css.swp b/www/lib/angular-awesome-slider/dist/css/.angular-awesome-slider.min.css.swp deleted file mode 100644 index 65d27da4..00000000 Binary files a/www/lib/angular-awesome-slider/dist/css/.angular-awesome-slider.min.css.swp and /dev/null differ diff --git a/www/templates/events-modal.html b/www/templates/events-modal.html index baead40a..cf333eb8 100644 --- a/www/templates/events-modal.html +++ b/www/templates/events-modal.html @@ -71,7 +71,7 @@ --> -
+
diff --git a/www/templates/events.html b/www/templates/events.html index 4c2df5b1..12e9f220 100644 --- a/www/templates/events.html +++ b/www/templates/events.html @@ -94,7 +94,7 @@ -- cgit v1.2.3