diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-09-03 08:27:40 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-09-03 08:27:40 -0400 |
| commit | a3715e410eae6078e416ccdae3ae9ba36265e619 (patch) | |
| tree | f18c856accb59304f81719f59d93d06966cdeba8 /www/lib/ionic-content-banner/dist | |
| parent | 7291b7f08e4b324034988fc1ece82eddea73031d (diff) | |
show alarms on top of modals as well
Former-commit-id: fa3da1700499e8b90892f571034e9d939e3e140e
Diffstat (limited to 'www/lib/ionic-content-banner/dist')
4 files changed, 0 insertions, 236 deletions
diff --git a/www/lib/ionic-content-banner/dist/ionic.content.banner.css b/www/lib/ionic-content-banner/dist/ionic.content.banner.css deleted file mode 100644 index 79519cb9..00000000 --- a/www/lib/ionic-content-banner/dist/ionic.content.banner.css +++ /dev/null @@ -1,53 +0,0 @@ -@charset "UTF-8"; - -.content-banner { - width: 100%; - color: white; - height: 30px; - line-height: 30px; - position: absolute; - top: 0; - opacity: 0.7; } -.content-banner.error { - background-color: red; } -.content-banner.info { - background-color: #333; } -.content-banner .content-banner-text { - -webkit-transition: opacity 500ms linear; - transition: opacity 500ms linear; - position: absolute; - top: 0; - right: 41px; - left: 41px; - text-align: center; } -.content-banner .content-banner-text.active { - opacity: 1; } -.content-banner .content-banner-text:not(.active) { - opacity: 0; } -.content-banner .content-banner-close { - position: absolute; - right: 5px; - top: 0; - padding: 0 12px; - height: 100%; - line-height: 30px; - min-height: 0; - color: white; } -.content-banner .content-banner-close:before { - line-height: 30px; } - -.content-banner-transition-vertical { - -webkit-transition: -webkit-transform linear 250ms; - transition: transform linear 250ms; - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); } - -.content-banner-transition-fade { - -webkit-transition: opacity 400ms linear; - transition: opacity 400ms linear; - opacity: 0; } - -.content-banner-in { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - opacity: 0.7; } diff --git a/www/lib/ionic-content-banner/dist/ionic.content.banner.js b/www/lib/ionic-content-banner/dist/ionic.content.banner.js deleted file mode 100644 index e79f46ca..00000000 --- a/www/lib/ionic-content-banner/dist/ionic.content.banner.js +++ /dev/null @@ -1,181 +0,0 @@ -angular.module('jett.ionic.content.banner', ['ionic']); -/* global angular */ -(function (angular) { - 'use strict'; - - angular.module('jett.ionic.content.banner') - .directive('ionContentBanner', [ - '$interval', - function ($interval) { - return { - restrict: 'E', - scope: true, - link: function ($scope, $element) { - var stopInterval; - - $scope.currentIndex = 0; - - if ($scope.text.length > 1) { - stopInterval = $interval(function () { - $scope.currentIndex = ($scope.currentIndex < $scope.text.length - 1) ? $scope.currentIndex + 1 : 0; - }, $scope.interval); - } - - $scope.$on('$destroy', function() { - $element.remove(); - if (stopInterval) { - $interval.cancel(stopInterval); - } - }); - }, - template: - '<div class="content-banner-text-wrapper">' + - '<div ng-repeat="item in text track by $index" ng-class="{active: $index === currentIndex}" class="content-banner-text" ng-bind="item"></div>' + - '</div>' + - '<button class="content-banner-close button button-icon icon {{::icon}}" ng-click="close()"></button>' - }; - }]); - -})(angular); - -/* global angular,ionic */ -/** - * @ngdoc service - * @name $ionicContentBanner - * @module ionic - * @description The Content Banner is an animated banner that will show specific information to a user. - */ -(function (angular, ionic) { - 'use strict'; - - angular.module('jett.ionic.content.banner') - .factory('$ionicContentBanner', [ - '$document', - '$rootScope', - '$compile', - '$timeout', - '$ionicPlatform', - function ($document, $rootScope, $compile, $timeout, $ionicPlatform) { - - function isActiveView (node) { - // walk up the child-parent node chain until we get to the root or the BODY - while (node !== null && node.nodeName !== 'BODY') { - var navView = node.getAttribute("nav-view"); - - // as soon as we encounter a cached (parent) view then we know the view can't be active - if (navView !== null && navView === 'cached') { - return false; - } - node = node.parentNode; - } - // no cached parent seen, the view must be really active - return true; - } - - function getActiveView (body) { - // get the candidate active views - var views = body.querySelectorAll('ion-view[nav-view="active"]'); - - // only one candidate, so we just take it - if (views.length === 1) { - return views[0]; - } - - // convert the NodeList to an array, filter it using 'isActiveView' and return the first element - return Array.prototype.slice.call(views).filter(function (view) { - return isActiveView(view); - })[0]; - } - - /** - * @ngdoc method - * @name $ionicContentBanner#show - * @description - * Load and show a new content banner. - */ - function contentBanner (opts) { - var scope = $rootScope.$new(true); - - angular.extend(scope, { - icon: 'ion-ios-close-empty', - transition: 'vertical', - interval: 7000, - type: 'info', - $deregisterBackButton: angular.noop, - closeOnStateChange: true, - autoClose: null - }, opts); - - // Compile the template - var classes = 'content-banner ' + scope.type + ' content-banner-transition-' + scope.transition; - var element = scope.element = $compile('<ion-content-banner class="' + classes + '"></ion-content-banner>')(scope); - var body = $document[0].body; - - var stateChangeListenDone = scope.closeOnStateChange ? - $rootScope.$on('$stateChangeSuccess', function() { scope.close(); }) : - angular.noop; - - scope.$deregisterBackButton = $ionicPlatform.registerBackButtonAction( - function() { - $timeout(scope.close); - }, 300 - ); - - scope.close = function() { - if (scope.removed) { - return; - } - scope.removed = true; - - ionic.requestAnimationFrame(function () { - element.removeClass('content-banner-in'); - - $timeout(function () { - scope.$destroy(); - element.remove(); - body = stateChangeListenDone = null; - }, 400); - }); - - scope.$deregisterBackButton(); - stateChangeListenDone(); - }; - - scope.show = function() { - if (scope.removed) { - return; - } - - getActiveView(body).querySelector('.scroll-content').appendChild(element[0]); - - ionic.requestAnimationFrame(function () { - $timeout(function () { - element.addClass('content-banner-in'); - //automatically close if autoClose is configured - if (scope.autoClose) { - $timeout(function () { - scope.close(); - }, scope.autoClose, false); - } - }, 20, false); - }); - }; - - //set small timeout to let ionic set the active/cached view - $timeout(function () { - scope.show(); - }, 10, false); - - // Expose the scope on $ionContentBanner's return value for the sake of testing it. - scope.close.$scope = scope; - - return scope.close; - } - - return { - show: contentBanner - }; - }]); - - -})(angular, ionic); diff --git a/www/lib/ionic-content-banner/dist/ionic.content.banner.min.css b/www/lib/ionic-content-banner/dist/ionic.content.banner.min.css deleted file mode 100644 index 04d37d1f..00000000 --- a/www/lib/ionic-content-banner/dist/ionic.content.banner.min.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";.content-banner{width:100%;color:#fff;height:30px;line-height:30px;position:absolute;top:0;opacity:.7}.content-banner.error{background-color:red}.content-banner.info{background-color:#333}.content-banner .content-banner-text{-webkit-transition:opacity 500ms linear;transition:opacity 500ms linear;position:absolute;top:0;right:41px;left:41px;text-align:center}.content-banner .content-banner-text.active{opacity:1}.content-banner .content-banner-text:not(.active){opacity:0}.content-banner .content-banner-close{position:absolute;right:5px;top:0;padding:0 12px;height:100%;line-height:30px;min-height:0;color:#fff}.content-banner .content-banner-close:before{line-height:30px}.content-banner-transition-vertical{-webkit-transition:-webkit-transform linear 250ms;transition:transform linear 250ms;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.content-banner-transition-fade{-webkit-transition:opacity 400ms linear;transition:opacity 400ms linear;opacity:0}.content-banner-in{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:.7}
\ No newline at end of file diff --git a/www/lib/ionic-content-banner/dist/ionic.content.banner.min.js b/www/lib/ionic-content-banner/dist/ionic.content.banner.min.js deleted file mode 100644 index 3dede18f..00000000 --- a/www/lib/ionic-content-banner/dist/ionic.content.banner.min.js +++ /dev/null @@ -1 +0,0 @@ -angular.module("jett.ionic.content.banner",["ionic"]),function(n){"use strict";n.module("jett.ionic.content.banner").directive("ionContentBanner",["$interval",function(n){return{restrict:"E",scope:!0,link:function(e,t){var o;e.currentIndex=0,e.text.length>1&&(o=n(function(){e.currentIndex=e.currentIndex<e.text.length-1?e.currentIndex+1:0},e.interval)),e.$on("$destroy",function(){t.remove(),o&&n.cancel(o)})},template:'<div class="content-banner-text-wrapper"><div ng-repeat="item in text track by $index" ng-class="{active: $index === currentIndex}" class="content-banner-text" ng-bind="item"></div></div><button class="content-banner-close button button-icon icon {{::icon}}" ng-click="close()"></button>'}}])}(angular),function(n,e){"use strict";n.module("jett.ionic.content.banner").factory("$ionicContentBanner",["$document","$rootScope","$compile","$timeout","$ionicPlatform",function(t,o,c,r,i){function a(n){for(;null!==n&&"BODY"!==n.nodeName;){var e=n.getAttribute("nav-view");if(null!==e&&"cached"===e)return!1;n=n.parentNode}return!0}function u(n){var e=n.querySelectorAll('ion-view[nav-view="active"]');return 1===e.length?e[0]:Array.prototype.slice.call(e).filter(function(n){return a(n)})[0]}function l(a){var l=o.$new(!0);n.extend(l,{icon:"ion-ios-close-empty",transition:"vertical",interval:7e3,type:"info",$deregisterBackButton:n.noop,closeOnStateChange:!0,autoClose:null},a);var s="content-banner "+l.type+" content-banner-transition-"+l.transition,d=l.element=c('<ion-content-banner class="'+s+'"></ion-content-banner>')(l),f=t[0].body,v=l.closeOnStateChange?o.$on("$stateChangeSuccess",function(){l.close()}):n.noop;return l.$deregisterBackButton=i.registerBackButtonAction(function(){r(l.close)},300),l.close=function(){l.removed||(l.removed=!0,e.requestAnimationFrame(function(){d.removeClass("content-banner-in"),r(function(){l.$destroy(),d.remove(),f=v=null},400)}),l.$deregisterBackButton(),v())},l.show=function(){l.removed||(u(f).querySelector(".scroll-content").appendChild(d[0]),e.requestAnimationFrame(function(){r(function(){d.addClass("content-banner-in"),l.autoClose&&r(function(){l.close()},l.autoClose,!1)},20,!1)}))},r(function(){l.show()},10,!1),l.close.$scope=l,l.close}return{show:l}}])}(angular,ionic); |
