[ Index ] |
|
Code source de Symfony 1.0.0 |
1 2 function double_list_move(src, dest) 3 { 4 for (var i = 0; i < src.options.length; i++) 5 { 6 if (src.options[i].selected) 7 { 8 dest.options[dest.length] = new Option(src.options[i].text, src.options[i].value); 9 src.options[i] = null; 10 --i; 11 } 12 } 13 } 14 15 function double_list_submit() 16 { 17 var form = $('sf_admin_edit_form'); 18 var element; 19 20 // find multiple selects with name beginning 'associated_' and select all their options 21 for (var i = 0; i < form.elements.length; i++) 22 { 23 element = form.elements[i]; 24 if (element.type == 'select-multiple') 25 { 26 if (element.className == 'sf_admin_multiple-selected') 27 { 28 for (var j = 0; j < element.options.length; j++) 29 { 30 element.options[j].selected = true; 31 } 32 } 33 } 34 } 35 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |