2006-04-04 02:16:27 +02:00
|
|
|
addLoadEvent(function(){catList=new listMan('categorychecklist');catList.ajaxRespEl='jaxcat';catList.topAdder=1;catList.alt=0;catList.showLink=0;});
|
2006-03-29 03:51:55 +02:00
|
|
|
addLoadEvent(newCatAddIn);
|
2006-01-10 06:16:17 +01:00
|
|
|
function newCatAddIn() {
|
2006-09-13 23:39:53 +02:00
|
|
|
var jaxcat = $('jaxcat');
|
|
|
|
if ( !jaxcat )
|
|
|
|
return false;
|
2007-07-24 23:40:58 +02:00
|
|
|
// These multiple blank hidden inputs are needed: https://bugzilla.mozilla.org/show_bug.cgi?id=377815 , #3895 , #4664
|
|
|
|
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="' + catL10n.add + '"/><input type="hidden"/><input type="hidden"/><span id="howto">' + catL10n.how + '</span></span>');
|
2006-09-13 23:39:53 +02:00
|
|
|
$('newcat').onkeypress = function(e) { return killSubmit("catList.ajaxAdder('category','jaxcat');", e); };
|
|
|
|
$('catadd').onclick = function() { catList.ajaxAdder('category', 'jaxcat'); };
|
2006-01-10 06:16:17 +01:00
|
|
|
}
|