8000 2.0.2 · angular-ui/bootstrap-bower@2a45084 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 2a45084

Browse files
committed
2.0.2
1 parent 80db247 commit 2a45084

File tree

4 files changed

+24
-21
lines changed

4 files changed

+24
-21
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"license": "MIT",
1212
"ignore": [],
1313
"description": "Native AngularJS (Angular) directives for Bootstrap.",
14-
"version": "2.0.1",
14+
"version": "2.0.2",
1515
"main": ["./ui-bootstrap-tpls.js"],
1616
"dependencies": {
1717
"angular": ">=1.4.0"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-ui-bootstrap",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "Bootstrap widgets for Angular",
55
"main": "index.js",
66
"homepage": "http://angular-ui.github.io/bootstrap/",

ui-bootstrap-tpls.js

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* angular-ui-bootstrap
33
* http://angular-ui.github.io/bootstrap/
44
5-
* Version: 2.0.1 - 2016-08-02
5+
* Version: 2.0.2 - 2016-08-15
66
* License: MIT
77
*/angular.module("ui.bootstrap", ["ui.bootstrap.tpls", "ui.bootstrap.collapse","ui.bootstrap.tabindex","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"]);
88
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/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"]);
@@ -2727,7 +2727,11 @@ function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $
27272727

27282728
this.init = function(_ngModel_) {
27292729
ngModel = _ngModel_;
2730-
ngModelOptions = _ngModel_.$options;
2730+
ngModelOptions = angular.isObject(_ngModel_.$options) ?
2731+
_ngModel_.$options :
2732+
{
2733+
timezone: null
2734+
};
27312735
closeOnDateSelection = angular.isDefined($attrs.closeOnDateSelection) ?
27322736
$scope.$parent.$eval($attrs.closeOnDateSelection) :
27332737
datepickerPopupConfig.closeOnDateSelection;
@@ -2818,13 +2822,13 @@ function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $
28182822
value = new Date(value);
28192823
}
28202824

2821-
$scope.date = value;
2825+
$scope.date = dateParser.fromTimezone(value, ngModelOptions.timezone);
28222826

28232827
return dateParser.filter($scope.date, dateFormat);
28242828
});
28252829
} else {
28262830
ngModel.$formatters.push(function(value) {
2827-
$scope.date = value;
2831+
$scope.date = dateParser.fromTimezone(value, ngModelOptions.timezone);
28282832
return value;
28292833
});
28302834
}
@@ -2876,7 +2880,7 @@ function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $
28762880

28772881
$scope.isDisabled = function(date) {
28782882
if (date === 'today') {
2879-
date = new Date();
2883+
date = dateParser.fromTimezone(new Date(), ngModelOptions.timezone);
28802884
}
28812885

28822886
var dates = {};
@@ -3023,7 +3027,7 @@ function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $
30233027
if (angular.isString(viewValue)) {
30243028
var date = parseDateString(viewValue);
30253029
if (!isNaN(date)) {
3026-
return date;
3030+
return dateParser.fromTimezone(date, ngModelOptions.timezone);
< 6D40 /code>
30273031
}
30283032
}
30293033

@@ -3185,10 +3189,7 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
31853189
if (openScope === dropdownScope) {
31863190
openScope = null;
31873191
$document.off('click', closeDropdown);
3188-
var dropdownMenu = dropdownScope.getDropdownElement();
3189-
if (dropdownMenu) {
3190-
dropdownMenu.off('keydown', this.keybindFilter);
3191-
}
3192+
$document.off('keydown', this.keybindFilter);
31923193
}
31933194
};
31943195

@@ -3221,11 +3222,15 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
32213222
};
32223223

32233224
this.keybindFilter = function(evt) {
3225+
var dropdownElement = openScope.getDropdownElement();
3226+
var toggleElement = openScope.getToggleElement();
3227+
var dropdownElementTargeted = dropdownElement && dropdownElement[0].contains(evt.target);
3228+
var toggleElementTargeted = toggleElement && toggleElement[0].contains(evt.target);
32243229
if (evt.which === 27) {
32253230
evt.stopPropagation();
32263231
openScope.focusToggleElement();
32273232
closeDropdown();
3228-
} else if (openScope.isKeynavEnabled() && [38, 40].indexOf(evt.which) !== -1 && openScope.isOpen) {
3233+
} else if (openScope.isKeynavEnabled() && [38, 40].indexOf(evt.which) !== -1 && openScope.isOpen && (dropdownElementTargeted || toggleElementTargeted)) {
32293234
evt.preventDefault();
32303235
evt.stopPropagation();
32313236
openScope.focusDropdownEntry(evt.which);
@@ -3417,13 +3422,11 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
34173422
var newEl = dropdownElement;
34183423
self.dropdownMenu.replaceWith(newEl);
34193424
self.dropdownMenu = newEl;
3420-
self.dropdownMenu.on('keydown', uibDropdownService.keybindFilter);
3425+
$document.on('keydown', uibDropdownService.keybindFilter);
34213426
});
34223427
});
34233428
} else {
3424-
if (self.dropdownMenu) {
3425-
self.dropdownMenu.on('keydown', uibDropdownService.keybindFilter);
3426-
}
3429+
$document.on('keydown', uibDropdownService.keybindFilter);
34273430
}
34283431

34293432
scope.focusToggleElement();
@@ -6433,7 +6436,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
64336436
* Extracted to a separate service for ease of unit testing
64346437
*/
64356438
.factory('uibTypeaheadParser', ['$parse', function($parse) {
6436-
// 00000111000000000000022200000000000000003333333333333330000000000044000
6439+
// 000001111111100000000000002222222200000000000000003333333333333330000000000044444444000
64376440
var TYPEAHEAD_REGEXP = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;
64386441
return {
64396442
parse: function(input) {

ui-bootstrap-tpls.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0