Files
wordpress-develop/wp-admin/cat-js.php
Ryan Boren 3e8513baea Category AJAX fixes from mdawaffe. fixes #3343
git-svn-id: https://develop.svn.wordpress.org/trunk@4768 602fd350-edb4-49c9-b593-d223f7449a82
2007-01-19 00:49:01 +00:00

15 lines
839 B
PHP

<?php
require_once('../wp-config.php');
cache_javascript_headers();
?>
addLoadEvent(function(){catList=new listMan('categorychecklist');catList.ajaxRespEl='jaxcat';catList.topAdder=1;catList.alt=0;catList.showLink=0;});
addLoadEvent(newCatAddIn);
function newCatAddIn() {
var jaxcat = $('jaxcat');
if ( !jaxcat )
return false;
Element.update(jaxcat,'<span id="ajaxcat"><input type="text" name="newcat" id="newcat" size="16" autocomplete="off"/><input type="button" name="Button" id="catadd" value="<?php echo js_escape(__('Add')); ?>"/><span id="howto"><?php echo js_escape(__('Separate multiple categories with commas.')); ?></span></span>');
$('newcat').onkeypress = function(e) { return killSubmit("catList.ajaxAdder('category','jaxcat');", e); };
$('catadd').onclick = function() { catList.ajaxAdder('category', 'jaxcat'); };
}