File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 156
156
var isDisabled = this . disabled ;
157
157
var isSelected = this . selected ;
158
158
var labelClasses = [ 'ui-corner-all' ] ;
159
- var liClasses = ( isDisabled ? 'ui-multiselect-disabled ' : ' ' ) + this . className ;
159
+ var liClasses = [ ] ;
160
160
var optLabel ;
161
161
162
+ if ( isDisabled ) {
163
+ liClasses . push ( 'ui-multiselect-disabled' ) ;
164
+ }
165
+
166
+ if ( this . className ) {
167
+ liClasses . push ( this . className ) ;
168
+ }
169
+
162
170
// is this an optgroup?
163
171
if ( parent . tagName === 'OPTGROUP' ) {
164
172
optLabel = parent . getAttribute ( 'label' ) ;
173
+ liClasses . push ( 'ui-multiselect-optgrp-child' ) ;
165
174
166
175
// has this optgroup been added already?
167
176
if ( ! optgroups [ optLabel ] ) {
186
195
labelClasses . push ( 'ui-state-active' ) ;
187
196
}
188
197
189
- html += '<li class="' + liClasses + '">' ;
198
+ html += '<li class="' + liClasses . join ( ' ' ) + '">' ;
190
199
191
200
// create the label
192
201
html += '<label for="' + inputID + '" title="' + title + '" class="' + labelClasses . join ( ' ' ) + '">' ;
327
336
e . preventDefault ( ) ;
328
337
329
338
var $this = $ ( this ) ;
330
- var $inputs = $this . parent ( ) . nextUntil ( 'li .ui-multiselect-optgroup-label ' ) . find ( 'input:visible:not(:disabled)' ) ;
339
+ var $inputs = $this . parent ( ) . nextUntil ( ':not( .ui-multiselect-optgrp-child) ' ) . find ( 'input:visible:not(:disabled)' ) ;
331
340
var nodes = $inputs . get ( ) ;
332
341
var label = $this . parent ( ) . text ( ) ;
333
342
You can’t perform that action at this time.
0 commit comments