mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-10 09:23:25 +00:00
(fix) updated js/css/map files for packaging
This commit is contained in:
+85
-42
@@ -2,7 +2,7 @@
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.10.1-rc5-master-f4c91b3
|
||||
* v0.10.1-master-514927a
|
||||
*/
|
||||
(function( window, angular, undefined ){
|
||||
"use strict";
|
||||
@@ -516,8 +516,9 @@ angular.module('material.core')
|
||||
var $mdUtil = {
|
||||
dom : { },
|
||||
now: window.performance ?
|
||||
angular.bind(window.performance, window.performance.now) :
|
||||
Date.now,
|
||||
angular.bind(window.performance, window.performance.now) : Date.now || function() {
|
||||
return new Date().getTime();
|
||||
},
|
||||
|
||||
clientRect: function (element, offsetParent, isOffsetRect) {
|
||||
var node = getNode(element);
|
||||
@@ -8005,7 +8006,7 @@ function mdIconDirective($mdIcon, $mdTheming, $mdAria ) {
|
||||
}
|
||||
|
||||
function shouldUseDefaultFontSet() {
|
||||
return !scope.fontIcon && !scope.fontSet && !attr.hasOwnProperty('class');
|
||||
return !scope.fontIcon && !scope.fontSet;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9389,6 +9390,7 @@ angular.module('material.components.menu', [
|
||||
*/
|
||||
|
||||
function MenuDirective($mdMenu) {
|
||||
var INVALID_PREFIX = 'Invalid HTML for md-menu: ';
|
||||
return {
|
||||
restrict: 'E',
|
||||
require: 'mdMenu',
|
||||
@@ -9401,12 +9403,14 @@ function MenuDirective($mdMenu) {
|
||||
templateElement.addClass('md-menu');
|
||||
var triggerElement = templateElement.children()[0];
|
||||
if (!triggerElement.hasAttribute('ng-click')) {
|
||||
triggerElement = triggerElement.querySelector('[ng-click]');
|
||||
triggerElement = triggerElement.querySelector('[ng-click],[ng-mouseenter]');
|
||||
}
|
||||
triggerElement && triggerElement.setAttribute('aria-haspopup', 'true');
|
||||
if (templateElement.children().length != 2) {
|
||||
throw Error('Invalid HTML for md-menu. Expected two children elements.');
|
||||
throw Error(INVALID_PREFIX + 'Expected two children elements.');
|
||||
}
|
||||
|
||||
// Default element for ARIA attributes has the ngClick or ngMouseenter expression
|
||||
triggerElement && triggerElement.setAttribute('aria-haspopup', 'true');
|
||||
return link;
|
||||
}
|
||||
|
||||
@@ -9429,50 +9433,68 @@ function MenuDirective($mdMenu) {
|
||||
MenuDirective.$inject = ["$mdMenu"];
|
||||
|
||||
function MenuController($mdMenu, $attrs, $element, $scope) {
|
||||
|
||||
var menuContainer;
|
||||
var ctrl = this;
|
||||
var triggerElement;
|
||||
|
||||
// Called by our linking fn to provide access to the menu-content
|
||||
// element removed during link
|
||||
this.init = function(setMenuContainer) {
|
||||
menuContainer = setMenuContainer;
|
||||
triggerElement = $element[0].querySelector('[ng-click]');
|
||||
};
|
||||
this.init = angular.bind(this, init);
|
||||
this.open = angular.bind(this, openMenu);
|
||||
this.close = angular.bind(this, closeMenu);
|
||||
|
||||
// Uses the $mdMenu interim element service to open the menu contents
|
||||
this.open = function openMenu(ev) {
|
||||
this.positionMode = angular.bind(this, positionMode);
|
||||
this.offsets = angular.bind(this, offsets);
|
||||
|
||||
// Expose a open function to the child scope for html to use
|
||||
$scope.$mdOpenMenu = this.open;
|
||||
|
||||
/**
|
||||
* Called by our linking fn to provide access to the menu-content
|
||||
* element removed during link
|
||||
*/
|
||||
function init(setMenuContainer) {
|
||||
menuContainer = setMenuContainer;
|
||||
// Default element for ARIA attributes has the ngClick or ngMouseenter expression
|
||||
triggerElement = $element[0].querySelector('[ng-click],[ng-mouseenter]');
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses the $mdMenu interim element service to open the menu contents
|
||||
*/
|
||||
function openMenu(ev) {
|
||||
ev && ev.stopPropagation();
|
||||
|
||||
ctrl.isOpen = true;
|
||||
triggerElement = triggerElement || (ev ? ev.target : $element[0]);
|
||||
triggerElement.setAttribute('aria-expanded', 'true');
|
||||
|
||||
ctrl.isOpen = true;
|
||||
$mdMenu.show({
|
||||
scope: $scope,
|
||||
mdMenuCtrl: ctrl,
|
||||
element: menuContainer,
|
||||
target: $element[0]
|
||||
target: triggerElement
|
||||
});
|
||||
};
|
||||
// Expose a open function to the child scope for html to use
|
||||
$scope.$mdOpenMenu = this.open;
|
||||
}
|
||||
|
||||
// Use the $mdMenu interim element service to close the menu contents
|
||||
this.close = function closeMenu(skipFocus) {
|
||||
/**
|
||||
* Use the $mdMenu interim element service to close the menu contents
|
||||
*/
|
||||
function closeMenu(skipFocus) {
|
||||
if ( !ctrl.isOpen ) return;
|
||||
|
||||
ctrl.isOpen = false;
|
||||
triggerElement.setAttribute('aria-expanded', 'false');
|
||||
triggerElement && triggerElement.setAttribute('aria-expanded', 'false');
|
||||
$mdMenu.hide();
|
||||
|
||||
if (!skipFocus) {
|
||||
$element.children()[0].focus();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Build a nice object out of our string attribute which specifies the
|
||||
// target mode for left and top positioning
|
||||
this.positionMode = function() {
|
||||
/**
|
||||
* Build a nice object out of our string attribute which specifies the
|
||||
* target mode for left and top positioning
|
||||
*/
|
||||
function positionMode() {
|
||||
var attachment = ($attrs.mdPositionMode || 'target').split(' ');
|
||||
|
||||
// If attachment is a single item, duplicate it for our second value.
|
||||
@@ -9485,11 +9507,13 @@ function MenuController($mdMenu, $attrs, $element, $scope) {
|
||||
left: attachment[0],
|
||||
top: attachment[1]
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
// Build a nice object out of our string attribute which specifies
|
||||
// the offset of top and left in pixels.
|
||||
this.offsets = function() {
|
||||
/**
|
||||
* Build a nice object out of our string attribute which specifies
|
||||
* the offset of top and left in pixels.
|
||||
*/
|
||||
function offsets() {
|
||||
var offsets = ($attrs.mdOffset || '0 0').split(' ').map(parseFloat);
|
||||
if (offsets.length == 2) {
|
||||
return {
|
||||
@@ -9504,7 +9528,7 @@ function MenuController($mdMenu, $attrs, $element, $scope) {
|
||||
} else {
|
||||
throw Error('Invalid offsets specified. Please follow format <x, y> or <n>');
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
MenuController.$inject = ["$mdMenu", "$attrs", "$element", "$scope"];
|
||||
|
||||
@@ -16924,6 +16948,7 @@ function MdTabsController ($scope, $element, $window, $mdConstant, $mdTabInkRipp
|
||||
defineBooleanAttribute('noDisconnect');
|
||||
defineBooleanAttribute('autoselect');
|
||||
defineBooleanAttribute('centerTabs', handleCenterTabs);
|
||||
defineBooleanAttribute('enableDisconnect');
|
||||
|
||||
// define public properties
|
||||
ctrl.scope = $scope;
|
||||
@@ -17020,7 +17045,11 @@ function MdTabsController ($scope, $element, $window, $mdConstant, $mdTabInkRipp
|
||||
function defineBooleanAttribute (key, handler) {
|
||||
var attr = $attrs.$normalize('md-' + key);
|
||||
if (handler) defineProperty(key, handler);
|
||||
$attrs.$observe(attr, function (newValue) { ctrl[ key ] = newValue !== 'false'; });
|
||||
if ($attrs.hasOwnProperty(attr)) updateValue($attrs[attr]);
|
||||
$attrs.$observe(attr, updateValue);
|
||||
function updateValue (newValue) {
|
||||
ctrl[ key ] = newValue !== 'false';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -17687,10 +17716,10 @@ angular
|
||||
.module('material.components.tabs')
|
||||
.directive('mdTabs', MdTabs);
|
||||
|
||||
function MdTabs ($mdTheming, $mdUtil, $compile) {
|
||||
function MdTabs () {
|
||||
return {
|
||||
scope: {
|
||||
selectedIndex: '=?mdSelected',
|
||||
selectedIndex: '=?mdSelected'
|
||||
},
|
||||
template: function (element, attr) {
|
||||
attr[ "$mdTabsTemplate" ] = element.html();
|
||||
@@ -17778,7 +17807,6 @@ function MdTabs ($mdTheming, $mdUtil, $compile) {
|
||||
md-swipe-right="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(-1)"\
|
||||
ng-if="$mdTabsCtrl.hasContent"\
|
||||
ng-repeat="(index, tab) in $mdTabsCtrl.tabs"\
|
||||
md-connected-if="tab.isActive()"\
|
||||
ng-class="{\
|
||||
\'md-no-transition\': $mdTabsCtrl.lastSelectedIndex == null,\
|
||||
\'md-active\': tab.isActive(),\
|
||||
@@ -17788,8 +17816,9 @@ function MdTabs ($mdTheming, $mdUtil, $compile) {
|
||||
}">\
|
||||
<div\
|
||||
md-template="::tab.template"\
|
||||
md-connected-if="tab.isActive()"\
|
||||
md-scope="::tab.parent"\
|
||||
ng-if="tab.shouldRender()"></div>\
|
||||
ng-if="$mdTabsCtrl.enableDisconnect || tab.shouldRender()"></div>\
|
||||
</md-tab-content>\
|
||||
</md-tabs-content-wrapper>\
|
||||
';
|
||||
@@ -17799,7 +17828,6 @@ function MdTabs ($mdTheming, $mdUtil, $compile) {
|
||||
bindToController: true
|
||||
};
|
||||
}
|
||||
MdTabs.$inject = ["$mdTheming", "$mdUtil", "$compile"];
|
||||
|
||||
})();
|
||||
(function(){
|
||||
@@ -17809,28 +17837,43 @@ angular
|
||||
.module('material.components.tabs')
|
||||
.directive('mdTemplate', MdTemplate);
|
||||
|
||||
function MdTemplate ($compile) {
|
||||
function MdTemplate ($compile, $mdUtil) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: link,
|
||||
scope: {
|
||||
template: '=mdTemplate',
|
||||
connected: '=?mdConnectedIf',
|
||||
compileScope: '=mdScope'
|
||||
},
|
||||
require: '^?mdTabs'
|
||||
};
|
||||
function link (scope, element, attr, ctrl) {
|
||||
if (!ctrl) return;
|
||||
var compileScope = scope.compileScope;
|
||||
var compileScope = ctrl.enableDisconnect ? scope.compileScope.$new() : scope.compileScope;
|
||||
element.html(scope.template);
|
||||
$compile(element.contents())(compileScope);
|
||||
element.on('DOMSubtreeModified', function () {
|
||||
ctrl.updatePagination();
|
||||
ctrl.updateInkBarStyles();
|
||||
});
|
||||
return $mdUtil.nextTick(handleScope);
|
||||
|
||||
function handleScope () {
|
||||
scope.$watch('connected', function (value) { value === false ? disconnect() : reconnect(); });
|
||||
scope.$on('$destroy', reconnect);
|
||||
}
|
||||
|
||||
function disconnect () {
|
||||
if (ctrl.enableDisconnect) $mdUtil.disconnectScope(compileScope);
|
||||
}
|
||||
|
||||
function reconnect () {
|
||||
if (ctrl.enableDisconnect) $mdUtil.reconnectScope(compileScope);
|
||||
}
|
||||
}
|
||||
}
|
||||
MdTemplate.$inject = ["$compile"];
|
||||
MdTemplate.$inject = ["$compile", "$mdUtil"];
|
||||
|
||||
})();
|
||||
(function(){
|
||||
|
||||
Reference in New Issue
Block a user