mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-18 00:25:37 +01:00
ce623c09ba
git-svn-id: http://svn.automattic.com/wordpress/trunk@3669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
36 lines
1.3 KiB
PHP
36 lines
1.3 KiB
PHP
<?php
|
|
require_once('../wp-config.php');
|
|
header('Content-type: text/javascript; charset=' . get_settings('blog_charset'), true);
|
|
?>
|
|
addLoadEvent(function(){catList=new listMan('categorychecklist');catList.ajaxRespEl='jaxcat';catList.clearInputs.push('newcat');catList.topAdder=1;catList.alt=0});
|
|
addLoadEvent(newCatAddIn);
|
|
function newCatAddIn() {
|
|
if ( !document.getElementById('jaxcat') ) return false;
|
|
var ajaxcat = document.createElement('span');
|
|
ajaxcat.id = 'ajaxcat';
|
|
|
|
newcat = document.createElement('input');
|
|
newcat.type = 'text';
|
|
newcat.name = 'newcat';
|
|
newcat.id = 'newcat';
|
|
newcat.size = '16';
|
|
newcat.setAttribute('autocomplete', 'off');
|
|
newcat.onkeypress = function(e) { return killSubmit("catList.ajaxAdder('category','categorydiv');", e); };
|
|
|
|
var newcatSub = document.createElement('input');
|
|
newcatSub.type = 'button';
|
|
newcatSub.name = 'Button';
|
|
newcatSub.id = 'catadd';
|
|
newcatSub.value = 'Add';
|
|
newcatSub.onclick = function() { catList.ajaxAdder('category', 'categorydiv'); };
|
|
|
|
ajaxcat.appendChild(newcat);
|
|
ajaxcat.appendChild(newcatSub);
|
|
document.getElementById('jaxcat').appendChild(ajaxcat);
|
|
|
|
howto = document.createElement('span');
|
|
howto.innerHTML = "<?php _e('Separate multiple categories with commas.'); ?>";
|
|
howto.id = 'howto';
|
|
ajaxcat.appendChild(howto);
|
|
}
|