Skip to content

Commit

Permalink
Update version. Improve code.
Browse files Browse the repository at this point in the history
  • Loading branch information
vsn4ik committed Jul 20, 2014
1 parent 5c815e5 commit 45e823e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A custom select / multiselect for Bootstrap using button dropdown, designed to b
## Demo and Documentation

See a Bootstrap 2.3.2 example [here](http:https://silviomoreto.github.com/bootstrap-select/). <br/>
See a Bootstrap 3.0.2 example [here](http:https://silviomoreto.github.com/bootstrap-select/3) (work-in-progress).
See a Bootstrap 3.0.3 example [here](http:https://silviomoreto.github.com/bootstrap-select/3) (work-in-progress).

## Authors

Expand Down Expand Up @@ -37,8 +37,8 @@ Checkout the [documentation](http:https://silviomoreto.github.com/bootstrap-select/) f

## CDN

* https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.3.5/bootstrap-select.min.js
* https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.3.5/bootstrap-select.min.css
* https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.min.js
* https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.min.css

## Bugs and feature requests

Expand Down
10 changes: 5 additions & 5 deletions bootstrap-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
var max = this.options.selectedTextFormat.split('>');
var notDisabled = this.options.hideDisabled ? ':not([disabled])' : '';
if ( (max.length>1 && selectedItems.length > max[1]) || (max.length==1 && selectedItems.length>=2)) {
title = this.options.countSelectedText.replace('{0}', selectedItems.length).replace('{1}', this.$element.find('option:not([data-divider="true"]):not([data-hidden="true"])'+notDisabled).length);
title = this.options.countSelectedText.replace('{0}', selectedItems.length).replace('{1}', this.$element.find('option:not([data-divider="true"], [data-hidden="true"])'+notDisabled).length);
}
}

Expand Down Expand Up @@ -357,7 +357,7 @@
$(window).off('resize.getSize').on('resize.getSize', getSize);
$(window).off('scroll.getSize').on('scroll.getSize', getSize);
} else if (this.options.size && this.options.size != 'auto' && menu.find('li'+notDisabled).length > this.options.size) {
var optIndex = menu.find('li'+notDisabled+' > *').filter(':not(.div-contain)').slice(0,this.options.size).last().parent().index();
var optIndex = menu.find('li'+notDisabled+' > *').not('.div-contain').slice(0,this.options.size).last().parent().index();
var divLength = menu.find('li').slice(0,optIndex + 1).find('.div-contain').length;
menuHeight = liHeight*this.options.size + divLength*divHeight + menuPadding;
if (that.options.dropupAuto) {
Expand Down Expand Up @@ -710,14 +710,14 @@
selectAll: function() {
if (this.$lis == null) this.$lis = this.$menu.find('li');
this.$element.find('option:enabled').prop('selected', true);
$(this.$lis).filter(':not(.disabled)').addClass('selected');
$(this.$lis).not('.disabled').addClass('selected');
this.render(false);
},

deselectAll: function() {
if (this.$lis == null) this.$lis = this.$menu.find('li');
this.$element.find('option:enabled').prop('selected', false);
$(this.$lis).filter(':not(.disabled)').removeClass('selected');
$(this.$lis).not('.disabled').removeClass('selected');
this.render(false);
},

Expand Down Expand Up @@ -761,7 +761,7 @@
if (!that.options.container) {
that.setSize();
that.$menu.parent().addClass('open');
isActive = that.$menu.parent().hasClass('open');
isActive = true;
} else {
that.$newElement.trigger('click');
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "bootstrap-select/bootstrap-select",
"name": "bootstrap-select/bootstrap-select",
"description": "A custom <select> for Bootstrap using button dropdown as replacement",
"keywords": ["form", "bootstrap", "select", "replacement"],
"homepage": "https://github.com/silviomoreto/bootstrap-select",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bootstrap-select",
"name": "bootstrap-select",
"title": "bootstrap-select",
"filename": "bootstrap-select.js",
"filename": "bootstrap-select.js",
"description": "A custom <select> for Bootstrap using button dropdown as replacement",
"version": "1.5.4",
"homepage": "http:https://silviomoreto.github.io/bootstrap-select/",
Expand Down

0 comments on commit 45e823e

Please sign in to comment.