mirror of
https://github.com/arnaucube/commonroutesApp.git
synced 2026-02-07 19:46:44 +01:00
geolocation added on offerCar and travel page
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "angular-material-progressLinear",
|
||||
"version": "1.1.0-master-2b98560",
|
||||
"dependencies": {
|
||||
"angular-material-core": "1.1.0-master-2b98560"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v1.1.1
|
||||
*/
|
||||
md-progress-linear.md-THEME_NAME-theme .md-container {
|
||||
background-color: '{{primary-100}}'; }
|
||||
|
||||
md-progress-linear.md-THEME_NAME-theme .md-bar {
|
||||
background-color: '{{primary-color}}'; }
|
||||
|
||||
md-progress-linear.md-THEME_NAME-theme.md-warn .md-container {
|
||||
background-color: '{{warn-100}}'; }
|
||||
|
||||
md-progress-linear.md-THEME_NAME-theme.md-warn .md-bar {
|
||||
background-color: '{{warn-color}}'; }
|
||||
|
||||
md-progress-linear.md-THEME_NAME-theme.md-accent .md-container {
|
||||
background-color: '{{accent-100}}'; }
|
||||
|
||||
md-progress-linear.md-THEME_NAME-theme.md-accent .md-bar {
|
||||
background-color: '{{accent-color}}'; }
|
||||
|
||||
md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-bar1 {
|
||||
background-color: '{{warn-100}}'; }
|
||||
|
||||
md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-dashed:before {
|
||||
background: -webkit-radial-gradient("{{warn-100}}" 0%, "{{warn-100}}" 16%, transparent 42%);
|
||||
background: radial-gradient("{{warn-100}}" 0%, "{{warn-100}}" 16%, transparent 42%); }
|
||||
|
||||
md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-bar1 {
|
||||
background-color: '{{accent-100}}'; }
|
||||
|
||||
md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-dashed:before {
|
||||
background: -webkit-radial-gradient("{{accent-100}}" 0%, "{{accent-100}}" 16%, transparent 42%);
|
||||
background: radial-gradient("{{accent-100}}" 0%, "{{accent-100}}" 16%, transparent 42%); }
|
||||
6
www/lib/angular-material/modules/js/progressLinear/progressLinear-default-theme.min.css
vendored
Normal file
6
www/lib/angular-material/modules/js/progressLinear/progressLinear-default-theme.min.css
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v1.1.0-master-2b98560
|
||||
*/md-progress-linear.md-THEME_NAME-theme .md-container{background-color:'{{primary-100}}'}md-progress-linear.md-THEME_NAME-theme .md-bar{background-color:'{{primary-color}}'}md-progress-linear.md-THEME_NAME-theme.md-warn .md-container{background-color:'{{warn-100}}'}md-progress-linear.md-THEME_NAME-theme.md-warn .md-bar{background-color:'{{warn-color}}'}md-progress-linear.md-THEME_NAME-theme.md-accent .md-container{background-color:'{{accent-100}}'}md-progress-linear.md-THEME_NAME-theme.md-accent .md-bar{background-color:'{{accent-color}}'}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-bar1{background-color:'{{warn-100}}'}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-dashed:before{background:-webkit-radial-gradient("{{warn-100}}" 0,"{{warn-100}}" 16%,transparent 42%);background:radial-gradient("{{warn-100}}" 0,"{{warn-100}}" 16%,transparent 42%)}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-bar1{background-color:'{{accent-100}}'}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-dashed:before{background:-webkit-radial-gradient("{{accent-100}}" 0,"{{accent-100}}" 16%,transparent 42%);background:radial-gradient("{{accent-100}}" 0,"{{accent-100}}" 16%,transparent 42%)}
|
||||
@@ -0,0 +1,261 @@
|
||||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v1.1.1
|
||||
*/
|
||||
md-progress-linear {
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 5px;
|
||||
padding-top: 0 !important;
|
||||
margin-bottom: 0 !important; }
|
||||
md-progress-linear._md-progress-linear-disabled {
|
||||
visibility: hidden; }
|
||||
md-progress-linear .md-container {
|
||||
display: block;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
height: 5px;
|
||||
-webkit-transform: translate(0, 0) scale(1, 1);
|
||||
transform: translate(0, 0) scale(1, 1); }
|
||||
md-progress-linear .md-container .md-bar {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 5px; }
|
||||
md-progress-linear .md-container .md-dashed:before {
|
||||
content: "";
|
||||
display: none;
|
||||
position: absolute;
|
||||
margin-top: 0;
|
||||
height: 5px;
|
||||
width: 100%;
|
||||
background-color: transparent;
|
||||
background-size: 10px 10px !important;
|
||||
background-position: 0px -23px; }
|
||||
md-progress-linear .md-container .md-bar1, md-progress-linear .md-container .md-bar2 {
|
||||
-webkit-transition: -webkit-transform 0.2s linear;
|
||||
transition: -webkit-transform 0.2s linear;
|
||||
transition: transform 0.2s linear;
|
||||
transition: transform 0.2s linear, -webkit-transform 0.2s linear; }
|
||||
md-progress-linear .md-container.md-mode-query .md-bar1 {
|
||||
display: none; }
|
||||
md-progress-linear .md-container.md-mode-query .md-bar2 {
|
||||
-webkit-transition: all 0.2s linear;
|
||||
transition: all 0.2s linear;
|
||||
-webkit-animation: query 0.8s infinite cubic-bezier(0.39, 0.575, 0.565, 1);
|
||||
animation: query 0.8s infinite cubic-bezier(0.39, 0.575, 0.565, 1); }
|
||||
md-progress-linear .md-container.md-mode-determinate .md-bar1 {
|
||||
display: none; }
|
||||
md-progress-linear .md-container.md-mode-indeterminate .md-bar1 {
|
||||
-webkit-animation: md-progress-linear-indeterminate-scale-1 4s infinite, md-progress-linear-indeterminate-1 4s infinite;
|
||||
animation: md-progress-linear-indeterminate-scale-1 4s infinite, md-progress-linear-indeterminate-1 4s infinite; }
|
||||
md-progress-linear .md-container.md-mode-indeterminate .md-bar2 {
|
||||
-webkit-animation: md-progress-linear-indeterminate-scale-2 4s infinite, md-progress-linear-indeterminate-2 4s infinite;
|
||||
animation: md-progress-linear-indeterminate-scale-2 4s infinite, md-progress-linear-indeterminate-2 4s infinite; }
|
||||
md-progress-linear .md-container.ng-hide ._md-progress-linear-disabled md-progress-linear .md-container {
|
||||
-webkit-animation: none;
|
||||
animation: none; }
|
||||
md-progress-linear .md-container.ng-hide ._md-progress-linear-disabled md-progress-linear .md-container .md-bar1 {
|
||||
-webkit-animation-name: none;
|
||||
animation-name: none; }
|
||||
md-progress-linear .md-container.ng-hide ._md-progress-linear-disabled md-progress-linear .md-container .md-bar2 {
|
||||
-webkit-animation-name: none;
|
||||
animation-name: none; }
|
||||
md-progress-linear .md-container.md-mode-buffer {
|
||||
background-color: transparent !important;
|
||||
-webkit-transition: all 0.2s linear;
|
||||
transition: all 0.2s linear; }
|
||||
md-progress-linear .md-container.md-mode-buffer .md-dashed:before {
|
||||
display: block;
|
||||
-webkit-animation: buffer 3s infinite linear;
|
||||
animation: buffer 3s infinite linear; }
|
||||
|
||||
@-webkit-keyframes query {
|
||||
0% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateX(35%) scale(0.3, 1);
|
||||
transform: translateX(35%) scale(0.3, 1); }
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateX(-50%) scale(0, 1);
|
||||
transform: translateX(-50%) scale(0, 1); } }
|
||||
|
||||
@keyframes query {
|
||||
0% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateX(35%) scale(0.3, 1);
|
||||
transform: translateX(35%) scale(0.3, 1); }
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateX(-50%) scale(0, 1);
|
||||
transform: translateX(-50%) scale(0, 1); } }
|
||||
|
||||
@-webkit-keyframes buffer {
|
||||
0% {
|
||||
opacity: 1;
|
||||
background-position: 0px -23px; }
|
||||
50% {
|
||||
opacity: 0; }
|
||||
100% {
|
||||
opacity: 1;
|
||||
background-position: -200px -23px; } }
|
||||
|
||||
@keyframes buffer {
|
||||
0% {
|
||||
opacity: 1;
|
||||
background-position: 0px -23px; }
|
||||
50% {
|
||||
opacity: 0; }
|
||||
100% {
|
||||
opacity: 1;
|
||||
background-position: -200px -23px; } }
|
||||
|
||||
@-webkit-keyframes md-progress-linear-indeterminate-scale-1 {
|
||||
0% {
|
||||
-webkit-transform: scaleX(0.1);
|
||||
transform: scaleX(0.1);
|
||||
-webkit-animation-timing-function: linear;
|
||||
animation-timing-function: linear; }
|
||||
36.6% {
|
||||
-webkit-transform: scaleX(0.1);
|
||||
transform: scaleX(0.1);
|
||||
-webkit-animation-timing-function: cubic-bezier(0.33473, 0.12482, 0.78584, 1);
|
||||
animation-timing-function: cubic-bezier(0.33473, 0.12482, 0.78584, 1); }
|
||||
69.15% {
|
||||
-webkit-transform: scaleX(0.83);
|
||||
transform: scaleX(0.83);
|
||||
-webkit-animation-timing-function: cubic-bezier(0.22573, 0, 0.23365, 1.37098);
|
||||
animation-timing-function: cubic-bezier(0.22573, 0, 0.23365, 1.37098); }
|
||||
100% {
|
||||
-webkit-transform: scaleX(0.1);
|
||||
transform: scaleX(0.1); } }
|
||||
|
||||
@keyframes md-progress-linear-indeterminate-scale-1 {
|
||||
0% {
|
||||
-webkit-transform: scaleX(0.1);
|
||||
transform: scaleX(0.1);
|
||||
-webkit-animation-timing-function: linear;
|
||||
animation-timing-function: linear; }
|
||||
36.6% {
|
||||
-webkit-transform: scaleX(0.1);
|
||||
transform: scaleX(0.1);
|
||||
-webkit-animation-timing-function: cubic-bezier(0.33473, 0.12482, 0.78584, 1);
|
||||
animation-timing-function: cubic-bezier(0.33473, 0.12482, 0.78584, 1); }
|
||||
69.15% {
|
||||
-webkit-transform: scaleX(0.83);
|
||||
transform: scaleX(0.83);
|
||||
-webkit-animation-timing-function: cubic-bezier(0.22573, 0, 0.23365, 1.37098);
|
||||
animation-timing-function: cubic-bezier(0.22573, 0, 0.23365, 1.37098); }
|
||||
100% {
|
||||
-webkit-transform: scaleX(0.1);
|
||||
transform: scaleX(0.1); } }
|
||||
|
||||
@-webkit-keyframes md-progress-linear-indeterminate-1 {
|
||||
0% {
|
||||
left: -105.16667%;
|
||||
-webkit-animation-timing-function: linear;
|
||||
animation-timing-function: linear; }
|
||||
20% {
|
||||
left: -105.16667%;
|
||||
-webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582);
|
||||
animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582); }
|
||||
69.15% {
|
||||
left: 21.5%;
|
||||
-webkit-animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635);
|
||||
animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635); }
|
||||
100% {
|
||||
left: 95.44444%; } }
|
||||
|
||||
@keyframes md-progress-linear-indeterminate-1 {
|
||||
0% {
|
||||
left: -105.16667%;
|
||||
-webkit-animation-timing-function: linear;
|
||||
animation-timing-function: linear; }
|
||||
20% {
|
||||
left: -105.16667%;
|
||||
-webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582);
|
||||
animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582); }
|
||||
69.15% {
|
||||
left: 21.5%;
|
||||
-webkit-animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635);
|
||||
animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635); }
|
||||
100% {
|
||||
left: 95.44444%; } }
|
||||
|
||||
@-webkit-keyframes md-progress-linear-indeterminate-scale-2 {
|
||||
0% {
|
||||
-webkit-transform: scaleX(0.1);
|
||||
transform: scaleX(0.1);
|
||||
-webkit-animation-timing-function: cubic-bezier(0.20503, 0.05705, 0.57661, 0.45397);
|
||||
animation-timing-function: cubic-bezier(0.20503, 0.05705, 0.57661, 0.45397); }
|
||||
19.15% {
|
||||
-webkit-transform: scaleX(0.57);
|
||||
transform: scaleX(0.57);
|
||||
-webkit-animation-timing-function: cubic-bezier(0.15231, 0.19643, 0.64837, 1.00432);
|
||||
animation-timing-function: cubic-bezier(0.15231, 0.19643, 0.64837, 1.00432); }
|
||||
44.15% {
|
||||
-webkit-transform: scaleX(0.91);
|
||||
transform: scaleX(0.91);
|
||||
-webkit-animation-timing-function: cubic-bezier(0.25776, -0.00316, 0.21176, 1.38179);
|
||||
animation-timing-function: cubic-bezier(0.25776, -0.00316, 0.21176, 1.38179); }
|
||||
100% {
|
||||
-webkit-transform: scaleX(0.1);
|
||||
transform: scaleX(0.1); } }
|
||||
|
||||
@keyframes md-progress-linear-indeterminate-scale-2 {
|
||||
0% {
|
||||
-webkit-transform: scaleX(0.1);
|
||||
transform: scaleX(0.1);
|
||||
-webkit-animation-timing-function: cubic-bezier(0.20503, 0.05705, 0.57661, 0.45397);
|
||||
animation-timing-function: cubic-bezier(0.20503, 0.05705, 0.57661, 0.45397); }
|
||||
19.15% {
|
||||
-webkit-transform: scaleX(0.57);
|
||||
transform: scaleX(0.57);
|
||||
-webkit-animation-timing-function: cubic-bezier(0.15231, 0.19643, 0.64837, 1.00432);
|
||||
animation-timing-function: cubic-bezier(0.15231, 0.19643, 0.64837, 1.00432); }
|
||||
44.15% {
|
||||
-webkit-transform: scaleX(0.91);
|
||||
transform: scaleX(0.91);
|
||||
-webkit-animation-timing-function: cubic-bezier(0.25776, -0.00316, 0.21176, 1.38179);
|
||||
animation-timing-function: cubic-bezier(0.25776, -0.00316, 0.21176, 1.38179); }
|
||||
100% {
|
||||
-webkit-transform: scaleX(0.1);
|
||||
transform: scaleX(0.1); } }
|
||||
|
||||
@-webkit-keyframes md-progress-linear-indeterminate-2 {
|
||||
0% {
|
||||
left: -54.88889%;
|
||||
-webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40968);
|
||||
animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40968); }
|
||||
25% {
|
||||
left: -17.25%;
|
||||
-webkit-animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73372);
|
||||
animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73372); }
|
||||
48.35% {
|
||||
left: 29.5%;
|
||||
-webkit-animation-timing-function: cubic-bezier(0.4, 0.62703, 0.6, 0.90203);
|
||||
animation-timing-function: cubic-bezier(0.4, 0.62703, 0.6, 0.90203); }
|
||||
100% {
|
||||
left: 117.38889%; } }
|
||||
|
||||
@keyframes md-progress-linear-indeterminate-2 {
|
||||
0% {
|
||||
left: -54.88889%;
|
||||
-webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40968);
|
||||
animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40968); }
|
||||
25% {
|
||||
left: -17.25%;
|
||||
-webkit-animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73372);
|
||||
animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73372); }
|
||||
48.35% {
|
||||
left: 29.5%;
|
||||
-webkit-animation-timing-function: cubic-bezier(0.4, 0.62703, 0.6, 0.90203);
|
||||
animation-timing-function: cubic-bezier(0.4, 0.62703, 0.6, 0.90203); }
|
||||
100% {
|
||||
left: 117.38889%; } }
|
||||
214
www/lib/angular-material/modules/js/progressLinear/progressLinear.js
vendored
Normal file
214
www/lib/angular-material/modules/js/progressLinear/progressLinear.js
vendored
Normal file
@@ -0,0 +1,214 @@
|
||||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v1.1.1
|
||||
*/
|
||||
(function( window, angular, undefined ){
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @ngdoc module
|
||||
* @name material.components.progressLinear
|
||||
* @description Linear Progress module!
|
||||
*/
|
||||
MdProgressLinearDirective.$inject = ["$mdTheming", "$mdUtil", "$log"];
|
||||
angular.module('material.components.progressLinear', [
|
||||
'material.core'
|
||||
])
|
||||
.directive('mdProgressLinear', MdProgressLinearDirective);
|
||||
|
||||
/**
|
||||
* @ngdoc directive
|
||||
* @name mdProgressLinear
|
||||
* @module material.components.progressLinear
|
||||
* @restrict E
|
||||
*
|
||||
* @description
|
||||
* The linear progress directive is used to make loading content
|
||||
* in your app as delightful and painless as possible by minimizing
|
||||
* the amount of visual change a user sees before they can view
|
||||
* and interact with content.
|
||||
*
|
||||
* Each operation should only be represented by one activity indicator
|
||||
* For example: one refresh operation should not display both a
|
||||
* refresh bar and an activity circle.
|
||||
*
|
||||
* For operations where the percentage of the operation completed
|
||||
* can be determined, use a determinate indicator. They give users
|
||||
* a quick sense of how long an operation will take.
|
||||
*
|
||||
* For operations where the user is asked to wait a moment while
|
||||
* something finishes up, and it’s not necessary to expose what's
|
||||
* happening behind the scenes and how long it will take, use an
|
||||
* indeterminate indicator.
|
||||
*
|
||||
* @param {string} md-mode Select from one of four modes: determinate, indeterminate, buffer or query.
|
||||
*
|
||||
* Note: if the `md-mode` value is set as undefined or specified as 1 of the four (4) valid modes, then `indeterminate`
|
||||
* will be auto-applied as the mode.
|
||||
*
|
||||
* Note: if not configured, the `md-mode="indeterminate"` will be auto injected as an attribute. If `value=""` is also specified, however,
|
||||
* then `md-mode="determinate"` would be auto-injected instead.
|
||||
* @param {number=} value In determinate and buffer modes, this number represents the percentage of the primary progress bar. Default: 0
|
||||
* @param {number=} md-buffer-value In the buffer mode, this number represents the percentage of the secondary progress bar. Default: 0
|
||||
* @param {boolean=} ng-disabled Determines whether to disable the progress element.
|
||||
*
|
||||
* @usage
|
||||
* <hljs lang="html">
|
||||
* <md-progress-linear md-mode="determinate" value="..."></md-progress-linear>
|
||||
*
|
||||
* <md-progress-linear md-mode="determinate" ng-value="..."></md-progress-linear>
|
||||
*
|
||||
* <md-progress-linear md-mode="indeterminate"></md-progress-linear>
|
||||
*
|
||||
* <md-progress-linear md-mode="buffer" value="..." md-buffer-value="..."></md-progress-linear>
|
||||
*
|
||||
* <md-progress-linear md-mode="query"></md-progress-linear>
|
||||
* </hljs>
|
||||
*/
|
||||
function MdProgressLinearDirective($mdTheming, $mdUtil, $log) {
|
||||
var MODE_DETERMINATE = "determinate";
|
||||
var MODE_INDETERMINATE = "indeterminate";
|
||||
var MODE_BUFFER = "buffer";
|
||||
var MODE_QUERY = "query";
|
||||
var DISABLED_CLASS = "_md-progress-linear-disabled";
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
template: '<div class="md-container">' +
|
||||
'<div class="md-dashed"></div>' +
|
||||
'<div class="md-bar md-bar1"></div>' +
|
||||
'<div class="md-bar md-bar2"></div>' +
|
||||
'</div>',
|
||||
compile: compile
|
||||
};
|
||||
|
||||
function compile(tElement, tAttrs, transclude) {
|
||||
tElement.attr('aria-valuemin', 0);
|
||||
tElement.attr('aria-valuemax', 100);
|
||||
tElement.attr('role', 'progressbar');
|
||||
|
||||
return postLink;
|
||||
}
|
||||
function postLink(scope, element, attr) {
|
||||
$mdTheming(element);
|
||||
|
||||
var lastMode;
|
||||
var isDisabled = attr.hasOwnProperty('disabled');
|
||||
var toVendorCSS = $mdUtil.dom.animator.toCss;
|
||||
var bar1 = angular.element(element[0].querySelector('.md-bar1'));
|
||||
var bar2 = angular.element(element[0].querySelector('.md-bar2'));
|
||||
var container = angular.element(element[0].querySelector('.md-container'));
|
||||
|
||||
element
|
||||
.attr('md-mode', mode())
|
||||
.toggleClass(DISABLED_CLASS, isDisabled);
|
||||
|
||||
validateMode();
|
||||
watchAttributes();
|
||||
|
||||
/**
|
||||
* Watch the value, md-buffer-value, and md-mode attributes
|
||||
*/
|
||||
function watchAttributes() {
|
||||
attr.$observe('value', function(value) {
|
||||
var percentValue = clamp(value);
|
||||
element.attr('aria-valuenow', percentValue);
|
||||
|
||||
if (mode() != MODE_QUERY) animateIndicator(bar2, percentValue);
|
||||
});
|
||||
|
||||
attr.$observe('mdBufferValue', function(value) {
|
||||
animateIndicator(bar1, clamp(value));
|
||||
});
|
||||
|
||||
attr.$observe('disabled', function(value) {
|
||||
if (value === true || value === false) {
|
||||
isDisabled = !!value;
|
||||
} else {
|
||||
isDisabled = angular.isDefined(value);
|
||||
}
|
||||
|
||||
element.toggleClass(DISABLED_CLASS, isDisabled);
|
||||
container.toggleClass(lastMode, !isDisabled);
|
||||
});
|
||||
|
||||
attr.$observe('mdMode', function(mode) {
|
||||
if (lastMode) container.removeClass( lastMode );
|
||||
|
||||
switch( mode ) {
|
||||
case MODE_QUERY:
|
||||
case MODE_BUFFER:
|
||||
case MODE_DETERMINATE:
|
||||
case MODE_INDETERMINATE:
|
||||
container.addClass( lastMode = "md-mode-" + mode );
|
||||
break;
|
||||
default:
|
||||
container.addClass( lastMode = "md-mode-" + MODE_INDETERMINATE );
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Auto-defaults the mode to either `determinate` or `indeterminate` mode; if not specified
|
||||
*/
|
||||
function validateMode() {
|
||||
if ( angular.isUndefined(attr.mdMode) ) {
|
||||
var hasValue = angular.isDefined(attr.value);
|
||||
var mode = hasValue ? MODE_DETERMINATE : MODE_INDETERMINATE;
|
||||
var info = "Auto-adding the missing md-mode='{0}' to the ProgressLinear element";
|
||||
|
||||
//$log.debug( $mdUtil.supplant(info, [mode]) );
|
||||
|
||||
element.attr("md-mode", mode);
|
||||
attr.mdMode = mode;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the md-mode a valid option?
|
||||
*/
|
||||
function mode() {
|
||||
var value = (attr.mdMode || "").trim();
|
||||
if ( value ) {
|
||||
switch(value) {
|
||||
case MODE_DETERMINATE:
|
||||
case MODE_INDETERMINATE:
|
||||
case MODE_BUFFER:
|
||||
case MODE_QUERY:
|
||||
break;
|
||||
default:
|
||||
value = MODE_INDETERMINATE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Manually set CSS to animate the Determinate indicator based on the specified
|
||||
* percentage value (0-100).
|
||||
*/
|
||||
function animateIndicator(target, value) {
|
||||
if ( isDisabled || !mode() ) return;
|
||||
|
||||
var to = $mdUtil.supplant("translateX({0}%) scale({1},1)", [ (value-100)/2, value/100 ]);
|
||||
var styles = toVendorCSS({ transform : to });
|
||||
angular.element(target).css( styles );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clamps the value to be between 0 and 100.
|
||||
* @param {number} value The value to clamp.
|
||||
* @returns {number}
|
||||
*/
|
||||
function clamp(value) {
|
||||
return Math.max(0, Math.min(value || 0, 100));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})(window, window.angular);
|
||||
6
www/lib/angular-material/modules/js/progressLinear/progressLinear.min.css
vendored
Normal file
6
www/lib/angular-material/modules/js/progressLinear/progressLinear.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
www/lib/angular-material/modules/js/progressLinear/progressLinear.min.js
vendored
Normal file
7
www/lib/angular-material/modules/js/progressLinear/progressLinear.min.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v1.1.0-master-2b98560
|
||||
*/
|
||||
!function(e,a,r){"use strict";function t(e,r,t){function d(e,a,r){return e.attr("aria-valuemin",0),e.attr("aria-valuemax",100),e.attr("role","progressbar"),n}function n(t,d,n){function u(){n.$observe("value",function(e){var a=i(e);d.attr("aria-valuenow",a),v()!=l&&b(h,a)}),n.$observe("mdBufferValue",function(e){b($,i(e))}),n.$observe("disabled",function(e){p=e===!0||e===!1?!!e:a.isDefined(e),d.toggleClass(c,p),C.toggleClass(g,!p)}),n.$observe("mdMode",function(e){switch(g&&C.removeClass(g),e){case l:case m:case s:case o:C.addClass(g="md-mode-"+e);break;default:C.addClass(g="md-mode-"+o)}})}function f(){if(a.isUndefined(n.mdMode)){var e=a.isDefined(n.value),r=e?s:o;d.attr("md-mode",r),n.mdMode=r}}function v(){var e=(n.mdMode||"").trim();if(e)switch(e){case s:case o:case m:case l:break;default:e=o}return e}function b(e,t){if(!p&&v()){var d=r.supplant("translateX({0}%) scale({1},1)",[(t-100)/2,t/100]),n=w({transform:d});a.element(e).css(n)}}e(d);var g,p=n.hasOwnProperty("disabled"),w=r.dom.animator.toCss,$=a.element(d[0].querySelector(".md-bar1")),h=a.element(d[0].querySelector(".md-bar2")),C=a.element(d[0].querySelector(".md-container"));d.attr("md-mode",v()).toggleClass(c,p),f(),u()}function i(e){return Math.max(0,Math.min(e||0,100))}var s="determinate",o="indeterminate",m="buffer",l="query",c="_md-progress-linear-disabled";return{restrict:"E",template:'<div class="md-container"><div class="md-dashed"></div><div class="md-bar md-bar1"></div><div class="md-bar md-bar2"></div></div>',compile:d}}t.$inject=["$mdTheming","$mdUtil","$log"],a.module("material.components.progressLinear",["material.core"]).directive("mdProgressLinear",t)}(window,window.angular);
|
||||
Reference in New Issue
Block a user