mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-19 22:35:19 +00:00
(js/css) updates for the new packages
This commit is contained in:
1 parent
89206f3705
commit
233b9c0613
19 files changed
+906
-670
No files matched your search
+60
-17
@@ -2,7 +2,7 @@
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.10.1-master-e26a275
|
||||
* v0.10.1-master-1e6d166
|
||||
*/
|
||||
(function( window, angular, undefined ){
|
||||
"use strict";
|
||||
@@ -552,7 +552,7 @@ angular
|
||||
.module('material.core')
|
||||
.factory('$mdUtil', UtilFactory);
|
||||
|
||||
function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $interpolate) {
|
||||
function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $interpolate, $log) {
|
||||
// Setup some core variables for the processTemplate method
|
||||
var startSymbol = $interpolate.startSymbol(),
|
||||
endSymbol = $interpolate.endSymbol(),
|
||||
@@ -1004,6 +1004,8 @@ function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $in
|
||||
return angular.element(element[i]);
|
||||
}
|
||||
}
|
||||
|
||||
$log.warn( $mdUtil.supplant("Unable to find node '{0}' in element.",[nodeName]) );
|
||||
return element;
|
||||
},
|
||||
|
||||
@@ -1098,7 +1100,7 @@ function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $in
|
||||
}
|
||||
|
||||
}
|
||||
UtilFactory.$inject = ["$document", "$timeout", "$compile", "$rootScope", "$$mdAnimate", "$interpolate"];
|
||||
UtilFactory.$inject = ["$document", "$timeout", "$compile", "$rootScope", "$$mdAnimate", "$interpolate", "$log"];
|
||||
|
||||
/*
|
||||
* Since removing jQuery from the demos, some code that uses `element.focus()` is broken.
|
||||
@@ -1145,7 +1147,8 @@ function AriaService($$rAF, $log, $window) {
|
||||
* @param {optional} defaultValue What to set the attr to if no value is found
|
||||
*/
|
||||
function expect(element, attrName, defaultValue) {
|
||||
var node = element[0] || element;
|
||||
|
||||
var node = angular.element(element)[0] || element;
|
||||
|
||||
// if node exists and neither it nor its children have the attribute
|
||||
if (node &&
|
||||
@@ -8097,7 +8100,15 @@ function MdDialogProvider($$interimElementProvider) {
|
||||
focusOnOpen: true,
|
||||
disableParentScroll: true,
|
||||
transformTemplate: function(template) {
|
||||
return '<div class="md-dialog-container">' + template + '</div>';
|
||||
return '<div class="md-dialog-container">' + validatedTemplate(template) + '</div>';
|
||||
|
||||
/**
|
||||
* The specified template should contain a <md-dialog> wrapper element....
|
||||
*/
|
||||
function validatedTemplate(template) {
|
||||
template || ""
|
||||
return /<\/md-dialog>/g.test(template) ? template : "<md-dialog>" + template + "</md-dialog>";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -10873,7 +10884,9 @@ angular.module('material.components.progressCircular', [
|
||||
* @param {string} md-mode Select from one of two modes: determinate and indeterminate.
|
||||
* @param {number=} value In determinate mode, this number represents the percentage of the
|
||||
* circular progress. Default: 0
|
||||
* @param {number=} md-diameter This specifies the diamter of the circular progress. Default: 48
|
||||
* @param {number=} md-diameter This specifies the diamter of the circular progress. The value
|
||||
* may be a percentage (eg '25%') or a pixel-size value (eg '48'). If this attribute is
|
||||
* not present then a default value of '48px' is assumed.
|
||||
*
|
||||
* @usage
|
||||
* <hljs lang="html">
|
||||
@@ -10887,6 +10900,9 @@ angular.module('material.components.progressCircular', [
|
||||
* </hljs>
|
||||
*/
|
||||
function MdProgressCircularDirective($mdConstant, $mdTheming) {
|
||||
var DEFAULT_PROGRESS_SIZE = 100;
|
||||
var DEFAULT_SCALING = 0.5;
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
template:
|
||||
@@ -10919,16 +10935,35 @@ function MdProgressCircularDirective($mdConstant, $mdTheming) {
|
||||
function postLink(scope, element, attr) {
|
||||
$mdTheming(element);
|
||||
var circle = element[0];
|
||||
|
||||
// Scale the progress circle based on the default diameter.
|
||||
var diameter = attr.mdDiameter || 48;
|
||||
var scale = diameter / 48;
|
||||
circle.style[$mdConstant.CSS.TRANSFORM] = 'scale(' + scale + ')';
|
||||
circle.style[$mdConstant.CSS.TRANSFORM] = 'scale(' + getDiameterRatio() + ')';
|
||||
|
||||
attr.$observe('value', function(value) {
|
||||
var percentValue = clamp(value);
|
||||
element.attr('aria-valuenow', percentValue);
|
||||
});
|
||||
|
||||
var spinnerWrapper = angular.element(element.children()[0]);
|
||||
attr.$observe('mdMode',function(mode){
|
||||
spinnerWrapper[mode ? 'removeClass' : 'addClass']('ng-hide');
|
||||
});
|
||||
|
||||
/**
|
||||
* We will scale the progress circle based on the default diameter.
|
||||
*
|
||||
* Determine the diameter percentage (defaults to 100%)
|
||||
* May be express as float, percentage, or integer
|
||||
*/
|
||||
function getDiameterRatio() {
|
||||
if ( !attr.mdDiameter ) return DEFAULT_SCALING;
|
||||
|
||||
var match = /([0-9]*)%/.exec(attr.mdDiameter);
|
||||
var value = match && match[1]/100;
|
||||
|
||||
value = Math.max(0, value || parseFloat(attr.mdDiameter));
|
||||
|
||||
// should return ratio; DEFAULT_PROGRESS_SIZE === 100px is default size
|
||||
return (value > 1) ? value / DEFAULT_PROGRESS_SIZE : value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -16337,7 +16372,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming,
|
||||
}
|
||||
|
||||
function notFoundVisible () {
|
||||
return !ctrl.matches.length && !ctrl.loading && ctrl.scope.searchText;
|
||||
return !ctrl.matches.length && !ctrl.loading && ctrl.scope.searchText && hasFocus && !ctrl.scope.selectedItem;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -17026,6 +17061,7 @@ MdChipsCtrl.$inject = ["$scope", "$mdConstant", "$log", "$element", "$timeout"];
|
||||
*/
|
||||
MdChipsCtrl.prototype.inputKeydown = function(event) {
|
||||
var chipBuffer = this.getChipBuffer();
|
||||
|
||||
switch (event.keyCode) {
|
||||
case this.$mdConstant.KEY_CODE.ENTER:
|
||||
if ((this.hasAutocomplete && this.requireMatch) || !chipBuffer) break;
|
||||
@@ -17035,6 +17071,7 @@ MdChipsCtrl.prototype.inputKeydown = function(event) {
|
||||
break;
|
||||
case this.$mdConstant.KEY_CODE.BACKSPACE:
|
||||
if (chipBuffer) break;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
if (this.items.length) this.selectAndFocusChipSafe(this.items.length - 1);
|
||||
break;
|
||||
@@ -17307,14 +17344,20 @@ MdChipsCtrl.prototype.configureUserInput = function(inputElement) {
|
||||
this.userInputNgModelCtrl = ngModelCtrl;
|
||||
}
|
||||
|
||||
// Bind to keydown and focus events of input
|
||||
var scope = this.$scope;
|
||||
var ctrl = this;
|
||||
|
||||
// Run all of the events using evalAsync because a focus may fire a blur in the same digest loop
|
||||
var scopeApplyFn = function(event, fn) {
|
||||
scope.$evalAsync(angular.bind(ctrl, fn, event));
|
||||
};
|
||||
|
||||
// Bind to keydown and focus events of input
|
||||
inputElement
|
||||
.attr({ tabindex: 0 })
|
||||
.on('keydown', function(event) { scope.$apply( angular.bind(ctrl, function() { ctrl.inputKeydown(event); })) })
|
||||
.on('focus', angular.bind(ctrl, ctrl.onInputFocus))
|
||||
.on('blur', angular.bind(ctrl, ctrl.onInputBlur));
|
||||
.on('keydown', function(event) { scopeApplyFn(event, ctrl.inputKeydown) })
|
||||
.on('focus', function(event) { scopeApplyFn(event, ctrl.onInputFocus) })
|
||||
.on('blur', function(event) { scopeApplyFn(event, ctrl.onInputBlur) })
|
||||
};
|
||||
|
||||
MdChipsCtrl.prototype.configureAutocomplete = function(ctrl) {
|
||||
@@ -21276,7 +21319,7 @@ 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-0.48}}'; } md-backdrop.md-opaque.md-THEME_NAME-theme.ng-enter { background-color: '{{background-900-0.0}}'; } md-backdrop.md-opaque.md-THEME_NAME-theme.ng-enter.md-opaque.md-THEME_NAME-theme.ng-enter-active { background-color: '{{background-900-0.48}}'; } md-backdrop.md-opaque.md-THEME_NAME-theme.ng-leave.md-opaque.md-THEME_NAME-theme.ng-leave-active { background-color: '{{background-900-0.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-buLine 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-contrast}}'; backgroundLine truncated
|
||||
})();
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user