Skip to content

Commit 11687c4

Browse files
committed
Dist files for release 0.7.1
1 parent 80b7c19 commit 11687c4

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

dist/bootstrap-tagsinput.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
tagClass: function(item) {
66
return 'label label-info';
77
},
8+
focusClass: 'focus',
89
itemValue: function(item) {
910
return item ? item.toString() : item;
1011
},
@@ -156,8 +157,10 @@
156157
self.pushVal();
157158

158159
// Add class when reached maxTags
159-
if (self.options.maxTags === self.itemsArray.length || self.items().toString().length === self.options.maxInputLength)
160+
if (self.options.maxTags === self.itemsArray.length || self.items().toString().length === self.options.maxInputLength) {
160161
self.$container.addClass('bootstrap-tagsinput-max');
162+
self.$element.trigger($.Event('maxItemsReached', { item: item, options: options }));
163+
}
161164

162165
// If using typeahead, once the tag has been added, clear the typeahead value so it does not stick around in the input.
163166
if ($('.typeahead, .twitter-typeahead', self.$container).length) {
@@ -379,6 +382,15 @@
379382
}, self));
380383
}
381384

385+
// Toggle the 'focus' css class on the container when it has focus
386+
self.$container.on({
387+
focusin: function() {
388+
self.$container.addClass(self.options.focusClass);
389+
},
390+
focusout: function() {
391+
self.$container.removeClass(self.options.focusClass);
392+
},
393+
});
382394

383395
self.$container.on('keydown', 'input', $.proxy(function(event) {
384396
var $input = $(event.target),

dist/bootstrap-tagsinput.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)