2006-01-10 17:49:11 -05:00
|
|
|
<?php
|
2006-03-17 19:38:37 -05:00
|
|
|
require_once('../wp-config.php');
|
2006-01-30 16:39:20 -05:00
|
|
|
header('Content-type: text/javascript; charset=' . get_settings('blog_charset'), true);
|
2006-01-10 17:49:11 -05:00
|
|
|
?>
|
2006-03-30 18:40:31 -05:00
|
|
|
addLoadEvent(function(){catList=new listMan('categorychecklist');catList.ajaxRespEl='jaxcat';catList.clearInputs.push('newcat');catList.topAdder=1;catList.alt=0});
|
2006-03-28 20:51:55 -05:00
|
|
|
addLoadEvent(newCatAddIn);
|
2006-01-10 00:16:17 -05:00
|
|
|
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');
|
2006-03-28 20:51:55 -05:00
|
|
|
newcat.onkeypress = function(e) { return killSubmit("catList.ajaxAdder('category','categorydiv');", e); };
|
2006-01-10 00:16:17 -05:00
|
|
|
|
|
|
|
var newcatSub = document.createElement('input');
|
|
|
|
newcatSub.type = 'button';
|
|
|
|
newcatSub.name = 'Button';
|
|
|
|
newcatSub.id = 'catadd';
|
2006-03-28 20:51:55 -05:00
|
|
|
newcatSub.value = 'Add';
|
|
|
|
newcatSub.onclick = function() { catList.ajaxAdder('category', 'categorydiv'); };
|
2006-01-10 00:16:17 -05:00
|
|
|
|
|
|
|
ajaxcat.appendChild(newcat);
|
|
|
|
ajaxcat.appendChild(newcatSub);
|
|
|
|
document.getElementById('jaxcat').appendChild(ajaxcat);
|
|
|
|
|
|
|
|
howto = document.createElement('span');
|
2006-03-28 20:51:55 -05:00
|
|
|
howto.innerHTML = "<?php _e('Separate multiple categories with commas.'); ?>";
|
2006-01-10 00:16:17 -05:00
|
|
|
howto.id = 'howto';
|
|
|
|
ajaxcat.appendChild(howto);
|
|
|
|
}
|