Skip to content

Commit

Permalink
Adding prefix to 'collapse' for Twitter Bootstrap compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
chronon committed Apr 19, 2012
1 parent 86131cd commit 7be4a3e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions css/multi-select.css
Expand Up @@ -32,7 +32,7 @@
width: 170px;
height: 200px;
padding: 1px 0px;

overflow-y: auto;

}
Expand Down Expand Up @@ -62,7 +62,7 @@
color: #999;
}

.ms-container .ms-optgroup-label.collapse{
.ms-container .ms-optgroup-label.ms-collapse{
background-image: url('../img/minus.png');
}

Expand All @@ -75,4 +75,4 @@

.ms-container .ms-selection li:not(.disabled):hover{
background: #eee url('../img/delete.png') no-repeat 3px 3px;
}
}
8 changes: 4 additions & 4 deletions js/application.js
Expand Up @@ -4,12 +4,12 @@
$('.multiselect').multiSelect({});
$('#ms-optgroup .ms-selectable, #ms-outsideCountries .ms-selectable').find('li.ms-elem-selectable').hide();
$('.ms-optgroup-label').click(function(){
if ($(this).hasClass('collapse')){
if ($(this).hasClass('ms-collapse')){
$(this).nextAll('li').hide();
$(this).removeClass('collapse');
$(this).removeClass('ms-collapse');
} else {
$(this).nextAll('li:not(.ms-selected)').show();
$(this).addClass('collapse');
$(this).addClass('ms-collapse');
}
});

Expand Down Expand Up @@ -83,4 +83,4 @@
return false;
});
});
})(jQuery)
})(jQuery)
2 changes: 1 addition & 1 deletion js/jquery.multi-select.js
Expand Up @@ -184,7 +184,7 @@

var parentOptgroup = selectableLi.parent('.ms-optgroup');
if (parentOptgroup.length > 0){
parentOptgroup.children('.ms-optgroup-label').addClass('collapse').show();
parentOptgroup.children('.ms-optgroup-label').addClass('ms-collapse').show();
parentOptgroup.children('.ms-elem-selectable:not(.ms-selected)').show();
}
selectedOption.removeAttr('selected');
Expand Down

0 comments on commit 7be4a3e

Please sign in to comment.