2007-10-09 18:49:42 -04:00
|
|
|
jQuery( function($) {
|
|
|
|
var userLists; var list; var addBefore; var addAfter;
|
2006-04-01 19:57:09 -05:00
|
|
|
|
2007-10-09 18:49:42 -04:00
|
|
|
addBefore = function( s ) {
|
|
|
|
if ( $( '#role-' + $('#role').val() ).size() )
|
|
|
|
return s;
|
|
|
|
return false;
|
|
|
|
};
|
|
|
|
|
|
|
|
addAfter = function( r, s ) {
|
|
|
|
var roleTable = $( '#role-' + $('role', r).text() );
|
|
|
|
|
|
|
|
var e = $('#user-' + $('user', r).attr('id') );
|
|
|
|
if ( !roleTable.size() ) { return; }
|
|
|
|
if ( !e.size() ) { return; }
|
|
|
|
|
|
|
|
roleTable[0].wpList.add(e.remove().clone());
|
|
|
|
};
|
|
|
|
|
|
|
|
userLists = $('.user-list').wpList();
|
|
|
|
list = $('#user-list').wpList( { addBefore: addBefore, addAfter: addAfter } );
|
|
|
|
} );
|