![]() |
|
Snippets |
|
These two js functions do the job while using jQuery with admin double list
function double_list_move(src, dest) { var L = $(src).children(); $(L).each(function(i){ if(L[i].selected){ $(dest).append('<option value="'+$(L[i]).val()+'">'+ $(L[i]).text()+'</option>'); $(L[i]).remove(); } }); } function double_list_submit() { var sel = $("form").find("select.sf_admin_multiple-selected"); var C = $(sel).children(); $(C).each( function(i){ if(!C[i].selected) C[i].selected=true; } ); }
Enjoy it.