|
Revision 4768, 0.8 kB
(checked in by ryan, 2 years ago)
|
Category AJAX fixes from mdawaffe. fixes #3343
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
require_once('../wp-config.php'); |
|---|
| 3 |
cache_javascript_headers(); |
|---|
| 4 |
?> |
|---|
| 5 |
addLoadEvent(function(){catList=new listMan('categorychecklist');catList.ajaxRespEl='jaxcat';catList.topAdder=1;catList.alt=0;catList.showLink=0;}); |
|---|
| 6 |
addLoadEvent(newCatAddIn); |
|---|
| 7 |
function newCatAddIn() { |
|---|
| 8 |
var jaxcat = $('jaxcat'); |
|---|
| 9 |
if ( !jaxcat ) |
|---|
| 10 |
return false; |
|---|
| 11 |
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>'); |
|---|
| 12 |
$('newcat').onkeypress = function(e) { return killSubmit("catList.ajaxAdder('category','jaxcat');", e); }; |
|---|
| 13 |
$('catadd').onclick = function() { catList.ajaxAdder('category', 'jaxcat'); }; |
|---|
| 14 |
} |
|---|
| 15 |
|
|---|