2007-10-10 00:49:42 +02:00
|
|
|
jQuery( function($) {
|
|
|
|
var userLists; var list; var addBefore; var addAfter;
|
2006-04-02 02:57:09 +02:00
|
|
|
|
2007-10-10 00:49:42 +02: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 } );
|
|
|
|
} );
|