Skip to content

Commit ead2d1f

Browse files
committed
ver(release): bump to 0.6.3
1 parent b444e7c commit ead2d1f

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"author": "Olivier Louvignes",
33
"name": "angular-strap",
44
"description": "AngularStrap - Twitter Bootstrap directives for AngularJS",
5-
"version": "0.6.2",
5+
"version": "0.6.3",
66
"homepage": "http://mgcrea.github.com/angular-strap",
77
"repository": {
88
"type": "git",

dist/angular-strap.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* AngularStrap - Twitter Bootstrap directives for AngularJS
3-
* @version v0.6.2 - 2013-01-17
3+
* @version v0.6.3 - 2013-01-25
44
* @link http://mgcrea.github.com/angular-strap
55
* @author Olivier Louvignes
66
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -203,7 +203,7 @@ angular.module('$strap.directives')
203203

204204
iElement.on('click.button.data-api', function (ev) {
205205
scope.$apply(function () {
206-
controller.$setViewValue($(ev.target).attr('value'));
206+
controller.$setViewValue($(ev.target).closest('button').attr('value'));
207207
});
208208
});
209209

@@ -429,7 +429,6 @@ angular.module('$strap.directives')
429429

430430
}]);
431431

432-
433432
angular.module('$strap.directives')
434433

435434
.directive('bsModal', ['$parse', '$compile', '$http', '$timeout', '$q', '$templateCache', function($parse, $compile, $http, $timeout, $q, $templateCache) {
@@ -453,7 +452,7 @@ angular.module('$strap.directives')
453452

454453
// Build modal object
455454
var id = getter(scope).replace('.html', '').replace(/\//g, '-').replace(/\./g, '-') + '-' + scope.$id;
456-
var $modal = $('<div></div>').attr('id', id).attr('tabindex', -1).addClass('modal hide fade').html(template);
455+
var $modal = $('<div></div>').attr('id', id).attr('tabindex', -1).attr('data-backdrop', element.attr('data-backdrop') || true).attr('data-keyboard', element.attr('data-keyboard') || true).addClass('modal hide fade').html(template);
457456
$('body').append($modal);
458457

459458
// Configure element
@@ -797,7 +796,6 @@ angular.module('$strap.directives')
797796

798797
}]);
799798

800-
801799
angular.module('$strap.directives')
802800

803801
.directive('bsTypeahead', ['$parse', function($parse) {
@@ -821,7 +819,7 @@ angular.module('$strap.directives')
821819

822820
element.attr('data-provide', 'typeahead');
823821
element.typeahead({
824-
source: function(query) { return value; },
822+
source: function(query) { return angular.isFunction(value) ? value.apply(null, arguments) : value; },
825823
minLength: attrs.minLength || 1,
826824
items: attrs.items,
827825
updater: function(value) {
@@ -850,8 +848,10 @@ angular.module('$strap.directives')
850848

851849
// Support 0-minLength
852850
if(attrs.minLength === "0") {
853-
setTimeout(function() { // Push to the event loop to make sure element.typeahead is defined
854-
element.on('focus', element.typeahead.bind(element, 'lookup'));
851+
setTimeout(function() { // Push to the event loop to make sure element.typeahead is defined (breaks tests otherwise)
852+
element.on('focus', function() {
853+
setTimeout(element.typeahead.bind(element, 'lookup'), 200);
854+
});
855855
});
856856
}
857857

0 commit comments

Comments
 (0)