amitech / dropdown-check-list

Automatically exported from code.google.com/p/dropdown-check-list
0 stars 0 forks source link

Selected Items #200

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
** What steps will reproduce the problem?
<select multiple name="meses">                              <option 
value="1">Enero</option>                                <option selected="selected" 
value="2">Febrero</option>                              <option selected="selected" 
value="3">Marzo</option>                                <option value="4">Abril</option>                                <option 
value="5">Mayo</option>                             <option value="6">Junio</option>                                <option 
value="7">Julio</option>                                <option 
value="8">Agosto</option>                               <option 
value="9">Septiembre</option>                               <option 
value="10">Octubre</option>                             <option 
value="11">Noviembre</option>                           <option 
value="12">Diciembre</option>                           </select>

$('[name="meses"').dropdownchecklist({
                    icon:{},
                    textFormatFunction: function(options) {
                        var selectedOptions = options.filter(":selected");
                        var countOfSelected = selectedOptions.size();
                        var size = options.size();
                        switch(countOfSelected) {
                           case 0: return "<i>Ninguno<i>";
                           case 1: return selectedOptions.text();
                           case options.size(): return "<b>Todos</b>";
                           default: return countOfSelected + " Meses";
                        }
                   }
                });

** What is the expected output? What do you see instead?

Select All items are selected in the select original but just check the firs is 
selected (selected="selected")

** What is your environment?
-- DropDownCheckList version:1.4
-- jQuery version:1.6.1
-- jQuery UI version:1.8.13
-- Browser and version: Chrome 12

** Please provide any additional information below/Please attach sample
html

Original issue reported on code.google.com by mmedin...@gmail.com on 27 Jul 2011 at 9:14

GoogleCodeExporter commented 8 years ago
See issue 176 for a discussion of this problem in Chrome 12 and a posted fix

Original comment by womohun...@ittrium.com on 28 Jul 2011 at 2:33