Skip to content

Commit 03d320a

Browse files
committed
1.3.2
1 parent 6aea139 commit 03d320a

6 files changed

+68
-66
lines changed

bower.json

+1-1
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": "1.3.1",
14+
"version": "1.3.2",
1515
"main": ["./ui-bootstrap-tpls.js"],
1616
"dependencies": {
1717
"angular": ">=1.4.0"

package.json

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

ui-bootstrap-tpls.js

+30-29
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: 1.3.1 - 2016-04-05
5+
* Version: 1.3.2 - 2016-04-14
66
* License: MIT
77
*/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"]);
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/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"]);
@@ -1218,7 +1218,7 @@ function ($animate) {
12181218

12191219
return {
12201220
restrict: 'A',
1221-
compile: function (tElement, tAttrs) {
1221+
compile: function(tElement, tAttrs) {
12221222
var linkedScopes = [];
12231223
var instances = [];
12241224
var expToData = {};
@@ -1237,7 +1237,7 @@ function ($animate) {
12371237
element: element
12381238
});
12391239

1240-
exps.forEach(function (exp, k) {
1240+
exps.forEach(function(exp, k) {
12411241
addForExp(exp, scope);
12421242
});
12431243

@@ -1250,9 +1250,9 @@ function ($animate) {
12501250
var compareWithExp = matches[2];
12511251
var data = expToData[exp];
12521252
if (!data) {
1253-
var watchFn = function (compareWithVal) {
1253+
var watchFn = function(compareWithVal) {
12541254
var newActivated = null;
1255-
instances.some(function (instance) {
1255+
instances.some(function(instance) {
12561256
var thisVal = instance.scope.$eval(onExp);
12571257
if (thisVal === compareWithVal) {
12581258
newActivated = instance;
@@ -1287,14 +1287,13 @@ function ($animate) {
12871287
instances.splice(index, 1);
12881288
if (linkedScopes.length) {
12891289
var newWatchScope = linkedScopes[0];
1290-
angular.forEach(expToData, function (data) {
1290+
angular.forEach(expToData, function(data) {
12911291
if (data.scope === removedScope) {
12921292
data.watcher = newWatchScope.$watch(data.compareWithExp, data.watchFn);
12931293
data.scope = newWatchScope;
12941294
}
12951295
});
1296-
}
1297-
else {
1296+
} else {
12981297
expToData = {};
12991298
}
13001299
}
@@ -1571,6 +1570,8 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
15711570

15721571
$scope.$emit('uib:datepicker.mode');
15731572
}
1573+
1574+
$scope.$broadcast('uib:datepicker.focus');
15741575
};
15751576

15761577
$scope.move = function(direction) {
@@ -1628,7 +1629,7 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
16281629
}
16291630
};
16301631

1631-
$scope.$on("$destroy", function() {
1632+
$scope.$on('$destroy', function() {
16321633
//Clear all watch listeners on destroy
16331634
while (watchListeners.length) {
16341635
watchListeners.shift()();
@@ -2743,7 +2744,7 @@ function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $
27432744

27442745
var dates = {};
27452746
angular.forEach(['minDate', 'maxDate'], function(key) {
2746-
if ($scope.datepickerOptions[key] === null) {
2747+
if (!$scope.datepickerOptions[key]) {
27472748
dates[key] = null;
27482749
} else if (angular.isDate($scope.datepickerOptions[key])) {
27492750
dates[key] = dateParser.fromTimezone(new Date($scope.datepickerOptions[key]), timezone);
@@ -3033,10 +3034,10 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
30333034
.service('uibDropdownService', ['$document', '$rootScope', function($document, $rootScope) {
30343035
var openScope = null;
30353036

3036-
this.open = function(dropdownScope) {
3037+
this.open = function(dropdownScope, element) {
30373038
if (!openScope) {
30383039
$document.on('click', closeDropdown);
3039-
$document.on('keydown', keybindFilter);
3040+
element.on('keydown', keybindFilter);
30403041
}
30413042

30423043
if (openScope && openScope !== dropdownScope) {
@@ -3046,11 +3047,11 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
30463047
openScope = dropdownScope;
30473048
};
30483049

3049-
this.close = function(dropdownScope) {
3050+
this.close = function(dropdownScope, element) {
30503051
if (openScope === dropdownScope) {
30513052
openScope = null;
30523053
$document.off('click', closeDropdown);
3053-
$document.off('keydown', keybindFilter);
3054+
element.off('keydown', keybindFilter);
30543055
}
30553056
};
30563057

@@ -3083,6 +3084,7 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
30833084

30843085
var keybindFilter = function(evt) {
30853086
if (evt.which === 27) {
3087+
evt.stopPropagation();
30863088
openScope.focusToggleElement();
30873089
closeDropdown();
30883090
} else if (openScope.isKeynavEnabled() && [38, 40].indexOf(evt.which) !== -1 && openScope.isOpen) {
@@ -3274,7 +3276,7 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
32743276
}
32753277

32763278
scope.focusToggleElement();
3277-
uibDropdownService.open(scope);
3279+
uibDropdownService.open(scope, $element);
32783280
} else {
32793281
if (self.dropdownMenuTemplateUrl) {
32803282
if (templateScope) {
@@ -3285,7 +3287,7 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
32853287
self.dropdownMenu = newEl;
32863288
}
32873289

3288-
uibDropdownService.close(scope);
3290+
uibDropdownService.close(scope, $element);
32893291
self.selectedOption = null;
32903292
}
32913293

@@ -3729,8 +3731,9 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap', 'ui.bootstrap.p
37293731
removeAfterAnimate(modalWindow.modalDomEl, modalWindow.modalScope, function() {
37303732
var modalBodyClass = modalWindow.openedClass || OPENED_MODAL_CLASS;
37313733
openedClasses.remove(modalBodyClass, modalInstance);
3732-
appendToElement.toggleClass(modalBodyClass, openedClasses.hasKey(modalBodyClass));
3733-
if (scrollbarPadding && scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) {
3734+
var areAnyOpen = openedClasses.hasKey(modalBodyClass);
3735+
appendToElement.toggleClass(modalBodyClass, areAnyOpen);
3736+
if (!areAnyOpen && scrollbarPadding && scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) {
37343737
if (scrollbarPadding.originalRight) {
37353738
appendToElement.css({paddingRight: scrollbarPadding.originalRight + 'px'});
37363739
} else {
@@ -3864,7 +3867,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap', 'ui.bootstrap.p
38643867
modalBodyClass = modal.openedClass || OPENED_MODAL_CLASS;
38653868

38663869
toggleTopWindowClass(false);
3867-
3870+
38683871
// Store the current top first, to determine what index we ought to use
38693872
// for the current top modal
38703873
previousTopOpenedModal = openedWindows.top();
@@ -3902,6 +3905,10 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap', 'ui.bootstrap.p
39023905
}
39033906
$compile(backdropDomEl)(backdropScope);
39043907
$animate.enter(backdropDomEl, appendToElement);
3908+
scrollbarPadding = $uibPosition.scrollbarPadding(appendToElement);
3909+
if (scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) {
3910+
appendToElement.css({paddingRight: scrollbarPadding.right + 'px'});
3911+
}
39053912
}
39063913

39073914
// Set the top modal index based on the index of the previous top modal
@@ -3919,10 +3926,6 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap', 'ui.bootstrap.p
39193926
angularDomEl.attr('modal-animation', 'true');
39203927
}
39213928

3922-
scrollbarPadding = $uibPosition.scrollbarPadding(appendToElement);
3923-
if (scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) {
3924-
appendToElement.css({paddingRight: scrollbarPadding.right + 'px'});
3925-
}
39263929
appendToElement.addClass(modalBodyClass);
39273930
$animate.enter($compile(angularDomEl)(modal.scope), appendToElement);
39283931

@@ -4921,8 +4924,6 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.s
49214924
observers.push(
49224925
attrs.$observe(prefix + 'Placement', function(val) {
49234926
ttScope.placement = val ? val : options.placement;
4924-
var placement = $position.parsePlacement(ttScope.placement);
4925-
lastPlacement = placement[1] ? placement[0] + '-' + placement[1] : placement[0];
49264927
if (ttScope.isOpen) {
49274928
positionTooltip();
49284929
}
@@ -6679,7 +6680,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap
66796680
});
66806681
}
66816682
if (!isEditable && modelCtrl.$error.editable) {
6682-
modelCtrl.$viewValue = '';
6683+
modelCtrl.$setViewValue();
66836684
// Reset validity as we are clearing
66846685
modelCtrl.$setValidity('editable', true);
66856686
modelCtrl.$setValidity('parse', true);
@@ -7276,15 +7277,15 @@ angular.module("uib/template/timepicker/timepicker.html", []).run(["$templateCac
72767277
" </tr>\n" +
72777278
" <tr>\n" +
72787279
" <td class=\"form-group uib-time hours\" ng-class=\"{'has-error': invalidHours}\">\n" +
7279-
" <input style=\"width:50px;\" type=\"text\" placeholder=\"HH\" ng-model=\"hours\" ng-change=\"updateHours()\" class=\"form-control text-center\" ng-readonly=\"::readonlyInput\" maxlength=\"2\" tabindex=\"{{::tabindex}}\" ng-disabled=\"noIncrementHours()\" ng-blur=\"blur()\">\n" +
7280+
" <input type=\"text\" placeholder=\"HH\" ng-model=\"hours\" ng-change=\"updateHours()\" class=\"form-control text-center\" ng-readonly=\"::readonlyInput\" maxlength=\"2\" tabindex=\"{{::tabindex}}\" ng-disabled=\"noIncrementHours()\" ng-blur=\"blur()\">\n" +
72807281
" </td>\n" +
72817282
" <td class=\"uib-separator\">:</td>\n" +
72827283
" <td class=\"form-group uib-time minutes\" ng-class=\"{'has-error': invalidMinutes}\">\n" +
7283-
" <input style=\"width:50px;\" type=\"text\" placeholder=\"MM\" ng-model=\"minutes\" ng-change=\"updateMinutes()\" class=\"form-control text-center\" ng-readonly=\"::readonlyInput\" maxlength=\"2\" tabindex=\"{{::tabindex}}\" ng-disabled=\"noIncrementMinutes()\" ng-blur=\"blur()\">\n" +
7284+
" <input type=\"text\" placeholder=\"MM\" ng-model=\"minutes\" ng-change=\"updateMinutes()\" class=\"form-control text-center\" ng-readonly=\"::readonlyInput\" maxlength=\"2\" tabindex=\"{{::tabindex}}\" ng-disabled=\"noIncrementMinutes()\" ng-blur=\"blur()\">\n" +
72847285
" </td>\n" +
72857286
" <td ng-show=\"showSeconds\" class=\"uib-separator\">:</td>\n" +
72867287
" <td class=\"form-group uib-time seconds\" ng-class=\"{'has-error': invalidSeconds}\" ng-show=\"showSeconds\">\n" +
7287-
" <input style=\"width:50px;\" type=\"text\" placeholder=\"SS\" ng-model=\"seconds\" ng-change=\"updateSeconds()\" class=\"form-control text-center\" ng-readonly=\"readonlyInput\" maxlength=\"2\" tabindex=\"{{::tabindex}}\" ng-disabled=\"noIncrementSeconds()\" ng-blur=\"blur()\">\n" +
7288+
" <input type=\"text\" placeholder=\"SS\" ng-model=\"seconds\" ng-change=\"updateSeconds()\" class=\"form-control text-center\" ng-readonly=\"readonlyInput\" maxlength=\"2\" tabindex=\"{{::tabindex}}\" ng-disabled=\"noIncrementSeconds()\" ng-blur=\"blur()\">\n" +
72887289
" </td>\n" +
72897290
" <td ng-show=\"showMeridian\" class=\"uib-time am-pm\"><button type=\"button\" ng-class=\"{disabled: noToggleMeridian()}\" class=\"btn btn-default text-center\" ng-click=\"toggleMeridian()\" ng-disabled=\"noToggleMeridian()\" tabindex=\"{{::tabindex}}\">{{meridian}}</button></td>\n" +
72907291
" </tr>\n" +

ui-bootstrap-tpls.min.js

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)