Updated bower libs.
This commit is contained in:
parent
f310b8f097
commit
98d5fde88a
71 changed files with 4642 additions and 50078 deletions
|
|
@ -11,7 +11,7 @@
|
|||
"license": "MIT",
|
||||
"ignore": [],
|
||||
"description": "Native AngularJS (Angular) directives for Bootstrap.",
|
||||
"version": "1.3.2",
|
||||
"version": "1.3.3",
|
||||
"main": [
|
||||
"./ui-bootstrap-tpls.js"
|
||||
],
|
||||
|
|
@ -19,13 +19,13 @@
|
|||
"angular": ">=1.4.0"
|
||||
},
|
||||
"homepage": "https://github.com/angular-ui/bootstrap-bower",
|
||||
"_release": "1.3.2",
|
||||
"_release": "1.3.3",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.3.2",
|
||||
"commit": "77da362b0b86c0a86762b56d64aaec107889f31a"
|
||||
"tag": "1.3.3",
|
||||
"commit": "d45246707f5bf9533e3824861a29abd36757db45"
|
||||
},
|
||||
"_source": "https://github.com/angular-ui/bootstrap-bower.git",
|
||||
"_target": "~1.3.2",
|
||||
"_target": "1.3.3",
|
||||
"_originalSource": "angular-bootstrap"
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
"license": "MIT",
|
||||
"ignore": [],
|
||||
"description": "Native AngularJS (Angular) directives for Bootstrap.",
|
||||
"version": "1.3.2",
|
||||
"version": "1.3.3",
|
||||
"main": ["./ui-bootstrap-tpls.js"],
|
||||
"dependencies": {
|
||||
"angular": ">=1.4.0"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "angular-ui-bootstrap",
|
||||
"version": "1.3.2",
|
||||
"version": "1.3.3",
|
||||
"description": "Bootstrap widgets for Angular",
|
||||
"main": "index.js",
|
||||
"homepage": "http://angular-ui.github.io/bootstrap/",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* angular-ui-bootstrap
|
||||
* http://angular-ui.github.io/bootstrap/
|
||||
|
||||
* Version: 1.3.2 - 2016-04-14
|
||||
* Version: 1.3.3 - 2016-05-22
|
||||
* License: MIT
|
||||
*/angular.module("ui.bootstrap", ["ui.bootstrap.tpls", "ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]);
|
||||
angular.module("ui.bootstrap.tpls", ["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]);
|
||||
|
|
@ -234,13 +234,23 @@ angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
|
|||
link: function(scope, element, attrs, controller) {
|
||||
scope.$watch(function() { return controller[attrs.uibAccordionTransclude]; }, function(heading) {
|
||||
if (heading) {
|
||||
var elem = angular.element(element[0].querySelector('[uib-accordion-header]'));
|
||||
var elem = angular.element(element[0].querySelector(getHeaderSelectors()));
|
||||
elem.html('');
|
||||
elem.append(heading);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function getHeaderSelectors() {
|
||||
return 'uib-accordion-header,' +
|
||||
'data-uib-accordion-header,' +
|
||||
'x-uib-accordion-header,' +
|
||||
'uib\\:accordion-header,' +
|
||||
'[uib-accordion-header],' +
|
||||
'[data-uib-accordion-header],' +
|
||||
'[x-uib-accordion-header]';
|
||||
}
|
||||
});
|
||||
|
||||
angular.module('ui.bootstrap.alert', [])
|
||||
|
|
@ -1184,8 +1194,9 @@ angular.module('ui.bootstrap.dateparser', [])
|
|||
return date && timezone ? convertTimezoneToLocal(date, timezone, true) : date;
|
||||
}
|
||||
|
||||
//https://github.com/angular/angular.js/blob/4daafd3dbe6a80d578f5a31df1bb99c77559543e/src/Angular.js#L1207
|
||||
//https://github.com/angular/angular.js/blob/622c42169699ec07fc6daaa19fe6d224e5d2f70e/src/Angular.js#L1207
|
||||
function timezoneToOffset(timezone, fallback) {
|
||||
timezone = timezone.replace(/:/g, '');
|
||||
var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
|
||||
return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
|
||||
}
|
||||
|
|
@ -1198,8 +1209,9 @@ angular.module('ui.bootstrap.dateparser', [])
|
|||
|
||||
function convertTimezoneToLocal(date, timezone, reverse) {
|
||||
reverse = reverse ? -1 : 1;
|
||||
var timezoneOffset = timezoneToOffset(timezone, date.getTimezoneOffset());
|
||||
return addDateMinutes(date, reverse * (timezoneOffset - date.getTimezoneOffset()));
|
||||
var dateTimezoneOffset = date.getTimezoneOffset();
|
||||
var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
|
||||
return addDateMinutes(date, reverse * (timezoneOffset - dateTimezoneOffset));
|
||||
}
|
||||
}]);
|
||||
|
||||
|
|
@ -1471,8 +1483,9 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
|
|||
self.activeDate = new Date();
|
||||
}
|
||||
|
||||
this.activeDate = ngModelCtrl.$modelValue ?
|
||||
dateParser.fromTimezone(new Date(ngModelCtrl.$modelValue), ngModelOptions.timezone) :
|
||||
var date = ngModelCtrl.$modelValue ? new Date(ngModelCtrl.$modelValue) : new Date();
|
||||
this.activeDate = !isNaN(date) ?
|
||||
dateParser.fromTimezone(date, ngModelOptions.timezone) :
|
||||
dateParser.fromTimezone(new Date(), ngModelOptions.timezone);
|
||||
|
||||
ngModelCtrl.$render = function() {
|
||||
|
|
@ -2677,12 +2690,12 @@ function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $
|
|||
return value;
|
||||
}
|
||||
|
||||
$scope.date = dateParser.fromTimezone(value, timezone);
|
||||
|
||||
if (angular.isNumber($scope.date)) {
|
||||
$scope.date = new Date($scope.date);
|
||||
if (angular.isNumber(value)) {
|
||||
value = new Date(value);
|
||||
}
|
||||
|
||||
$scope.date = dateParser.fromTimezone(value, timezone);
|
||||
|
||||
return dateParser.filter($scope.date, dateFormat);
|
||||
});
|
||||
} else {
|
||||
|
|
@ -3217,7 +3230,8 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
|
|||
if (appendTo && self.dropdownMenu) {
|
||||
var pos = $position.positionElements($element, self.dropdownMenu, 'bottom-left', true),
|
||||
css,
|
||||
rightalign;
|
||||
rightalign,
|
||||
scrollbarWidth;
|
||||
|
||||
css = {
|
||||
top: pos.top + 'px',
|
||||
|
|
@ -3230,7 +3244,8 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
|
|||
css.right = 'auto';
|
||||
} else {
|
||||
css.left = 'auto';
|
||||
css.right = window.innerWidth -
|
||||
scrollbarWidth = $position.scrollbarWidth(true);
|
||||
css.right = window.innerWidth - scrollbarWidth -
|
||||
(pos.left + $element.prop('offsetWidth')) + 'px';
|
||||
}
|
||||
|
||||
|
|
@ -4117,30 +4132,27 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap', 'ui.bootstrap.p
|
|||
//controllers
|
||||
if (modalOptions.controller) {
|
||||
ctrlLocals.$scope = modalScope;
|
||||
ctrlLocals.$scope.$resolve = {};
|
||||
ctrlLocals.$uibModalInstance = modalInstance;
|
||||
angular.forEach(tplAndVars[1], function(value, key) {
|
||||
ctrlLocals[key] = value;
|
||||
ctrlLocals.$scope.$resolve[key] = value;
|
||||
});
|
||||
|
||||
// the third param will make the controller instantiate later,private api
|
||||
// @see https://github.com/angular/angular.js/blob/master/src/ng/controller.js#L126
|
||||
ctrlInstantiate = $controller(modalOptions.controller, ctrlLocals, true);
|
||||
if (modalOptions.controllerAs) {
|
||||
ctrlInstantiate = $controller(modalOptions.controller, ctrlLocals, true, modalOptions.controllerAs);
|
||||
if (modalOptions.controllerAs && modalOptions.bindToController) {
|
||||
ctrlInstance = ctrlInstantiate.instance;
|
||||
|
||||
if (modalOptions.bindToController) {
|
||||
ctrlInstance.$close = modalScope.$close;
|
||||
ctrlInstance.$dismiss = modalScope.$dismiss;
|
||||
angular.extend(ctrlInstance, providedScope);
|
||||
}
|
||||
|
||||
ctrlInstance = ctrlInstantiate();
|
||||
|
||||
modalScope[modalOptions.controllerAs] = ctrlInstance;
|
||||
} else {
|
||||
ctrlInstance = ctrlInstantiate();
|
||||
ctrlInstance.$close = modalScope.$close;
|
||||
ctrlInstance.$dismiss = modalScope.$dismiss;
|
||||
angular.extend(ctrlInstance, {
|
||||
$resolve: ctrlLocals.$scope.$resolve
|
||||
}, providedScope);
|
||||
}
|
||||
|
||||
ctrlInstance = ctrlInstantiate();
|
||||
|
||||
if (angular.isFunction(ctrlInstance.$onInit)) {
|
||||
ctrlInstance.$onInit();
|
||||
}
|
||||
|
|
@ -5445,7 +5457,8 @@ angular.module('ui.bootstrap.tabs', [])
|
|||
var previousSelected = ctrl.tabs[previousIndex];
|
||||
if (previousSelected) {
|
||||
previousSelected.tab.onDeselect({
|
||||
$event: evt
|
||||
$event: evt,
|
||||
$selectedIndex: index
|
||||
});
|
||||
if (evt && evt.isDefaultPrevented()) {
|
||||
return;
|
||||
|
|
@ -5461,7 +5474,7 @@ angular.module('ui.bootstrap.tabs', [])
|
|||
selected.tab.active = true;
|
||||
ctrl.active = selected.index;
|
||||
oldIndex = selected.index;
|
||||
} else if (!selected && angular.isNumber(oldIndex)) {
|
||||
} else if (!selected && angular.isDefined(oldIndex)) {
|
||||
ctrl.active = null;
|
||||
oldIndex = null;
|
||||
}
|
||||
|
|
@ -5485,7 +5498,7 @@ angular.module('ui.bootstrap.tabs', [])
|
|||
return 0;
|
||||
});
|
||||
|
||||
if (tab.index === ctrl.active || !angular.isNumber(ctrl.active) && ctrl.tabs.length === 1) {
|
||||
if (tab.index === ctrl.active || !angular.isDefined(ctrl.active) && ctrl.tabs.length === 1) {
|
||||
var newActiveIndex = findTabIndex(tab.index);
|
||||
ctrl.select(newActiveIndex);
|
||||
}
|
||||
|
|
@ -5510,7 +5523,7 @@ angular.module('ui.bootstrap.tabs', [])
|
|||
};
|
||||
|
||||
$scope.$watch('tabset.active', function(val) {
|
||||
if (angular.isNumber(val) && val !== oldIndex) {
|
||||
if (angular.isDefined(val) && val !== oldIndex) {
|
||||
ctrl.select(findTabIndex(val));
|
||||
}
|
||||
});
|
||||
|
|
@ -5548,9 +5561,6 @@ angular.module('ui.bootstrap.tabs', [])
|
|||
scope.$parent.$eval(attrs.vertical) : false;
|
||||
scope.justified = angular.isDefined(attrs.justified) ?
|
||||
scope.$parent.$eval(attrs.justified) : false;
|
||||
if (angular.isUndefined(attrs.active)) {
|
||||
scope.active = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
})
|
||||
|
|
@ -6281,7 +6291,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
|
|||
originalScope.$watch(attrs.typeaheadMinLength, function (newVal) {
|
||||
minLength = !newVal && newVal !== 0 ? 1 : newVal;
|
||||
});
|
||||
|
||||
|
||||
//minimal wait time after last character typed before typeahead kicks-in
|
||||
var waitTime = originalScope.$eval(attrs.typeaheadWaitMs) || 0;
|
||||
|
||||
|
|
@ -6294,6 +6304,12 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
|
|||
//binding to a variable that indicates if matches are being retrieved asynchronously
|
||||
var isLoadingSetter = $parse(attrs.typeaheadLoading).assign || angular.noop;
|
||||
|
||||
//a function to determine if an event should cause selection
|
||||
var isSelectEvent = attrs.typeaheadShouldSelect ? $parse(attrs.typeaheadShouldSelect) : function(scope, vals) {
|
||||
var evt = vals.$event;
|
||||
return evt.which === 13 || evt.which === 9;
|
||||
};
|
||||
|
||||
//a callback executed when a match is selected
|
||||
var onSelectCallback = $parse(attrs.typeaheadOnSelect);
|
||||
|
||||
|
|
@ -6609,13 +6625,15 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
|
|||
return;
|
||||
}
|
||||
|
||||
var shouldSelect = isSelectEvent(originalScope, {$event: evt});
|
||||
|
||||
/**
|
||||
* if there's nothing selected (i.e. focusFirst) and enter or tab is hit
|
||||
* or
|
||||
* shift + tab is pressed to bring focus to the previous element
|
||||
* then clear the results
|
||||
*/
|
||||
if (scope.activeIdx === -1 && (evt.which === 9 || evt.which === 13) || evt.which === 9 && !!evt.shiftKey) {
|
||||
if (scope.activeIdx === -1 && shouldSelect || evt.which === 9 && !!evt.shiftKey) {
|
||||
resetMatches();
|
||||
scope.$digest();
|
||||
return;
|
||||
|
|
@ -6624,36 +6642,36 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
|
|||
evt.preventDefault();
|
||||
var target;
|
||||
switch (evt.which) {
|
||||
case 9:
|
||||
case 13:
|
||||
scope.$apply(function () {
|
||||
if (angular.isNumber(scope.debounceUpdate) || angular.isObject(scope.debounceUpdate)) {
|
||||
$$debounce(function() {
|
||||
scope.select(scope.activeIdx, evt);
|
||||
}, angular.isNumber(scope.debounceUpdate) ? scope.debounceUpdate : scope.debounceUpdate['default']);
|
||||
} else {
|
||||
scope.select(scope.activeIdx, evt);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 27:
|
||||
case 27: // escape
|
||||
evt.stopPropagation();
|
||||
|
||||
resetMatches();
|
||||
originalScope.$digest();
|
||||
break;
|
||||
case 38:
|
||||
case 38: // up arrow
|
||||
scope.activeIdx = (scope.activeIdx > 0 ? scope.activeIdx : scope.matches.length) - 1;
|
||||
scope.$digest();
|
||||
target = popUpEl.find('li')[scope.activeIdx];
|
||||
target.parentNode.scrollTop = target.offsetTop;
|
||||
break;
|
||||
case 40:
|
||||
case 40: // down arrow
|
||||
scope.activeIdx = (scope.activeIdx + 1) % scope.matches.length;
|
||||
scope.$digest();
|
||||
target = popUpEl.find('li')[scope.activeIdx];
|
||||
target.parentNode.scrollTop = target.offsetTop;
|
||||
break;
|
||||
default:
|
||||
if (shouldSelect) {
|
||||
scope.$apply(function() {
|
||||
if (angular.isNumber(scope.debounceUpdate) || angular.isObject(scope.debounceUpdate)) {
|
||||
$$debounce(function() {
|
||||
scope.select(scope.activeIdx, evt);
|
||||
}, angular.isNumber(scope.debounceUpdate) ? scope.debounceUpdate : scope.debounceUpdate['default']);
|
||||
} else {
|
||||
scope.select(scope.activeIdx, evt);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -2,7 +2,7 @@
|
|||
* angular-ui-bootstrap
|
||||
* http://angular-ui.github.io/bootstrap/
|
||||
|
||||
* Version: 1.3.2 - 2016-04-14
|
||||
* Version: 1.3.3 - 2016-05-22
|
||||
* License: MIT
|
||||
*/angular.module("ui.bootstrap", ["ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]);
|
||||
angular.module('ui.bootstrap.collapse', [])
|
||||
|
|
@ -233,13 +233,23 @@ angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
|
|||
link: function(scope, element, attrs, controller) {
|
||||
scope.$watch(function() { return controller[attrs.uibAccordionTransclude]; }, function(heading) {
|
||||
if (heading) {
|
||||
var elem = angular.element(element[0].querySelector('[uib-accordion-header]'));
|
||||
var elem = angular.element(element[0].querySelector(getHeaderSelectors()));
|
||||
elem.html('');
|
||||
elem.append(heading);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function getHeaderSelectors() {
|
||||
return 'uib-accordion-header,' +
|
||||
'data-uib-accordion-header,' +
|
||||
'x-uib-accordion-header,' +
|
||||
'uib\\:accordion-header,' +
|
||||
'[uib-accordion-header],' +
|
||||
'[data-uib-accordion-header],' +
|
||||
'[x-uib-accordion-header]';
|
||||
}
|
||||
});
|
||||
|
||||
angular.module('ui.bootstrap.alert', [])
|
||||
|
|
@ -1183,8 +1193,9 @@ angular.module('ui.bootstrap.dateparser', [])
|
|||
return date && timezone ? convertTimezoneToLocal(date, timezone, true) : date;
|
||||
}
|
||||
|
||||
//https://github.com/angular/angular.js/blob/4daafd3dbe6a80d578f5a31df1bb99c77559543e/src/Angular.js#L1207
|
||||
//https://github.com/angular/angular.js/blob/622c42169699ec07fc6daaa19fe6d224e5d2f70e/src/Angular.js#L1207
|
||||
function timezoneToOffset(timezone, fallback) {
|
||||
timezone = timezone.replace(/:/g, '');
|
||||
var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
|
||||
return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
|
||||
}
|
||||
|
|
@ -1197,8 +1208,9 @@ angular.module('ui.bootstrap.dateparser', [])
|
|||
|
||||
function convertTimezoneToLocal(date, timezone, reverse) {
|
||||
reverse = reverse ? -1 : 1;
|
||||
var timezoneOffset = timezoneToOffset(timezone, date.getTimezoneOffset());
|
||||
return addDateMinutes(date, reverse * (timezoneOffset - date.getTimezoneOffset()));
|
||||
var dateTimezoneOffset = date.getTimezoneOffset();
|
||||
var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
|
||||
return addDateMinutes(date, reverse * (timezoneOffset - dateTimezoneOffset));
|
||||
}
|
||||
}]);
|
||||
|
||||
|
|
@ -1470,8 +1482,9 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
|
|||
self.activeDate = new Date();
|
||||
}
|
||||
|
||||
this.activeDate = ngModelCtrl.$modelValue ?
|
||||
dateParser.fromTimezone(new Date(ngModelCtrl.$modelValue), ngModelOptions.timezone) :
|
||||
var date = ngModelCtrl.$modelValue ? new Date(ngModelCtrl.$modelValue) : new Date();
|
||||
this.activeDate = !isNaN(date) ?
|
||||
dateParser.fromTimezone(date, ngModelOptions.timezone) :
|
||||
dateParser.fromTimezone(new Date(), ngModelOptions.timezone);
|
||||
|
||||
ngModelCtrl.$render = function() {
|
||||
|
|
@ -2676,12 +2689,12 @@ function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $
|
|||
return value;
|
||||
}
|
||||
|
||||
$scope.date = dateParser.fromTimezone(value, timezone);
|
||||
|
||||
if (angular.isNumber($scope.date)) {
|
||||
$scope.date = new Date($scope.date);
|
||||
if (angular.isNumber(value)) {
|
||||
value = new Date(value);
|
||||
}
|
||||
|
||||
$scope.date = dateParser.fromTimezone(value, timezone);
|
||||
|
||||
return dateParser.filter($scope.date, dateFormat);
|
||||
});
|
||||
} else {
|
||||
|
|
@ -3216,7 +3229,8 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
|
|||
if (appendTo && self.dropdownMenu) {
|
||||
var pos = $position.positionElements($element, self.dropdownMenu, 'bottom-left', true),
|
||||
css,
|
||||
rightalign;
|
||||
rightalign,
|
||||
scrollbarWidth;
|
||||
|
||||
css = {
|
||||
top: pos.top + 'px',
|
||||
|
|
@ -3229,7 +3243,8 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
|
|||
css.right = 'auto';
|
||||
} else {
|
||||
css.left = 'auto';
|
||||
css.right = window.innerWidth -
|
||||
scrollbarWidth = $position.scrollbarWidth(true);
|
||||
css.right = window.innerWidth - scrollbarWidth -
|
||||
(pos.left + $element.prop('offsetWidth')) + 'px';
|
||||
}
|
||||
|
||||
|
|
@ -4116,30 +4131,27 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap', 'ui.bootstrap.p
|
|||
//controllers
|
||||
if (modalOptions.controller) {
|
||||
ctrlLocals.$scope = modalScope;
|
||||
ctrlLocals.$scope.$resolve = {};
|
||||
ctrlLocals.$uibModalInstance = modalInstance;
|
||||
angular.forEach(tplAndVars[1], function(value, key) {
|
||||
ctrlLocals[key] = value;
|
||||
ctrlLocals.$scope.$resolve[key] = value;
|
||||
});
|
||||
|
||||
// the third param will make the controller instantiate later,private api
|
||||
// @see https://github.com/angular/angular.js/blob/master/src/ng/controller.js#L126
|
||||
ctrlInstantiate = $controller(modalOptions.controller, ctrlLocals, true);
|
||||
if (modalOptions.controllerAs) {
|
||||
ctrlInstantiate = $controller(modalOptions.controller, ctrlLocals, true, modalOptions.controllerAs);
|
||||
if (modalOptions.controllerAs && modalOptions.bindToController) {
|
||||
ctrlInstance = ctrlInstantiate.instance;
|
||||
|
||||
if (modalOptions.bindToController) {
|
||||
ctrlInstance.$close = modalScope.$close;
|
||||
ctrlInstance.$dismiss = modalScope.$dismiss;
|
||||
angular.extend(ctrlInstance, providedScope);
|
||||
}
|
||||
|
||||
ctrlInstance = ctrlInstantiate();
|
||||
|
||||
modalScope[modalOptions.controllerAs] = ctrlInstance;
|
||||
} else {
|
||||
ctrlInstance = ctrlInstantiate();
|
||||
ctrlInstance.$close = modalScope.$close;
|
||||
ctrlInstance.$dismiss = modalScope.$dismiss;
|
||||
angular.extend(ctrlInstance, {
|
||||
$resolve: ctrlLocals.$scope.$resolve
|
||||
}, providedScope);
|
||||
}
|
||||
|
||||
ctrlInstance = ctrlInstantiate();
|
||||
|
||||
if (angular.isFunction(ctrlInstance.$onInit)) {
|
||||
ctrlInstance.$onInit();
|
||||
}
|
||||
|
|
@ -5444,7 +5456,8 @@ angular.module('ui.bootstrap.tabs', [])
|
|||
var previousSelected = ctrl.tabs[previousIndex];
|
||||
if (previousSelected) {
|
||||
previousSelected.tab.onDeselect({
|
||||
$event: evt
|
||||
$event: evt,
|
||||
$selectedIndex: index
|
||||
});
|
||||
if (evt && evt.isDefaultPrevented()) {
|
||||
return;
|
||||
|
|
@ -5460,7 +5473,7 @@ angular.module('ui.bootstrap.tabs', [])
|
|||
selected.tab.active = true;
|
||||
ctrl.active = selected.index;
|
||||
oldIndex = selected.index;
|
||||
} else if (!selected && angular.isNumber(oldIndex)) {
|
||||
} else if (!selected && angular.isDefined(oldIndex)) {
|
||||
ctrl.active = null;
|
||||
oldIndex = null;
|
||||
}
|
||||
|
|
@ -5484,7 +5497,7 @@ angular.module('ui.bootstrap.tabs', [])
|
|||
return 0;
|
||||
});
|
||||
|
||||
if (tab.index === ctrl.active || !angular.isNumber(ctrl.active) && ctrl.tabs.length === 1) {
|
||||
if (tab.index === ctrl.active || !angular.isDefined(ctrl.active) && ctrl.tabs.length === 1) {
|
||||
var newActiveIndex = findTabIndex(tab.index);
|
||||
ctrl.select(newActiveIndex);
|
||||
}
|
||||
|
|
@ -5509,7 +5522,7 @@ angular.module('ui.bootstrap.tabs', [])
|
|||
};
|
||||
|
||||
$scope.$watch('tabset.active', function(val) {
|
||||
if (angular.isNumber(val) && val !== oldIndex) {
|
||||
if (angular.isDefined(val) && val !== oldIndex) {
|
||||
ctrl.select(findTabIndex(val));
|
||||
}
|
||||
});
|
||||
|
|
@ -5547,9 +5560,6 @@ angular.module('ui.bootstrap.tabs', [])
|
|||
scope.$parent.$eval(attrs.vertical) : false;
|
||||
scope.justified = angular.isDefined(attrs.justified) ?
|
||||
scope.$parent.$eval(attrs.justified) : false;
|
||||
if (angular.isUndefined(attrs.active)) {
|
||||
scope.active = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
})
|
||||
|
|
@ -6280,7 +6290,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
|
|||
originalScope.$watch(attrs.typeaheadMinLength, function (newVal) {
|
||||
minLength = !newVal && newVal !== 0 ? 1 : newVal;
|
||||
});
|
||||
|
||||
|
||||
//minimal wait time after last character typed before typeahead kicks-in
|
||||
var waitTime = originalScope.$eval(attrs.typeaheadWaitMs) || 0;
|
||||
|
||||
|
|
@ -6293,6 +6303,12 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
|
|||
//binding to a variable that indicates if matches are being retrieved asynchronously
|
||||
var isLoadingSetter = $parse(attrs.typeaheadLoading).assign || angular.noop;
|
||||
|
||||
//a function to determine if an event should cause selection
|
||||
var isSelectEvent = attrs.typeaheadShouldSelect ? $parse(attrs.typeaheadShouldSelect) : function(scope, vals) {
|
||||
var evt = vals.$event;
|
||||
return evt.which === 13 || evt.which === 9;
|
||||
};
|
||||
|
||||
//a callback executed when a match is selected
|
||||
var onSelectCallback = $parse(attrs.typeaheadOnSelect);
|
||||
|
||||
|
|
@ -6608,13 +6624,15 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
|
|||
return;
|
||||
}
|
||||
|
||||
var shouldSelect = isSelectEvent(originalScope, {$event: evt});
|
||||
|
||||
/**
|
||||
* if there's nothing selected (i.e. focusFirst) and enter or tab is hit
|
||||
* or
|
||||
* shift + tab is pressed to bring focus to the previous element
|
||||
* then clear the results
|
||||
*/
|
||||
if (scope.activeIdx === -1 && (evt.which === 9 || evt.which === 13) || evt.which === 9 && !!evt.shiftKey) {
|
||||
if (scope.activeIdx === -1 && shouldSelect || evt.which === 9 && !!evt.shiftKey) {
|
||||
resetMatches();
|
||||
scope.$digest();
|
||||
return;
|
||||
|
|
@ -6623,36 +6641,36 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
|
|||
evt.preventDefault();
|
||||
var target;
|
||||
switch (evt.which) {
|
||||
case 9:
|
||||
case 13:
|
||||
scope.$apply(function () {
|
||||
if (angular.isNumber(scope.debounceUpdate) || angular.isObject(scope.debounceUpdate)) {
|
||||
$$debounce(function() {
|
||||
scope.select(scope.activeIdx, evt);
|
||||
}, angular.isNumber(scope.debounceUpdate) ? scope.debounceUpdate : scope.debounceUpdate['default']);
|
||||
} else {
|
||||
scope.select(scope.activeIdx, evt);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 27:
|
||||
case 27: // escape
|
||||
evt.stopPropagation();
|
||||
|
||||
resetMatches();
|
||||
originalScope.$digest();
|
||||
break;
|
||||
case 38:
|
||||
case 38: // up arrow
|
||||
scope.activeIdx = (scope.activeIdx > 0 ? scope.activeIdx : scope.matches.length) - 1;
|
||||
scope.$digest();
|
||||
target = popUpEl.find('li')[scope.activeIdx];
|
||||
target.parentNode.scrollTop = target.offsetTop;
|
||||
break;
|
||||
case 40:
|
||||
case 40: // down arrow
|
||||
scope.activeIdx = (scope.activeIdx + 1) % scope.matches.length;
|
||||
scope.$digest();
|
||||
target = popUpEl.find('li')[scope.activeIdx];
|
||||
target.parentNode.scrollTop = target.offsetTop;
|
||||
break;
|
||||
default:
|
||||
if (shouldSelect) {
|
||||
scope.$apply(function() {
|
||||
if (angular.isNumber(scope.debounceUpdate) || angular.isObject(scope.debounceUpdate)) {
|
||||
$$debounce(function() {
|
||||
scope.select(scope.activeIdx, evt);
|
||||
}, angular.isNumber(scope.debounceUpdate) ? scope.debounceUpdate : scope.debounceUpdate['default']);
|
||||
} else {
|
||||
scope.select(scope.activeIdx, evt);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -68,6 +68,6 @@
|
|||
"commit": "15323bc8c3bad3f2dedafbcfebb6772dc0813cfb"
|
||||
},
|
||||
"_source": "https://github.com/tombatossals/angular-leaflet-directive.git",
|
||||
"_target": "~0.10.0",
|
||||
"_target": "0.10.0",
|
||||
"_originalSource": "angular-leaflet-directive"
|
||||
}
|
||||
20
app/bower_components/angular-mocks/.bower.json
vendored
20
app/bower_components/angular-mocks/.bower.json
vendored
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"name": "angular-mocks",
|
||||
"version": "1.5.6-build.4801+sha.3b5751d",
|
||||
"license": "MIT",
|
||||
"main": "./angular-mocks.js",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"angular": "1.5.6-build.4801+sha.3b5751d"
|
||||
},
|
||||
"homepage": "https://github.com/angular/bower-angular-mocks",
|
||||
"_release": "1.5.6-build.4801+sha.3b5751d",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.5.6-build.4801+sha.3b5751d",
|
||||
"commit": "0a8b4b9b19bdbc42ec5599c329692e8a28084838"
|
||||
},
|
||||
"_source": "https://github.com/angular/bower-angular-mocks.git",
|
||||
"_target": "~1.5.6",
|
||||
"_originalSource": "angular-mocks"
|
||||
}
|
||||
63
app/bower_components/angular-mocks/README.md
vendored
63
app/bower_components/angular-mocks/README.md
vendored
|
|
@ -1,63 +0,0 @@
|
|||
# packaged angular-mocks
|
||||
|
||||
This repo is for distribution on `npm` and `bower`. The source for this module is in the
|
||||
[main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngMock).
|
||||
Please file issues and pull requests against that repo.
|
||||
|
||||
## Install
|
||||
|
||||
You can install this package either with `npm` or with `bower`.
|
||||
|
||||
### npm
|
||||
|
||||
```shell
|
||||
npm install angular-mocks
|
||||
```
|
||||
|
||||
You can `require` ngMock modules:
|
||||
|
||||
```js
|
||||
var angular = require('angular');
|
||||
angular.module('myMod', [
|
||||
require('angular-animate'),
|
||||
require('angular-mocks/ngMock'),
|
||||
require('angular-mocks/ngAnimateMock')
|
||||
]);
|
||||
```
|
||||
|
||||
### bower
|
||||
|
||||
```shell
|
||||
bower install angular-mocks
|
||||
```
|
||||
|
||||
The mocks are then available at `bower_components/angular-mocks/angular-mocks.js`.
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation is available on the
|
||||
[AngularJS docs site](https://docs.angularjs.org/guide/unit-testing).
|
||||
|
||||
## License
|
||||
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
3116
app/bower_components/angular-mocks/angular-mocks.js
vendored
3116
app/bower_components/angular-mocks/angular-mocks.js
vendored
File diff suppressed because it is too large
Load diff
10
app/bower_components/angular-mocks/bower.json
vendored
10
app/bower_components/angular-mocks/bower.json
vendored
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"name": "angular-mocks",
|
||||
"version": "1.5.6-build.4801+sha.3b5751d",
|
||||
"license": "MIT",
|
||||
"main": "./angular-mocks.js",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"angular": "1.5.6-build.4801+sha.3b5751d"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
require('./angular-mocks');
|
||||
module.exports = 'ngAnimateMock';
|
||||
2
app/bower_components/angular-mocks/ngMock.js
vendored
2
app/bower_components/angular-mocks/ngMock.js
vendored
|
|
@ -1,2 +0,0 @@
|
|||
require('./angular-mocks');
|
||||
module.exports = 'ngMock';
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
require('./angular-mocks');
|
||||
module.exports = 'ngMockE2E';
|
||||
27
app/bower_components/angular-mocks/package.json
vendored
27
app/bower_components/angular-mocks/package.json
vendored
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"name": "angular-mocks",
|
||||
"version": "1.5.6-build.4801+sha.3b5751d",
|
||||
"description": "AngularJS mocks for testing",
|
||||
"main": "angular-mocks.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/angular/angular.js.git"
|
||||
},
|
||||
"keywords": [
|
||||
"angular",
|
||||
"framework",
|
||||
"browser",
|
||||
"mocks",
|
||||
"testing",
|
||||
"client-side"
|
||||
],
|
||||
"author": "Angular Core Team <angular-core+npm@google.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/angular/angular.js/issues"
|
||||
},
|
||||
"homepage": "http://angularjs.org"
|
||||
}
|
||||
12
app/bower_components/angular-route/.bower.json
vendored
12
app/bower_components/angular-route/.bower.json
vendored
|
|
@ -1,20 +1,20 @@
|
|||
{
|
||||
"name": "angular-route",
|
||||
"version": "1.5.6-build.4801+sha.3b5751d",
|
||||
"version": "1.5.6",
|
||||
"license": "MIT",
|
||||
"main": "./angular-route.js",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"angular": "1.5.6-build.4801+sha.3b5751d"
|
||||
"angular": "1.5.6"
|
||||
},
|
||||
"homepage": "https://github.com/angular/bower-angular-route",
|
||||
"_release": "1.5.6-build.4801+sha.3b5751d",
|
||||
"_release": "1.5.6",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.5.6-build.4801+sha.3b5751d",
|
||||
"commit": "c3aa1161a8e208b335315ef18681b63ff81df18e"
|
||||
"tag": "v1.5.6",
|
||||
"commit": "16ab7a0572be02f2af0e9dd0bc01079628742a48"
|
||||
},
|
||||
"_source": "https://github.com/angular/bower-angular-route.git",
|
||||
"_target": "~1.5.6",
|
||||
"_target": "1.5.6",
|
||||
"_originalSource": "angular-route"
|
||||
}
|
||||
21
app/bower_components/angular-route/LICENSE.md
vendored
Normal file
21
app/bower_components/angular-route/LICENSE.md
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Angular
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @license AngularJS v1.5.6-build.4801+sha.3b5751d
|
||||
* @license AngularJS v1.5.6
|
||||
* (c) 2010-2016 Google, Inc. http://angularjs.org
|
||||
* License: MIT
|
||||
*/
|
||||
|
|
@ -173,7 +173,7 @@ function $RouteProvider() {
|
|||
|
||||
// create redirection for trailing slashes
|
||||
if (path) {
|
||||
var redirectPath = (path[path.length - 1] === '/')
|
||||
var redirectPath = (path[path.length - 1] == '/')
|
||||
? path.substr(0, path.length - 1)
|
||||
: path + '/';
|
||||
|
||||
|
|
@ -604,38 +604,10 @@ function $RouteProvider() {
|
|||
}
|
||||
|
||||
$q.when(nextRoute).
|
||||
then(function() {
|
||||
if (nextRoute) {
|
||||
var locals = angular.extend({}, nextRoute.resolve),
|
||||
template, templateUrl;
|
||||
|
||||
angular.forEach(locals, function(value, key) {
|
||||
locals[key] = angular.isString(value) ?
|
||||
$injector.get(value) : $injector.invoke(value, null, null, key);
|
||||
});
|
||||
|
||||
if (angular.isDefined(template = nextRoute.template)) {
|
||||
if (angular.isFunction(template)) {
|
||||
template = template(nextRoute.params);
|
||||
}
|
||||
} else if (angular.isDefined(templateUrl = nextRoute.templateUrl)) {
|
||||
if (angular.isFunction(templateUrl)) {
|
||||
templateUrl = templateUrl(nextRoute.params);
|
||||
}
|
||||
if (angular.isDefined(templateUrl)) {
|
||||
nextRoute.loadedTemplateUrl = $sce.valueOf(templateUrl);
|
||||
template = $templateRequest(templateUrl);
|
||||
}
|
||||
}
|
||||
if (angular.isDefined(template)) {
|
||||
locals['$template'] = template;
|
||||
}
|
||||
return $q.all(locals);
|
||||
}
|
||||
}).
|
||||
then(resolveLocals).
|
||||
then(function(locals) {
|
||||
// after route change
|
||||
if (nextRoute === $route.current) {
|
||||
if (nextRoute == $route.current) {
|
||||
if (nextRoute) {
|
||||
nextRoute.locals = locals;
|
||||
angular.copy(nextRoute.params, $routeParams);
|
||||
|
|
@ -643,13 +615,48 @@ function $RouteProvider() {
|
|||
$rootScope.$broadcast('$routeChangeSuccess', nextRoute, lastRoute);
|
||||
}
|
||||
}, function(error) {
|
||||
if (nextRoute === $route.current) {
|
||||
if (nextRoute == $route.current) {
|
||||
$rootScope.$broadcast('$routeChangeError', nextRoute, lastRoute, error);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function resolveLocals(route) {
|
||||
if (route) {
|
||||
var locals = angular.extend({}, route.resolve);
|
||||
angular.forEach(locals, function(value, key) {
|
||||
locals[key] = angular.isString(value) ?
|
||||
$injector.get(value) :
|
||||
$injector.invoke(value, null, null, key);
|
||||
});
|
||||
var template = getTemplateFor(route);
|
||||
if (angular.isDefined(template)) {
|
||||
locals['$template'] = template;
|
||||
}
|
||||
return $q.all(locals);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getTemplateFor(route) {
|
||||
var template, templateUrl;
|
||||
if (angular.isDefined(template = route.template)) {
|
||||
if (angular.isFunction(template)) {
|
||||
template = template(route.params);
|
||||
}
|
||||
} else if (angular.isDefined(templateUrl = route.templateUrl)) {
|
||||
if (angular.isFunction(templateUrl)) {
|
||||
templateUrl = templateUrl(route.params);
|
||||
}
|
||||
if (angular.isDefined(templateUrl)) {
|
||||
route.loadedTemplateUrl = $sce.valueOf(templateUrl);
|
||||
template = $templateRequest(templateUrl);
|
||||
}
|
||||
}
|
||||
return template;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @returns {Object} the current active route, by matching it against the URL
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
/*
|
||||
AngularJS v1.5.6-build.4801+sha.3b5751d
|
||||
AngularJS v1.5.6
|
||||
(c) 2010-2016 Google, Inc. http://angularjs.org
|
||||
License: MIT
|
||||
*/
|
||||
(function(C,d){'use strict';function z(r,h,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,c,b,f,y){function k(){n&&(g.cancel(n),n=null);l&&(l.$destroy(),l=null);m&&(n=g.leave(m),n.then(function(){n=null}),m=null)}function x(){var b=r.current&&r.current.locals;if(d.isDefined(b&&b.$template)){var b=a.$new(),f=r.current;m=y(b,function(b){g.enter(b,null,m||c).then(function(){!d.isDefined(t)||t&&!a.$eval(t)||h()});k()});l=f.scope=b;l.$emit("$viewContentLoaded");
|
||||
l.$eval(u)}else k()}var l,m,n,t=b.autoscroll,u=b.onload||"";a.$on("$routeChangeSuccess",x);x()}}}function A(d,h,g){return{restrict:"ECA",priority:-400,link:function(a,c){var b=g.current,f=b.locals;c.html(f.$template);var y=d(c.contents());if(b.controller){f.$scope=a;var k=h(b.controller,f);b.controllerAs&&(a[b.controllerAs]=k);c.data("$ngControllerController",k);c.children().data("$ngControllerController",k)}a[b.resolveAs||"$resolve"]=f;y(a)}}}var w=d.module("ngRoute",["ng"]).provider("$route",function(){function r(a,
|
||||
c){return d.extend(Object.create(a),c)}function h(a,d){var b=d.caseInsensitiveMatch,f={originalPath:a,regexp:a},g=f.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[\?\*])?/g,function(a,d,b,c){a="?"===c||"*?"===c?"?":null;c="*"===c||"*?"===c?"*":null;g.push({name:b,optional:!!a});d=d||"";return""+(a?"":d)+"(?:"+(a?d:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");f.regexp=new RegExp("^"+a+"$",b?"i":"");return f}var g={};this.when=function(a,c){var b=
|
||||
d.copy(c);d.isUndefined(b.reloadOnSearch)&&(b.reloadOnSearch=!0);d.isUndefined(b.caseInsensitiveMatch)&&(b.caseInsensitiveMatch=this.caseInsensitiveMatch);g[a]=d.extend(b,a&&h(a,b));if(a){var f="/"===a[a.length-1]?a.substr(0,a.length-1):a+"/";g[f]=d.extend({redirectTo:a},h(f,b))}return this};this.caseInsensitiveMatch=!1;this.otherwise=function(a){"string"===typeof a&&(a={redirectTo:a});this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest",
|
||||
"$sce",function(a,c,b,f,h,k,x){function l(b){var e=s.current;(w=(p=n())&&e&&p.$$route===e.$$route&&d.equals(p.pathParams,e.pathParams)&&!p.reloadOnSearch&&!u)||!e&&!p||a.$broadcast("$routeChangeStart",p,e).defaultPrevented&&b&&b.preventDefault()}function m(){var v=s.current,e=p;if(w)v.params=e.params,d.copy(v.params,b),a.$broadcast("$routeUpdate",v);else if(e||v)u=!1,(s.current=e)&&e.redirectTo&&(d.isString(e.redirectTo)?c.path(t(e.redirectTo,e.params)).search(e.params).replace():c.url(e.redirectTo(e.pathParams,
|
||||
c.path(),c.search())).replace()),f.when(e).then(function(){if(e){var a=d.extend({},e.resolve),b,c;d.forEach(a,function(b,e){a[e]=d.isString(b)?h.get(b):h.invoke(b,null,null,e)});d.isDefined(b=e.template)?d.isFunction(b)&&(b=b(e.params)):d.isDefined(c=e.templateUrl)&&(d.isFunction(c)&&(c=c(e.params)),d.isDefined(c)&&(e.loadedTemplateUrl=x.valueOf(c),b=k(c)));d.isDefined(b)&&(a.$template=b);return f.all(a)}}).then(function(c){e===s.current&&(e&&(e.locals=c,d.copy(e.params,b)),a.$broadcast("$routeChangeSuccess",
|
||||
e,v))},function(b){e===s.current&&a.$broadcast("$routeChangeError",e,v,b)})}function n(){var a,b;d.forEach(g,function(f,g){var q;if(q=!b){var h=c.path();q=f.keys;var l={};if(f.regexp)if(h=f.regexp.exec(h)){for(var k=1,n=h.length;k<n;++k){var m=q[k-1],p=h[k];m&&p&&(l[m.name]=p)}q=l}else q=null;else q=null;q=a=q}q&&(b=r(f,{params:d.extend({},c.search(),a),pathParams:a}),b.$$route=f)});return b||g[null]&&r(g[null],{params:{},pathParams:{}})}function t(a,b){var c=[];d.forEach((a||"").split(":"),function(a,
|
||||
d){if(0===d)c.push(a);else{var f=a.match(/(\w+)(?:[?*])?(.*)/),g=f[1];c.push(b[g]);c.push(f[2]||"");delete b[g]}});return c.join("")}var u=!1,p,w,s={routes:g,reload:function(){u=!0;var b={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0;u=!1}};a.$evalAsync(function(){l(b);b.defaultPrevented||m()})},updateParams:function(a){if(this.current&&this.current.$$route)a=d.extend({},this.current.params,a),c.path(t(this.current.$$route.originalPath,a)),c.search(a);else throw B("norout");
|
||||
}};a.$on("$locationChangeStart",l);a.$on("$locationChangeSuccess",m);return s}]}),B=d.$$minErr("ngRoute");w.provider("$routeParams",function(){this.$get=function(){return{}}});w.directive("ngView",z);w.directive("ngView",A);z.$inject=["$route","$anchorScroll","$animate"];A.$inject=["$compile","$controller","$route"]})(window,window.angular);
|
||||
(function(C,d){'use strict';function w(s,h,f){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,e,b,g,y){function k(){n&&(f.cancel(n),n=null);l&&(l.$destroy(),l=null);m&&(n=f.leave(m),n.then(function(){n=null}),m=null)}function z(){var b=s.current&&s.current.locals;if(d.isDefined(b&&b.$template)){var b=a.$new(),g=s.current;m=y(b,function(b){f.enter(b,null,m||e).then(function(){!d.isDefined(u)||u&&!a.$eval(u)||h()});k()});l=g.scope=b;l.$emit("$viewContentLoaded");
|
||||
l.$eval(r)}else k()}var l,m,n,u=b.autoscroll,r=b.onload||"";a.$on("$routeChangeSuccess",z);z()}}}function v(d,h,f){return{restrict:"ECA",priority:-400,link:function(a,e){var b=f.current,g=b.locals;e.html(g.$template);var y=d(e.contents());if(b.controller){g.$scope=a;var k=h(b.controller,g);b.controllerAs&&(a[b.controllerAs]=k);e.data("$ngControllerController",k);e.children().data("$ngControllerController",k)}a[b.resolveAs||"$resolve"]=g;y(a)}}}var r=d.module("ngRoute",["ng"]).provider("$route",function(){function s(a,
|
||||
e){return d.extend(Object.create(a),e)}function h(a,d){var b=d.caseInsensitiveMatch,g={originalPath:a,regexp:a},f=g.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[\?\*])?/g,function(a,d,b,e){a="?"===e||"*?"===e?"?":null;e="*"===e||"*?"===e?"*":null;f.push({name:b,optional:!!a});d=d||"";return""+(a?"":d)+"(?:"+(a?d:"")+(e&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");g.regexp=new RegExp("^"+a+"$",b?"i":"");return g}var f={};this.when=function(a,e){var b=
|
||||
d.copy(e);d.isUndefined(b.reloadOnSearch)&&(b.reloadOnSearch=!0);d.isUndefined(b.caseInsensitiveMatch)&&(b.caseInsensitiveMatch=this.caseInsensitiveMatch);f[a]=d.extend(b,a&&h(a,b));if(a){var g="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";f[g]=d.extend({redirectTo:a},h(g,b))}return this};this.caseInsensitiveMatch=!1;this.otherwise=function(a){"string"===typeof a&&(a={redirectTo:a});this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest",
|
||||
"$sce",function(a,e,b,g,h,k,r){function l(q){var c=t.current;(A=(p=w())&&c&&p.$$route===c.$$route&&d.equals(p.pathParams,c.pathParams)&&!p.reloadOnSearch&&!x)||!c&&!p||a.$broadcast("$routeChangeStart",p,c).defaultPrevented&&q&&q.preventDefault()}function m(){var q=t.current,c=p;if(A)q.params=c.params,d.copy(q.params,b),a.$broadcast("$routeUpdate",q);else if(c||q)x=!1,(t.current=c)&&c.redirectTo&&(d.isString(c.redirectTo)?e.path(v(c.redirectTo,c.params)).search(c.params).replace():e.url(c.redirectTo(c.pathParams,
|
||||
e.path(),e.search())).replace()),g.when(c).then(n).then(function(e){c==t.current&&(c&&(c.locals=e,d.copy(c.params,b)),a.$broadcast("$routeChangeSuccess",c,q))},function(d){c==t.current&&a.$broadcast("$routeChangeError",c,q,d)})}function n(a){if(a){var c=d.extend({},a.resolve);d.forEach(c,function(a,b){c[b]=d.isString(a)?h.get(a):h.invoke(a,null,null,b)});a=u(a);d.isDefined(a)&&(c.$template=a);return g.all(c)}}function u(a){var c,b;d.isDefined(c=a.template)?d.isFunction(c)&&(c=c(a.params)):d.isDefined(b=
|
||||
a.templateUrl)&&(d.isFunction(b)&&(b=b(a.params)),d.isDefined(b)&&(a.loadedTemplateUrl=r.valueOf(b),c=k(b)));return c}function w(){var a,c;d.forEach(f,function(b,g){var f;if(f=!c){var h=e.path();f=b.keys;var l={};if(b.regexp)if(h=b.regexp.exec(h)){for(var k=1,n=h.length;k<n;++k){var m=f[k-1],p=h[k];m&&p&&(l[m.name]=p)}f=l}else f=null;else f=null;f=a=f}f&&(c=s(b,{params:d.extend({},e.search(),a),pathParams:a}),c.$$route=b)});return c||f[null]&&s(f[null],{params:{},pathParams:{}})}function v(a,b){var e=
|
||||
[];d.forEach((a||"").split(":"),function(a,d){if(0===d)e.push(a);else{var f=a.match(/(\w+)(?:[?*])?(.*)/),g=f[1];e.push(b[g]);e.push(f[2]||"");delete b[g]}});return e.join("")}var x=!1,p,A,t={routes:f,reload:function(){x=!0;var b={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0;x=!1}};a.$evalAsync(function(){l(b);b.defaultPrevented||m()})},updateParams:function(a){if(this.current&&this.current.$$route)a=d.extend({},this.current.params,a),e.path(v(this.current.$$route.originalPath,
|
||||
a)),e.search(a);else throw B("norout");}};a.$on("$locationChangeStart",l);a.$on("$locationChangeSuccess",m);return t}]}),B=d.$$minErr("ngRoute");r.provider("$routeParams",function(){this.$get=function(){return{}}});r.directive("ngView",w);r.directive("ngView",v);w.$inject=["$route","$anchorScroll","$animate"];v.$inject=["$compile","$controller","$route"]})(window,window.angular);
|
||||
//# sourceMappingURL=angular-route.min.js.map
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue