mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-05 16:59:21 +00:00
(js/css) Update generated files
This commit is contained in:
1 parent
1d2763af3c
commit
ace7e0771f
14 files changed
+398
-385
No files matched your search
+77
-234
@@ -2,7 +2,7 @@
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v1.0.5-master-9e7937e
|
||||
* v1.0.5
|
||||
*/
|
||||
(function( window, angular, undefined ){
|
||||
"use strict";
|
||||
@@ -272,8 +272,7 @@ function MdConstantFactory($sniffer) {
|
||||
'gt-md' : '(min-width: 1280px)' ,
|
||||
'lg' : '(min-width: 1280px) and (max-width: 1919px)',
|
||||
'gt-lg' : '(min-width: 1920px)' ,
|
||||
'xl' : '(min-width: 1920px)' ,
|
||||
'print' : 'print'
|
||||
'xl' : '(min-width: 1920px)'
|
||||
},
|
||||
MEDIA_PRIORITY: [
|
||||
'xl',
|
||||
@@ -284,8 +283,7 @@ function MdConstantFactory($sniffer) {
|
||||
'gt-sm',
|
||||
'sm',
|
||||
'gt-xs',
|
||||
'xs',
|
||||
'print'
|
||||
'xs'
|
||||
]
|
||||
};
|
||||
}
|
||||
@@ -586,10 +584,6 @@ angular.module('material.core')
|
||||
* <td>xl</td>
|
||||
* <td>(min-width: 1920px)</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>print</td>
|
||||
* <td>print</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
@@ -3051,7 +3045,7 @@ function InterimElementProvider() {
|
||||
|
||||
var $mdUtil, $interpolate, $log;
|
||||
|
||||
var SUFFIXES = /(-gt)?-(sm|md|lg|print)/g;
|
||||
var SUFFIXES = /(-gt)?-(sm|md|lg)/g;
|
||||
var WHITESPACE = /\s+/g;
|
||||
|
||||
var FLEX_OPTIONS = ['grow', 'initial', 'auto', 'none', 'noshrink', 'nogrow' ];
|
||||
@@ -3125,7 +3119,7 @@ function InterimElementProvider() {
|
||||
var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
|
||||
|
||||
// NOTE: these are also defined in constants::MEDIA_PRIORITY and constants::MEDIA
|
||||
var BREAKPOINTS = [ "", "xs", "gt-xs", "sm", "gt-sm", "md", "gt-md", "lg", "gt-lg", "xl", "print" ];
|
||||
var BREAKPOINTS = [ "", "xs", "gt-xs", "sm", "gt-sm", "md", "gt-md", "lg", "gt-lg", "xl" ];
|
||||
var API_WITH_VALUES = [ "layout", "flex", "flex-order", "flex-offset", "layout-align" ];
|
||||
var API_NO_VALUES = [ "show", "hide", "layout-padding", "layout-margin" ];
|
||||
|
||||
@@ -4498,8 +4492,8 @@ angular.module('material.core.theming.palette', [])
|
||||
'A400': '#00e676',
|
||||
'A700': '#00c853',
|
||||
'contrastDefaultColor': 'dark',
|
||||
'contrastLightColors': '500 600 700 800 900',
|
||||
'contrastStrongLightColors': '500 600 700'
|
||||
'contrastLightColors': '600 700 800 900',
|
||||
'contrastStrongLightColors': '600 700'
|
||||
},
|
||||
'light-green': {
|
||||
'50': '#f1f8e9',
|
||||
@@ -4665,8 +4659,8 @@ angular.module('material.core.theming.palette', [])
|
||||
'A400': '#78909c',
|
||||
'A700': '#455a64',
|
||||
'contrastDefaultColor': 'light',
|
||||
'contrastDarkColors': '50 100 200 300 700',
|
||||
'contrastStrongLightColors': '400 500 700'
|
||||
'contrastDarkColors': '50 100 200 300',
|
||||
'contrastStrongLightColors': '400 500'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -6384,7 +6378,6 @@ angular
|
||||
* the `md-primary` class.
|
||||
*
|
||||
* @param {boolean=} md-no-ink If present, disable ripple ink effects.
|
||||
* @param {boolean=} md-no-focus-style If present, disable focus style on button
|
||||
* @param {expression=} ng-disabled En/Disable based on the expression
|
||||
* @param {string=} md-ripple-size Overrides the default ripple size logic. Options: `full`, `partial`, `auto`
|
||||
* @param {string=} aria-label Adds alternative text to button for accessibility, useful for icon buttons.
|
||||
@@ -6468,10 +6461,9 @@ function MdButtonDirective($mdButtonInkRipple, $mdTheming, $mdAria, $timeout) {
|
||||
}
|
||||
});
|
||||
|
||||
if (!angular.isDefined(attr.mdNoFocusStyle)) {
|
||||
// restrict focus styles to the keyboard
|
||||
scope.mouseActive = false;
|
||||
element.on('mousedown', function() {
|
||||
// restrict focus styles to the keyboard
|
||||
scope.mouseActive = false;
|
||||
element.on('mousedown', function() {
|
||||
scope.mouseActive = true;
|
||||
$timeout(function(){
|
||||
scope.mouseActive = false;
|
||||
@@ -6485,7 +6477,6 @@ function MdButtonDirective($mdButtonInkRipple, $mdTheming, $mdAria, $timeout) {
|
||||
.on('blur', function(ev) {
|
||||
element.removeClass('md-focused');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8920,13 +8911,9 @@ angular
|
||||
* Inside, use an `<md-dialog-content>` element for the dialog's content, and use
|
||||
* an `<md-dialog-actions>` element for the dialog's actions.
|
||||
*
|
||||
* ## CSS
|
||||
* * ## CSS
|
||||
* - `.md-dialog-content` - class that sets the padding on the content as the spec file
|
||||
*
|
||||
* ## Notes
|
||||
* - If you specify an `id` for the `<md-dialog>`, the `<md-dialog-content>` will have the same `id`
|
||||
* prefixed with `dialogContent_`.
|
||||
*
|
||||
* @usage
|
||||
* ### Dialog template
|
||||
* <hljs lang="html">
|
||||
@@ -9266,32 +9253,6 @@ MdDialogDirective.$inject = ["$$rAF", "$mdTheming", "$mdDialog"];
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $mdDialog#prompt
|
||||
*
|
||||
* @description
|
||||
* Builds a preconfigured dialog with the specified message and input box. You can call show and the promise returned
|
||||
* will be resolved only if the user clicks the prompt action on the dialog, passing the input value as the first argument.
|
||||
*
|
||||
* @returns {obj} an `$mdDialogPreset` with the chainable configuration methods:
|
||||
*
|
||||
* Additionally, it supports the following methods:
|
||||
*
|
||||
* - $mdDialogPreset#title(string) - Sets the prompt title.
|
||||
* - $mdDialogPreset#textContent(string) - Sets the prompt message.
|
||||
* - $mdDialogPreset#htmlContent(string) - Sets the prompt message as HTML. Requires ngSanitize
|
||||
* module to be loaded. HTML is not run through Angular's compiler.
|
||||
* - $mdDialogPreset#placeholder(string) - Sets the placeholder text for the input.
|
||||
* - $mdDialogPreset#ok(string) - Sets the prompt "Okay" button text.
|
||||
* - $mdDialogPreset#cancel(string) - Sets the prompt "Cancel" button text.
|
||||
* - $mdDialogPreset#theme(string) - Sets the theme of the prompt dialog.
|
||||
* - $mdDialogPreset#targetEvent(DOMClickEvent=) - A click's event object. When passed in as an option,
|
||||
* the location of the click will be used as the starting point for the opening animation
|
||||
* of the the dialog.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $mdDialog#show
|
||||
@@ -9384,7 +9345,7 @@ function MdDialogProvider($$interimElementProvider) {
|
||||
// Elements to capture and redirect focus when the user presses tab at the dialog boundary.
|
||||
var topFocusTrap, bottomFocusTrap;
|
||||
|
||||
advancedDialogOptions.$inject = ["$mdDialog", "$mdTheming", "$mdConstant"];
|
||||
advancedDialogOptions.$inject = ["$mdDialog", "$mdTheming"];
|
||||
dialogDefaultOptions.$inject = ["$mdDialog", "$mdAria", "$mdUtil", "$mdConstant", "$animate", "$document", "$window", "$rootElement", "$log", "$injector"];
|
||||
return $$interimElementProvider('$mdDialog')
|
||||
.setDefaults({
|
||||
@@ -9401,15 +9362,10 @@ function MdDialogProvider($$interimElementProvider) {
|
||||
methods: ['title', 'htmlContent', 'textContent', 'content', 'ariaLabel', 'ok', 'cancel',
|
||||
'theme', 'css'],
|
||||
options: advancedDialogOptions
|
||||
})
|
||||
.addPreset('prompt', {
|
||||
methods: ['title', 'htmlContent', 'textContent', 'content', 'placeholder', 'ariaLabel',
|
||||
'ok', 'cancel', 'theme', 'css'],
|
||||
options: advancedDialogOptions
|
||||
});
|
||||
|
||||
/* @ngInject */
|
||||
function advancedDialogOptions($mdDialog, $mdTheming, $mdConstant) {
|
||||
function advancedDialogOptions($mdDialog, $mdTheming) {
|
||||
return {
|
||||
template: [
|
||||
'<md-dialog md-theme="{{ dialog.theme }}" aria-label="{{ dialog.ariaLabel }}" ng-class="dialog.css">',
|
||||
@@ -9420,16 +9376,13 @@ function MdDialogProvider($$interimElementProvider) {
|
||||
' <div ng-if="::!dialog.mdHtmlContent" class="md-dialog-content-body">',
|
||||
' <p>{{::dialog.mdTextContent}}</p>',
|
||||
' </div>',
|
||||
' <md-input-container md-no-float ng-if="::dialog.$type == \'prompt\'" class="md-prompt-input-container">',
|
||||
' <input ng-keypress="dialog.keypress($event)" md-autofocus ng-model="dialog.result" placeholder="{{::dialog.placeholder}}">',
|
||||
' </md-input-container>',
|
||||
' </md-dialog-content>',
|
||||
' <md-dialog-actions>',
|
||||
' <md-button ng-if="dialog.$type === \'confirm\' || dialog.$type === \'prompt\'"' +
|
||||
' <md-button ng-if="dialog.$type == \'confirm\'"' +
|
||||
' ng-click="dialog.abort()" class="md-primary">',
|
||||
' {{ dialog.cancel }}',
|
||||
' </md-button>',
|
||||
' <md-button ng-click="dialog.hide()" class="md-primary" md-autofocus="dialog.$type===\'alert\'">',
|
||||
' <md-button ng-click="dialog.hide()" class="md-primary" md-autofocus="dialog.$type!=\'confirm\'">',
|
||||
' {{ dialog.ok }}',
|
||||
' </md-button>',
|
||||
' </md-dialog-actions>',
|
||||
@@ -9437,16 +9390,11 @@ function MdDialogProvider($$interimElementProvider) {
|
||||
].join('').replace(/\s\s+/g, ''),
|
||||
controller: function mdDialogCtrl() {
|
||||
this.hide = function() {
|
||||
$mdDialog.hide(this.$type === 'prompt' ? this.result : true);
|
||||
$mdDialog.hide(true);
|
||||
};
|
||||
this.abort = function() {
|
||||
$mdDialog.cancel();
|
||||
};
|
||||
this.keypress = function($event) {
|
||||
if ($event.keyCode === $mdConstant.KEY_CODE.ENTER) {
|
||||
$mdDialog.hide(this.result)
|
||||
}
|
||||
}
|
||||
},
|
||||
controllerAs: 'dialog',
|
||||
bindToController: true,
|
||||
@@ -9790,7 +9738,7 @@ function MdDialogProvider($$interimElementProvider) {
|
||||
|
||||
var role = (options.$type === 'alert') ? 'alertdialog' : 'dialog';
|
||||
var dialogContent = element.find('md-dialog-content');
|
||||
var dialogContentId = ('dialogContent_' + element.attr('id')) || ('dialogContent_' + $mdUtil.nextUid());
|
||||
var dialogId = element.attr('id') || ('dialog_' + $mdUtil.nextUid());
|
||||
|
||||
element.attr({
|
||||
'role': role,
|
||||
@@ -9801,8 +9749,8 @@ function MdDialogProvider($$interimElementProvider) {
|
||||
dialogContent = element;
|
||||
}
|
||||
|
||||
dialogContent.attr('id', dialogContentId);
|
||||
element.attr('aria-describedby', dialogContentId);
|
||||
dialogContent.attr('id', dialogId);
|
||||
element.attr('aria-describedby', dialogId);
|
||||
|
||||
if (options.ariaLabel) {
|
||||
$mdAria.expect(element, 'aria-label', options.ariaLabel);
|
||||
@@ -10069,9 +10017,9 @@ MdDividerDirective.$inject = ["$mdTheming"];
|
||||
'use strict';
|
||||
|
||||
angular.module('material.components.fabShared', ['material.core'])
|
||||
.controller('MdFabController', MdFabController);
|
||||
.controller('FabController', FabController);
|
||||
|
||||
function MdFabController($scope, $element, $animate, $mdUtil, $mdConstant, $timeout) {
|
||||
function FabController($scope, $element, $animate, $mdUtil, $mdConstant, $timeout) {
|
||||
var vm = this;
|
||||
|
||||
// NOTE: We use async eval(s) below to avoid conflicts with any existing digest loops
|
||||
@@ -10360,7 +10308,7 @@ MdDividerDirective.$inject = ["$mdTheming"];
|
||||
return $element.find('md-fab-actions');
|
||||
}
|
||||
}
|
||||
MdFabController.$inject = ["$scope", "$element", "$animate", "$mdUtil", "$mdConstant", "$timeout"];
|
||||
FabController.$inject = ["$scope", "$element", "$animate", "$mdUtil", "$mdConstant", "$timeout"];
|
||||
})();
|
||||
|
||||
})();
|
||||
@@ -10475,7 +10423,7 @@ MdDividerDirective.$inject = ["$mdTheming"];
|
||||
},
|
||||
|
||||
bindToController: true,
|
||||
controller: 'MdFabController',
|
||||
controller: 'FabController',
|
||||
controllerAs: 'vm',
|
||||
|
||||
link: FabSpeedDialLink
|
||||
@@ -10714,7 +10662,7 @@ MdDividerDirective.$inject = ["$mdTheming"];
|
||||
},
|
||||
|
||||
bindToController: true,
|
||||
controller: 'MdFabController',
|
||||
controller: 'FabController',
|
||||
controllerAs: 'vm',
|
||||
|
||||
link: link
|
||||
@@ -11708,9 +11656,6 @@ angular.module('material.components.input', [
|
||||
* </hljs>
|
||||
*/
|
||||
function mdInputContainerDirective($mdTheming, $parse) {
|
||||
|
||||
var INPUT_TAGS = ['INPUT', 'TEXTAREA', 'MD-SELECT'];
|
||||
|
||||
ContainerCtrl.$inject = ["$scope", "$element", "$attrs", "$animate"];
|
||||
return {
|
||||
restrict: 'E',
|
||||
@@ -11729,8 +11674,8 @@ function mdInputContainerDirective($mdTheming, $parse) {
|
||||
var next = icons[0].nextElementSibling;
|
||||
var previous = icons[0].previousElementSibling;
|
||||
|
||||
element.addClass(next && INPUT_TAGS.indexOf(next.tagName) != -1 ? 'md-icon-left' :
|
||||
previous && INPUT_TAGS.indexOf(previous.tagName) != -1 ? 'md-icon-right' : '');
|
||||
element.addClass(next && next.tagName === 'INPUT' ? 'md-icon-left' :
|
||||
previous && previous.tagName === 'INPUT' ? 'md-icon-right' : '');
|
||||
}
|
||||
// In case there are two icons we apply both icon classes
|
||||
else if (icons.length == 2) {
|
||||
@@ -11809,7 +11754,6 @@ function labelDirective() {
|
||||
* @param {string=} placeholder An alternative approach to using aria-label when the label is not
|
||||
* PRESENT. The placeholder text is copied to the aria-label attribute.
|
||||
* @param md-no-autogrow {boolean=} When present, textareas will not grow automatically.
|
||||
* @param md-no-asterisk {boolean=} When present, asterisk will not be appended to required inputs label
|
||||
* @param md-detect-hidden {boolean=} When present, textareas will be sized properly when they are
|
||||
* revealed after being hidden. This is off by default for performance reasons because it
|
||||
* guarantees a reflow every digest cycle.
|
||||
@@ -11910,9 +11854,6 @@ function inputTextareaDirective($mdUtil, $window, $mdAria) {
|
||||
var hasNgModel = !!ctrls[1];
|
||||
var ngModelCtrl = ctrls[1] || $mdUtil.fakeNgModel();
|
||||
var isReadonly = angular.isDefined(attr.readonly);
|
||||
var isRequired = angular.isDefined(attr.required);
|
||||
var mdNoAsterisk = angular.isDefined(attr.mdNoAsterisk);
|
||||
|
||||
|
||||
if (!containerCtrl) return;
|
||||
if (containerCtrl.input) {
|
||||
@@ -11927,8 +11868,6 @@ function inputTextareaDirective($mdUtil, $window, $mdAria) {
|
||||
|
||||
if (!containerCtrl.label) {
|
||||
$mdAria.expect(element, 'aria-label', element.attr('placeholder'));
|
||||
} else if (isRequired && !mdNoAsterisk) {
|
||||
containerCtrl.label.addClass('md-required');
|
||||
}
|
||||
|
||||
element.addClass('md-input');
|
||||
@@ -12498,7 +12437,7 @@ mdListDirective.$inject = ["$mdTheming"];
|
||||
*
|
||||
* @description
|
||||
* The `<md-list-item>` directive is a container intended for row items in a `<md-list>` container.
|
||||
* The `md-2-line` and `md-3-line` classes can be added to a `<md-list-item>`
|
||||
* The `md-2-line` and `md-3-line` classes can be added to a `<md-list-item>`
|
||||
* to increase the height with 22px and 40px respectively.
|
||||
*
|
||||
* ## CSS
|
||||
@@ -12534,7 +12473,7 @@ function mdListItemDirective($mdAria, $mdConstant, $mdUtil, $timeout) {
|
||||
controller: 'MdListController',
|
||||
compile: function(tEl, tAttrs) {
|
||||
// Check for proxy controls (no ng-click on parent, and a control inside)
|
||||
var secondaryItems = tEl[0].querySelectorAll('.md-secondary');
|
||||
var secondaryItem = tEl[0].querySelector('.md-secondary');
|
||||
var hasProxiedElement;
|
||||
var proxyElement;
|
||||
|
||||
@@ -12555,7 +12494,7 @@ function mdListItemDirective($mdAria, $mdConstant, $mdUtil, $timeout) {
|
||||
tEl.addClass('md-no-proxy');
|
||||
}
|
||||
}
|
||||
wrapSecondaryItems();
|
||||
wrapSecondary();
|
||||
setupToggleAria();
|
||||
|
||||
|
||||
@@ -12581,46 +12520,19 @@ function mdListItemDirective($mdAria, $mdConstant, $mdUtil, $timeout) {
|
||||
container.append(tEl.contents());
|
||||
tEl.addClass('md-proxy-focus');
|
||||
} else {
|
||||
// Element which holds the default list-item content.
|
||||
container = angular.element('<div class="md-button md-no-style"><div class="md-list-item-inner"></div></div>');
|
||||
|
||||
// Button which shows ripple and executes primary action.
|
||||
var buttonWrap = angular.element('<md-button class="md-no-style" md-no-focus-style></md-button>');
|
||||
buttonWrap[0].setAttribute('aria-label', tEl[0].textContent);
|
||||
copyAttributes(tEl[0], buttonWrap[0]);
|
||||
|
||||
// Append the button wrap before our list-item content, because it will overlay in relative.
|
||||
container.prepend(buttonWrap);
|
||||
container.children().eq(1).append(tEl.contents());
|
||||
|
||||
tEl.addClass('md-button-wrap');
|
||||
container = angular.element('<md-button class="md-no-style"><div class="md-list-item-inner"></div></md-button>');
|
||||
copyAttributes(tEl[0], container[0]);
|
||||
container.children().eq(0).append(tEl.contents());
|
||||
}
|
||||
|
||||
tEl[0].setAttribute('tabindex', '-1');
|
||||
tEl.append(container);
|
||||
}
|
||||
|
||||
function wrapSecondaryItems() {
|
||||
if (secondaryItems.length === 1) {
|
||||
wrapSecondaryItem(secondaryItems[0], tEl);
|
||||
} else if (secondaryItems.length > 1) {
|
||||
var secondaryItemsWrapper = angular.element('<div class="md-secondary-container">');
|
||||
angular.forEach(secondaryItems, function(secondaryItem) {
|
||||
wrapSecondaryItem(secondaryItem, secondaryItemsWrapper, true);
|
||||
});
|
||||
tEl.append(secondaryItemsWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
function wrapSecondaryItem(secondaryItem, container, hasSecondaryItemsWrapper) {
|
||||
function wrapSecondary() {
|
||||
if (secondaryItem && !isButton(secondaryItem) && secondaryItem.hasAttribute('ng-click')) {
|
||||
$mdAria.expect(secondaryItem, 'aria-label');
|
||||
var buttonWrapper;
|
||||
if (hasSecondaryItemsWrapper) {
|
||||
buttonWrapper = angular.element('<md-button class="md-icon-button">');
|
||||
} else {
|
||||
buttonWrapper = angular.element('<md-button class="md-secondary-container md-icon-button">');
|
||||
}
|
||||
var buttonWrapper = angular.element('<md-button class="md-secondary-container md-icon-button">');
|
||||
copyAttributes(secondaryItem, buttonWrapper[0]);
|
||||
secondaryItem.setAttribute('tabindex', '-1');
|
||||
secondaryItem.classList.remove('md-secondary');
|
||||
@@ -12630,17 +12542,12 @@ function mdListItemDirective($mdAria, $mdConstant, $mdUtil, $timeout) {
|
||||
|
||||
// Check for a secondary item and move it outside
|
||||
if ( secondaryItem && (
|
||||
secondaryItem.hasAttribute('ng-click') ||
|
||||
( tAttrs.ngClick &&
|
||||
isProxiedElement(secondaryItem) )
|
||||
)) {
|
||||
// When using multiple secondary items we need to remove their secondary class to be
|
||||
// orderd correctly in the list-item
|
||||
if (hasSecondaryItemsWrapper) {
|
||||
secondaryItem.classList.remove('md-secondary');
|
||||
}
|
||||
secondaryItem.hasAttribute('ng-click') ||
|
||||
( tAttrs.ngClick &&
|
||||
isProxiedElement(secondaryItem) )
|
||||
)) {
|
||||
tEl.addClass('md-with-secondary');
|
||||
container.append(secondaryItem);
|
||||
tEl.append(secondaryItem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17370,7 +17277,7 @@ angular
|
||||
* </hljs>
|
||||
*
|
||||
* @param {expression=} md-visible Boolean bound to whether the tooltip is currently visible.
|
||||
* @param {number=} md-delay How many milliseconds to wait to show the tooltip after the user focuses, hovers, or touches the parent. Defaults to 0ms.
|
||||
* @param {number=} md-delay How many milliseconds to wait to show the tooltip after the user focuses, hovers, or touches the parent. Defaults to 300ms.
|
||||
* @param {boolean=} md-autohide If present or provided with a boolean value, the tooltip will hide on mouse leave, regardless of focus
|
||||
* @param {string=} md-direction Which direction would you like the tooltip to go? Supports left, right, top, and bottom. Defaults to bottom.
|
||||
*/
|
||||
@@ -17420,7 +17327,7 @@ function MdTooltipDirective($timeout, $window, $$rAF, $document, $mdUtil, $mdThe
|
||||
|
||||
|
||||
function setDefaults () {
|
||||
scope.delay = scope.delay || TOOLTIP_SHOW_DELAY;
|
||||
if (!angular.isDefined(attr.mdDelay)) scope.delay = TOOLTIP_SHOW_DELAY;
|
||||
}
|
||||
|
||||
function updateContentOrigin() {
|
||||
@@ -19238,29 +19145,21 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming,
|
||||
*/
|
||||
function fetchResults (searchText) {
|
||||
var items = $scope.$parent.$eval(itemExpr),
|
||||
term = searchText.toLowerCase(),
|
||||
isList = angular.isArray(items);
|
||||
|
||||
if ( isList ) handleResults(items);
|
||||
else handleAsyncResults(items);
|
||||
|
||||
function handleAsyncResults(items) {
|
||||
if ( !items ) return;
|
||||
|
||||
items = $q.when(items);
|
||||
term = searchText.toLowerCase();
|
||||
if (angular.isArray(items)) {
|
||||
handleResults(items);
|
||||
} else if (items) {
|
||||
setLoading(true);
|
||||
promiseFetch = true;
|
||||
|
||||
$mdUtil.nextTick(function () {
|
||||
items
|
||||
.then(handleResults)
|
||||
.finally(function(){
|
||||
setLoading(false);
|
||||
promiseFetch = false;
|
||||
});
|
||||
if (items.success) items.success(handleResults);
|
||||
if (items.then) items.then(handleResults);
|
||||
if (items.finally) items.finally(function () {
|
||||
setLoading(false);
|
||||
promiseFetch = false;
|
||||
});
|
||||
},true, $scope);
|
||||
}
|
||||
|
||||
function handleResults (matches) {
|
||||
cache[ term ] = matches;
|
||||
if ((searchText || '') !== ($scope.searchText || '')) return; //-- just cache the results if old request
|
||||
@@ -19353,12 +19252,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming,
|
||||
matches = ctrl.matches,
|
||||
item = matches[ 0 ];
|
||||
if (matches.length === 1) getDisplayValue(item).then(function (displayValue) {
|
||||
var isMatching = searchText == displayValue;
|
||||
if ($scope.matchInsensitive && !isMatching) {
|
||||
isMatching = searchText.toLowerCase() == displayValue.toLowerCase();
|
||||
}
|
||||
|
||||
if (isMatching) select(0);
|
||||
if (searchText == displayValue) select(0);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -19432,8 +19326,6 @@ angular
|
||||
* @param {number=} md-input-maxlength The maximum length for the input's value for validation
|
||||
* @param {boolean=} md-select-on-match When set, autocomplete will automatically select exact
|
||||
* the item if the search text is an exact match
|
||||
* @param {boolean=} md-match-case-insensitive When set and using `md-select-on-match`, autocomplete
|
||||
* will select on case-insensitive match
|
||||
*
|
||||
* @usage
|
||||
* ### Basic Example
|
||||
@@ -19496,26 +19388,25 @@ function MdAutocomplete () {
|
||||
controller: 'MdAutocompleteCtrl',
|
||||
controllerAs: '$mdAutocompleteCtrl',
|
||||
scope: {
|
||||
inputName: '@mdInputName',
|
||||
inputMinlength: '@mdInputMinlength',
|
||||
inputMaxlength: '@mdInputMaxlength',
|
||||
searchText: '=?mdSearchText',
|
||||
selectedItem: '=?mdSelectedItem',
|
||||
itemsExpr: '@mdItems',
|
||||
itemText: '&mdItemText',
|
||||
placeholder: '@placeholder',
|
||||
noCache: '=?mdNoCache',
|
||||
selectOnMatch: '=?mdSelectOnMatch',
|
||||
matchInsensitive: '=?mdMatchCaseInsensitive',
|
||||
itemChange: '&?mdSelectedItemChange',
|
||||
textChange: '&?mdSearchTextChange',
|
||||
minLength: '=?mdMinLength',
|
||||
delay: '=?mdDelay',
|
||||
autofocus: '=?mdAutofocus',
|
||||
floatingLabel: '@?mdFloatingLabel',
|
||||
autoselect: '=?mdAutoselect',
|
||||
menuClass: '@?mdMenuClass',
|
||||
inputId: '@?mdInputId'
|
||||
inputName: '@mdInputName',
|
||||
inputMinlength: '@mdInputMinlength',
|
||||
inputMaxlength: '@mdInputMaxlength',
|
||||
searchText: '=?mdSearchText',
|
||||
selectedItem: '=?mdSelectedItem',
|
||||
itemsExpr: '@mdItems',
|
||||
itemText: '&mdItemText',
|
||||
placeholder: '@placeholder',
|
||||
noCache: '=?mdNoCache',
|
||||
selectOnMatch: '=?mdSelectOnMatch',
|
||||
itemChange: '&?mdSelectedItemChange',
|
||||
textChange: '&?mdSearchTextChange',
|
||||
minLength: '=?mdMinLength',
|
||||
delay: '=?mdDelay',
|
||||
autofocus: '=?mdAutofocus',
|
||||
floatingLabel: '@?mdFloatingLabel',
|
||||
autoselect: '=?mdAutoselect',
|
||||
menuClass: '@?mdMenuClass',
|
||||
inputId: '@?mdInputId'
|
||||
},
|
||||
link: function(scope, element, attrs, controller) {
|
||||
controller.hasNotFound = element.hasNotFoundTemplate;
|
||||
@@ -19530,9 +19421,7 @@ function MdAutocomplete () {
|
||||
// Set our variable for the link function above which runs later
|
||||
element.hasNotFoundTemplate = !!noItemsTemplate;
|
||||
|
||||
// Always set our tabindex of the autocomplete directive to -1, because our input
|
||||
// will hold the actual tabindex.
|
||||
element.attr('tabindex', '-1');
|
||||
if (!attr.hasOwnProperty('tabindex')) element.attr('tabindex', '-1');
|
||||
|
||||
return '\
|
||||
<md-autocomplete-wrap\
|
||||
@@ -20130,10 +20019,6 @@ MdChipsCtrl.prototype.inputKeydown = function(event) {
|
||||
if (this.separatorKeys.indexOf(event.keyCode) !== -1) {
|
||||
if ((this.hasAutocomplete && this.requireMatch) || !chipBuffer) return;
|
||||
event.preventDefault();
|
||||
|
||||
// Only append the chip and reset the chip buffer if the max chips limit isn't reached.
|
||||
if (this.items.length >= this.maxChips) return;
|
||||
|
||||
this.appendChip(chipBuffer);
|
||||
this.resetChipBuffer();
|
||||
}
|
||||
@@ -20239,7 +20124,7 @@ MdChipsCtrl.prototype.appendChip = function(newChip) {
|
||||
var identical = this.items.some(function(item){
|
||||
return angular.equals(newChip, item);
|
||||
});
|
||||
if (identical) return;
|
||||
if(identical) return;
|
||||
}
|
||||
|
||||
// Check for a null (but not undefined), or existing chip and cancel appending
|
||||
@@ -20248,10 +20133,6 @@ MdChipsCtrl.prototype.appendChip = function(newChip) {
|
||||
// Append the new chip onto our list
|
||||
var index = this.items.push(newChip);
|
||||
|
||||
// Update model validation
|
||||
this.ngModelCtrl.$setDirty();
|
||||
this.validateModel();
|
||||
|
||||
// If they provide the md-on-add attribute, notify them of the chip addition
|
||||
if (this.useOnAdd && this.onAdd) {
|
||||
this.onAdd({ '$chip': newChip, '$index': index });
|
||||
@@ -20351,19 +20232,6 @@ MdChipsCtrl.prototype.resetChipBuffer = function() {
|
||||
}
|
||||
};
|
||||
|
||||
MdChipsCtrl.prototype.hasMaxChips = function() {
|
||||
if (angular.isString(this.maxChips)) this.maxChips = parseInt(this.maxChips, 10) || 0;
|
||||
|
||||
return this.maxChips > 0 && this.items.length >= this.maxChips;
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the validity properties for the ngModel.
|
||||
*/
|
||||
MdChipsCtrl.prototype.validateModel = function() {
|
||||
this.ngModelCtrl.$setValidity('md-max-chips', !this.hasMaxChips());
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes the chip at the given index.
|
||||
* @param index
|
||||
@@ -20371,10 +20239,6 @@ MdChipsCtrl.prototype.validateModel = function() {
|
||||
MdChipsCtrl.prototype.removeChip = function(index) {
|
||||
var removed = this.items.splice(index, 1);
|
||||
|
||||
// Update model validation
|
||||
this.ngModelCtrl.$setDirty();
|
||||
this.validateModel();
|
||||
|
||||
if (removed && removed.length && this.useOnRemove && this.onRemove) {
|
||||
this.onRemove({ '$chip': removed[0], '$index': index });
|
||||
}
|
||||
@@ -20589,9 +20453,6 @@ MdChipsCtrl.prototype.hasFocus = function () {
|
||||
* displayed when there is at least on item in the list
|
||||
* @param {boolean=} readonly Disables list manipulation (deleting or adding list items), hiding
|
||||
* the input and delete buttons
|
||||
* @param {number=} md-max-chips The maximum number of chips allowed to add through user input.
|
||||
* <br/><br/>The validation property `md-max-chips` can be used when the max chips
|
||||
* amount is reached.
|
||||
* @param {expression} md-transform-chip An expression of form `myFunction($chip)` that when called
|
||||
* expects one of the following return values:
|
||||
* - an object representing the `$chip` input string
|
||||
@@ -20619,23 +20480,6 @@ MdChipsCtrl.prototype.hasFocus = function () {
|
||||
* </md-chips>
|
||||
* </hljs>
|
||||
*
|
||||
* <h3>Validation</h3>
|
||||
* When using [ngMessages](https://docs.angularjs.org/api/ngMessages), you can show errors based
|
||||
* on our custom validators.
|
||||
* <hljs lang="html">
|
||||
* <form name="userForm">
|
||||
* <md-chips
|
||||
* name="fruits"
|
||||
* ng-model="myItems"
|
||||
* placeholder="Add an item"
|
||||
* md-max-chips="5">
|
||||
* </md-chips>
|
||||
* <div ng-messages="userForm.fruits.$error" ng-if="userForm.$dirty">
|
||||
* <div ng-message="md-max-chips">You reached the maximum amount of chips</div>
|
||||
* </div>
|
||||
* </form>
|
||||
* </hljs>
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -20717,7 +20561,6 @@ MdChipsCtrl.prototype.hasFocus = function () {
|
||||
readonly: '=readonly',
|
||||
placeholder: '@',
|
||||
secondaryPlaceholder: '@',
|
||||
maxChips: '@mdMaxChips',
|
||||
transformChip: '&mdTransformChip',
|
||||
onAppend: '&mdOnAppend',
|
||||
onAdd: '&mdOnAdd',
|
||||
@@ -24614,8 +24457,8 @@ MdTabsTemplate.$inject = ["$compile", "$mdUtil"];
|
||||
|
||||
})();
|
||||
(function(){
|
||||
angular.module("material.core").constant("$MD_THEME_CSS", "md-autocomplete.md-THEME_NAME-theme { background: '{{background-50}}'; } md-autocomplete.md-THEME_NAME-theme[disabled] { background: '{{background-100}}'; } md-autocomplete.md-THEME_NAME-theme button md-icon path { fill: '{{background-600}}'; } md-autocomplete.md-THEME_NAME-theme button:after { background: '{{background-600-0.3}}'; }.md-autocomplete-suggestions-container.md-THEME_NAME-theme { background: '{{background-50}}'; } .md-autocomplete-suggestions-container.md-THEME_NAME-theme li { color: '{{background-900}}'; } .md-autocomplete-suggestions-container.md-THEME_NAME-theme li .highlight { color: '{{background-600}}'; } .md-autocomplete-suggestions-container.md-THEME_NAME-theme li:hover, .md-autocomplete-suggestions-container.md-THEME_NAME-theme li.selected { background: '{{background-200}}'; }md-backdrop { background-color: '{{background-900-0.0}}'; } md-backdrop.md-opaque.md-THEME_NAME-theme { background-color: '{{background-900-1.0}}'; }md-bottom-sheet.md-THEME_NAME-theme { background-color: '{{background-50}}'; border-top-color: '{{background-300}}'; } md-bottom-sheet.md-THEME_NAME-theme.md-list md-list-item { color: '{{foreground-1}}'; } md-bottom-sheet.md-THEME_NAME-theme .md-subheader { background-color: '{{background-50}}'; } md-bottom-sheet.md-THEME_NAME-theme .md-subheader { color: '{{foreground-1}}'; }a.md-button.md-THEME_NAME-theme:not([disabled]):hover,.md-button.md-THEME_NAME-theme:not([disabled]):hover { background-color: '{{background-500-0.2}}'; }a.md-button.md-THEME_NAME-theme:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme:not([disabled]).md-focused { background-color: '{{background-500-0.2}}'; }a.md-button.md-THEME_NAME-theme:not([disabled]).md-icon-button:hover,.md-button.md-THEME_NAME-theme:not([disabled]).md-icon-button:hover { background-color: transparent; }a.md-button.md-THEME_NAME-theme.md-fab,.md-button.md-THEME_NAME-theme.md-fab { background-color: '{{accent-color}}'; color: '{{accent-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-fab md-icon, .md-button.md-THEME_NAME-theme.md-fab md-icon { color: '{{accent-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover { background-color: '{{accent-color}}'; } a.md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused { background-color: '{{accent-A700}}'; }a.md-button.md-THEME_NAME-theme.md-primary,.md-button.md-THEME_NAME-theme.md-primary { color: '{{primary-color}}'; } a.md-button.md-THEME_NAME-theme.md-primary.md-raised, a.md-button.md-THEME_NAME-theme.md-primary.md-fab, .md-button.md-THEME_NAME-theme.md-primary.md-raised, .md-button.md-THEME_NAME-theme.md-primary.md-fab { color: '{{primary-contrast}}'; background-color: '{{primary-color}}'; } a.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]) md-icon, a.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]) md-icon { color: '{{primary-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):hover, a.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover { background-color: '{{primary-color}}'; } a.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]).md-focused, a.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]).md-focused { background-color: '{{primary-600}}'; } a.md-button.md-THEME_NAME-theme.md-primary:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-primary:not([disabled]) md-icon { color: '{{primary-color}}'; }a.md-button.md-THEME_NAME-theme.md-fab,.md-button.md-THEME_NAME-theme.md-fab { background-color: '{{accent-color}}'; color: '{{accent-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-fab:not([disabled]) .md-icon, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]) .md-icon { color: '{{accent-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover { background-color: '{{accent-color}}'; } a.md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused { background-color: '{{accent-A700}}'; }a.md-button.md-THEME_NAME-theme.md-raised,.md-button.md-THEME_NAME-theme.md-raised { color: '{{background-900}Line truncated
|
||||
angular.module("material.core").constant("$MD_THEME_CSS", "md-autocomplete.md-THEME_NAME-theme { background: '{{background-50}}'; } md-autocomplete.md-THEME_NAME-theme[disabled] { background: '{{background-100}}'; } md-autocomplete.md-THEME_NAME-theme button md-icon path { fill: '{{background-600}}'; } md-autocomplete.md-THEME_NAME-theme button:after { background: '{{background-600-0.3}}'; }.md-autocomplete-suggestions-container.md-THEME_NAME-theme { background: '{{background-50}}'; } .md-autocomplete-suggestions-container.md-THEME_NAME-theme li { color: '{{background-900}}'; } .md-autocomplete-suggestions-container.md-THEME_NAME-theme li .highlight { color: '{{background-600}}'; } .md-autocomplete-suggestions-container.md-THEME_NAME-theme li:hover, .md-autocomplete-suggestions-container.md-THEME_NAME-theme li.selected { background: '{{background-200}}'; }md-backdrop { background-color: '{{background-900-0.0}}'; } md-backdrop.md-opaque.md-THEME_NAME-theme { background-color: '{{background-900-1.0}}'; }md-bottom-sheet.md-THEME_NAME-theme { background-color: '{{background-50}}'; border-top-color: '{{background-300}}'; } md-bottom-sheet.md-THEME_NAME-theme.md-list md-list-item { color: '{{foreground-1}}'; } md-bottom-sheet.md-THEME_NAME-theme .md-subheader { background-color: '{{background-50}}'; } md-bottom-sheet.md-THEME_NAME-theme .md-subheader { color: '{{foreground-1}}'; }a.md-button.md-THEME_NAME-theme:not([disabled]):hover,.md-button.md-THEME_NAME-theme:not([disabled]):hover { background-color: '{{background-500-0.2}}'; }a.md-button.md-THEME_NAME-theme:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme:not([disabled]).md-focused { background-color: '{{background-500-0.2}}'; }a.md-button.md-THEME_NAME-theme:not([disabled]).md-icon-button:hover,.md-button.md-THEME_NAME-theme:not([disabled]).md-icon-button:hover { background-color: transparent; }a.md-button.md-THEME_NAME-theme.md-fab,.md-button.md-THEME_NAME-theme.md-fab { background-color: '{{accent-color}}'; color: '{{accent-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-fab md-icon, .md-button.md-THEME_NAME-theme.md-fab md-icon { color: '{{accent-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover { background-color: '{{accent-color}}'; } a.md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused { background-color: '{{accent-A700}}'; }a.md-button.md-THEME_NAME-theme.md-primary,.md-button.md-THEME_NAME-theme.md-primary { color: '{{primary-color}}'; } a.md-button.md-THEME_NAME-theme.md-primary.md-raised, a.md-button.md-THEME_NAME-theme.md-primary.md-fab, .md-button.md-THEME_NAME-theme.md-primary.md-raised, .md-button.md-THEME_NAME-theme.md-primary.md-fab { color: '{{primary-contrast}}'; background-color: '{{primary-color}}'; } a.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]) md-icon, a.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]) md-icon { color: '{{primary-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):hover, a.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover { background-color: '{{primary-color}}'; } a.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]).md-focused, a.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]).md-focused { background-color: '{{primary-600}}'; } a.md-button.md-THEME_NAME-theme.md-primary:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-primary:not([disabled]) md-icon { color: '{{primary-color}}'; }a.md-button.md-THEME_NAME-theme.md-fab,.md-button.md-THEME_NAME-theme.md-fab { background-color: '{{accent-color}}'; color: '{{accent-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-fab:not([disabled]) .md-icon, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]) .md-icon { color: '{{accent-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover { background-color: '{{accent-color}}'; } a.md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused { background-color: '{{accent-A700}}'; }a.md-button.md-THEME_NAME-theme.md-raised,.md-button.md-THEME_NAME-theme.md-raised { color: '{{background-900}Line truncated
|
||||
})();
|
||||
|
||||
|
||||
})(window, window.angular);;window.ngMaterial={version:{full: "1.0.5-master-9e7937e"}};
|
||||
})(window, window.angular);;window.ngMaterial={version:{full: "1.0.5"}};
|
||||
Reference in new issue
Block a user