490789554f
git-svn-id: https://develop.svn.wordpress.org/trunk@6213 602fd350-edb4-49c9-b593-d223f7449a82
23 lines
575 B
JavaScript
23 lines
575 B
JavaScript
jQuery( function($) {
|
|
var userLists; var list; var addBefore; var addAfter;
|
|
|
|
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 } );
|
|
} );
|