1 function customFieldsOnComplete( what, where, update, transport ) {
2 var pidEl = $('post_ID');
3 pidEl.name = 'post_ID';
4 pidEl.value = getNodeValue(transport.responseXML, 'postid');
5 var aEl = $('hiddenaction')
6 if ( aEl.value == 'post' ) aEl.value = 'postajaxpost';
8 addLoadEvent(customFieldsAddIn);
9 function customFieldsAddIn() {
11 theList.addComplete = customFieldsOnComplete;
12 if (!theList.theList) return false;
13 inputs = theList.theList.getElementsByTagName('input');
14 for ( var i=0; i < inputs.length; i++ ) {
15 if ('text' == inputs[i].type) {
16 inputs[i].setAttribute('autocomplete', 'off');
17 inputs[i].onkeypress = function(e) {return killSubmit('theList.ajaxUpdater("meta", "meta-' + parseInt(this.name.slice(5),10) + '");', e); };
19 if ('updatemeta' == inputs[i].className) {
20 inputs[i].onclick = function(e) {return killSubmit('theList.ajaxUpdater("meta", "meta-' + parseInt(this.parentNode.parentNode.id.slice(5),10) + '");', e); };
24 $('metakeyinput').onkeypress = function(e) {return killSubmit('theList.inputData+="&id="+$("post_ID").value;theList.ajaxAdder("meta", "newmeta");', e); };
25 $('updatemetasub').onclick = function(e) {return killSubmit('theList.inputData+="&id="+$("post_ID").value;theList.ajaxAdder("meta", "newmeta");', e); };