mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-16 15:46:04 +01:00
ccacbf47cd
git-svn-id: http://svn.automattic.com/wordpress/trunk@4583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
22 lines
845 B
JavaScript
22 lines
845 B
JavaScript
addLoadEvent(function() {
|
|
theListEls = document.getElementsByTagName('tbody');
|
|
theUserLists = new Array();
|
|
for ( var l = 0; l < theListEls.length; l++ ) {
|
|
if ( theListEls[l].id )
|
|
theUserLists[theListEls[l].id] = new listMan(theListEls[l].id);
|
|
}
|
|
addUserInputs = document.getElementById('adduser').getElementsByTagName('input');
|
|
for ( var i = 0; i < addUserInputs.length; i++ ) {
|
|
addUserInputs[i].onkeypress = function(e) { return killSubmit('addUserSubmit();', e); }
|
|
}
|
|
document.getElementById('addusersub').onclick = function(e) { return killSubmit('addUserSubmit();', e); }
|
|
}
|
|
);
|
|
|
|
function addUserSubmit() {
|
|
var roleEl = document.getElementById('role');
|
|
var role = roleEl.options[roleEl.selectedIndex].value;
|
|
if ( !theUserLists['role-' + role] ) return true;
|
|
return theUserLists['role-' + role].ajaxAdder('user', 'adduser');
|
|
}
|