Changeset 4163
- Timestamp:
- 09/02/2006 10:08:10 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r4162 r4163 6 6 define('DOING_AJAX', true); 7 7 8 8 9 check_ajax_referer(); 9 10 if ( !is_user_logged_in() ) … … 17 18 $key_js = addslashes(wp_specialchars($key, 'double')); 18 19 $key = wp_specialchars($key, true); 19 $r = "<meta><id>$mid</id><postid>$pid</postid><newitem><![CDATA[ ";20 $r = "<meta><id>$mid</id><postid>$pid</postid><newitem><![CDATA[<table><tbody>"; 20 21 $r .= "<tr id='meta-$mid'><td valign='top'>"; 21 22 $r .= "<input name='meta[$mid][key]' tabindex='6' onkeypress='return killSubmit(\"theList.ajaxUpdater('meta','meta-$mid');\",event);' type='text' size='20' value='$key' />"; … … 25 26 $r .= sprintf(__("You are about to delete the "%s" custom field on this post.\\n"OK" to delete, "Cancel" to stop."), $key_js); 26 27 $r .= "' );\" class='deletemeta' tabindex='6' value='Delete' />"; 27 $r .= "</td></tr> ]]></newitem></meta>";28 $r .= "</td></tr></tbody></table>]]></newitem></meta>"; 28 29 return $r; 29 30 } … … 148 149 149 150 $r = "<?xml version='1.0' standalone='yes'?><ajaxresponse>"; 150 $r .= "<cat><id>$cat->cat_ID</id><name>$cat_full_name</name><newitem><![CDATA[ ";151 $r .= "<cat><id>$cat->cat_ID</id><name>$cat_full_name</name><newitem><![CDATA[<table><tbody>"; 151 152 $r .= _cat_row( $cat, $level, $cat_full_name ); 152 $r .= " ]]></newitem></cat></ajaxresponse>";153 $r .= "</tbody></table>]]></newitem></cat></ajaxresponse>"; 153 154 header('Content-type: text/xml'); 154 155 die($r); … … 207 208 die('0'); 208 209 } 209 $r = "<?xml version='1.0' standalone='yes'?><ajaxresponse><user><id>$user_id</id><newitem><![CDATA[ ";210 $r = "<?xml version='1.0' standalone='yes'?><ajaxresponse><user><id>$user_id</id><newitem><![CDATA[<table><tbody>"; 210 211 $r .= user_row( $user_id ); 211 $r .= " ]]></newitem></user></ajaxresponse>";212 $r .= "</tbody></table>]]></newitem></user></ajaxresponse>"; 212 213 header('Content-type: text/xml'); 213 214 die($r); -
trunk/wp-admin/cat-js.php
r4162 r4163 6 6 addLoadEvent(newCatAddIn); 7 7 function newCatAddIn() { 8 var jaxcat = $('jaxcat'); 9 if ( !jaxcat ) 10 return false; 11 jaxcat.update('<span id="ajaxcat"><input type="text" name="newcat" id="newcat" size="16" autocomplete="off"/><input type="button" name="Button" id="catadd" value="Add"/><span id="howto"><?php _e('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'); }; 8 if ( !document.getElementById('jaxcat') ) return false; 9 var ajaxcat = document.createElement('span'); 10 ajaxcat.id = 'ajaxcat'; 11 12 newcat = document.createElement('input'); 13 newcat.type = 'text'; 14 newcat.name = 'newcat'; 15 newcat.id = 'newcat'; 16 newcat.size = '16'; 17 newcat.setAttribute('autocomplete', 'off'); 18 newcat.onkeypress = function(e) { return killSubmit("catList.ajaxAdder('category','categorydiv');", e); }; 19 20 var newcatSub = document.createElement('input'); 21 newcatSub.type = 'button'; 22 newcatSub.name = 'Button'; 23 newcatSub.id = 'catadd'; 24 newcatSub.value = 'Add'; 25 newcatSub.onclick = function() { catList.ajaxAdder('category', 'categorydiv'); }; 26 27 ajaxcat.appendChild(newcat); 28 ajaxcat.appendChild(newcatSub); 29 document.getElementById('jaxcat').appendChild(ajaxcat); 30 31 howto = document.createElement('span'); 32 howto.innerHTML = "<?php _e('Separate multiple categories with commas.'); ?>"; 33 howto.id = 'howto'; 34 ajaxcat.appendChild(howto); 14 35 } -
trunk/wp-admin/custom-fields.js
r4162 r4163 1 1 function customFieldsOnComplete() { 2 var pidEl = $('post_ID');2 var pidEl = document.getElementById('post_ID'); 3 3 pidEl.name = 'post_ID'; 4 4 pidEl.value = getNodeValue(theList.ajaxAdd.responseXML, 'postid'); 5 var aEl = $('hiddenaction')5 var aEl = document.getElementById('hiddenaction') 6 6 if ( aEl.value == 'post' ) aEl.value = 'postajaxpost'; 7 7 } … … 22 22 } 23 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); };24 document.getElementById('metakeyinput').onkeypress = function(e) {return killSubmit('theList.inputData+="&id="+document.getElementById("post_ID").value;theList.ajaxAdder("meta", "newmeta");', e); }; 25 document.getElementById('updatemetasub').onclick = function(e) {return killSubmit('theList.inputData+="&id="+document.getElementById("post_ID").value;theList.ajaxAdder("meta", "newmeta");', e); }; 26 26 } -
trunk/wp-includes/script-loader.php
r4162 r4163 20 20 $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.0'); 21 21 $this->add( 'autosave', '/wp-includes/js/autosave.js.php', array('prototype', 'sack'), '4107'); 22 $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax-js.php', array('prototype'), rand());23 $this->add( 'listman', '/wp-includes/js/list-manipulation-js.php', array('wp-ajax', 'fat'), rand());24 22 if ( is_admin() ) { 25 23 $this->add( 'dbx-admin-key', '/wp-admin/dbx-admin-key-js.php', array('dbx'), '3651' ); 26 $this->add( 'listman -old', '/wp-admin/list-manipulation-js.php', array('sack', 'fat'), '4042' ); // Make changeset # the correct one24 $this->add( 'listman', '/wp-admin/list-manipulation-js.php', array('sack', 'fat'), '4042' ); // Make changeset # the correct one 27 25 $this->add( 'ajaxcat', '/wp-admin/cat-js.php', array('listman'), '3684' ); 28 26 $this->add( 'admin-categories', '/wp-admin/categories.js', array('listman'), '3684' );
Note: See TracChangeset
for help on using the changeset viewer.