Changeset 4162
- Timestamp:
- 09/02/2006 10:05:37 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r4157 r4162 6 6 define('DOING_AJAX', true); 7 7 8 9 8 check_ajax_referer(); 10 9 if ( !is_user_logged_in() ) … … 18 17 $key_js = addslashes(wp_specialchars($key, 'double')); 19 18 $key = wp_specialchars($key, true); 20 $r = "<meta><id>$mid</id><postid>$pid</postid><newitem><![CDATA[ <table><tbody>";19 $r = "<meta><id>$mid</id><postid>$pid</postid><newitem><![CDATA["; 21 20 $r .= "<tr id='meta-$mid'><td valign='top'>"; 22 21 $r .= "<input name='meta[$mid][key]' tabindex='6' onkeypress='return killSubmit(\"theList.ajaxUpdater('meta','meta-$mid');\",event);' type='text' size='20' value='$key' />"; … … 26 25 $r .= sprintf(__("You are about to delete the "%s" custom field on this post.\\n"OK" to delete, "Cancel" to stop."), $key_js); 27 26 $r .= "' );\" class='deletemeta' tabindex='6' value='Delete' />"; 28 $r .= "</td></tr> </tbody></table>]]></newitem></meta>";27 $r .= "</td></tr>]]></newitem></meta>"; 29 28 return $r; 30 29 } … … 149 148 150 149 $r = "<?xml version='1.0' standalone='yes'?><ajaxresponse>"; 151 $r .= "<cat><id>$cat->cat_ID</id><name>$cat_full_name</name><newitem><![CDATA[ <table><tbody>";150 $r .= "<cat><id>$cat->cat_ID</id><name>$cat_full_name</name><newitem><![CDATA["; 152 151 $r .= _cat_row( $cat, $level, $cat_full_name ); 153 $r .= " </tbody></table>]]></newitem></cat></ajaxresponse>";152 $r .= "]]></newitem></cat></ajaxresponse>"; 154 153 header('Content-type: text/xml'); 155 154 die($r); … … 208 207 die('0'); 209 208 } 210 $r = "<?xml version='1.0' standalone='yes'?><ajaxresponse><user><id>$user_id</id><newitem><![CDATA[ <table><tbody>";209 $r = "<?xml version='1.0' standalone='yes'?><ajaxresponse><user><id>$user_id</id><newitem><![CDATA["; 211 210 $r .= user_row( $user_id ); 212 $r .= " </tbody></table>]]></newitem></user></ajaxresponse>";211 $r .= "]]></newitem></user></ajaxresponse>"; 213 212 header('Content-type: text/xml'); 214 213 die($r); -
trunk/wp-admin/cat-js.php
r4109 r4162 6 6 addLoadEvent(newCatAddIn); 7 7 function newCatAddIn() { 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); 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'); }; 35 14 } -
trunk/wp-admin/custom-fields.js
r3733 r4162 1 1 function customFieldsOnComplete() { 2 var pidEl = document.getElementById('post_ID');2 var pidEl = $('post_ID'); 3 3 pidEl.name = 'post_ID'; 4 4 pidEl.value = getNodeValue(theList.ajaxAdd.responseXML, 'postid'); 5 var aEl = document.getElementById('hiddenaction')5 var aEl = $('hiddenaction') 6 6 if ( aEl.value == 'post' ) aEl.value = 'postajaxpost'; 7 7 } … … 22 22 } 23 23 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); };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 26 } -
trunk/wp-admin/edit-form-comment.php
r4133 r4162 67 67 68 68 <tr> 69 <th scope="row" valign="top"><?php _e('Delete'); ?>:</th>70 <td><input name="deletecomment" class="button" type="submit" id="deletecomment" tabindex="10" value="<?php _e('Delete this comment') ?>" <?php echo "onclick=\" return confirm('" . __("You are about to delete this comment \\n \'Cancel\' to stop, \'OK\' to delete.") . "')\""; ?> />69 <th scope="row" valign="top"><?php _e('Delete'); $delete_nonce = wp_create_nonce( 'delete-comment_' . $comment->comment_ID ); ?>:</th> 70 <td><input name="deletecomment" class="button" type="submit" id="deletecomment" tabindex="10" value="<?php _e('Delete this comment') ?>" <?php echo "onclick=\"if ( confirm('" . __("You are about to delete this comment \\n \'Cancel\' to stop, \'OK\' to delete.") . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true; } return false;\""; ?> /> 71 71 <input type="hidden" name="comment" value="<?php echo $comment->comment_ID ?>" /> 72 72 <input type="hidden" name="p" value="<?php echo $comment->comment_post_ID ?>" /> -
trunk/wp-includes/script-loader.php
r4144 r4162 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()); 22 24 if ( is_admin() ) { 23 25 $this->add( 'dbx-admin-key', '/wp-admin/dbx-admin-key-js.php', array('dbx'), '3651' ); 24 $this->add( 'listman ', '/wp-admin/list-manipulation-js.php', array('sack', 'fat'), '4042' ); // Make changeset # the correct one26 $this->add( 'listman-old', '/wp-admin/list-manipulation-js.php', array('sack', 'fat'), '4042' ); // Make changeset # the correct one 25 27 $this->add( 'ajaxcat', '/wp-admin/cat-js.php', array('listman'), '3684' ); 26 28 $this->add( 'admin-categories', '/wp-admin/categories.js', array('listman'), '3684' );
Note: See TracChangeset
for help on using the changeset viewer.