Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
davidstutz committed Jul 14, 2014
2 parents d887a6b + bdd8a42 commit a6a7645
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion css/bootstrap-multiselect.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion js/bootstrap-multiselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
$(element).multiselect(config);

if (isObservableArray(listOfSelectedItems)) {
//set the initial selection state on the multi-select list
$(element).multiselect('select', ko.utils.unwrapObservable(listOfSelectedItems));
// Subscribe to the selectedOptions: ko.observableArray
listOfSelectedItems.subscribe(function (changes) {
var addedArray = [], deletedArray = [];
Expand Down Expand Up @@ -262,6 +264,9 @@
this.$button.css({
'width' : this.options.buttonWidth
});
this.$container.css({
'width': this.options.buttonWidth
});
}

// Keep the tab index from the select.
Expand Down Expand Up @@ -894,7 +899,7 @@
var optionDOM = "";
var groupCounter = 0;

$.each(dataprovider, function (option) {
$.each(dataprovider, function (index, option) {
if ($.isArray(option.children)) {
groupCounter++;
optionDOM += '<optgroup label="' + (option.title || 'Group ' + groupCounter) + '">';
Expand Down
14 changes: 14 additions & 0 deletions less/bootstrap-multiselect.less
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,17 @@
border-bottom-left-radius: 4px;
}

.form-inline .multiselect-container{

label.checkbox, label.radio{
padding: 3px 20px 3px 40px;
}

li a label{

&.checkbox input[type="checkbox"], &.radio input[type="radio"]{
margin-left: -20px;
margin-right: 0;
}
}
}

0 comments on commit a6a7645

Please sign in to comment.