mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-09 04:11:10 +01:00
f8afc0b75d
git-svn-id: http://svn.automattic.com/wordpress/trunk@6213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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 } );
|
|
} );
|