[ Index ]
 

Code source de WordPress 2.1.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/wp-admin/ -> custom-fields.js (source)

   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';
   7  }
   8  addLoadEvent(customFieldsAddIn);
   9  function customFieldsAddIn() {
  10      theList.showLink=0;
  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); };
  18          }
  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); };
  21          }
  22      }
  23  
  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); };
  26  }


Généré le : Fri Mar 30 19:41:27 2007 par Balluche grâce à PHPXref 0.7