Changeset 4458
- Timestamp:
- 11/08/2006 09:23:41 PM (19 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 4 edited
-
classes.php (modified) (1 diff)
-
js/list-manipulation-js.php (modified) (5 diffs)
-
js/wp-ajax-js.php (modified) (2 diffs)
-
script-loader.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/classes.php
r4291 r4458 689 689 690 690 $x = ''; 691 $x .= "<response action=' $action_$id'>"; // The action attribute in the xml output is formatted like a nonce action691 $x .= "<response action='{$action}_$id'>"; // The action attribute in the xml output is formatted like a nonce action 692 692 $x .= "<$what id='$id'" . ( false !== $old_id ? "old_id='$old_id'>" : '>' ); 693 693 $x .= $response; -
trunk/wp-includes/js/list-manipulation-js.php
r4424 r4458 1 <?php 2 @require_once('../../wp-config.php'); 3 cache_javascript_headers(); 4 $handler = get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php'; 5 ?> 1 <?php @require_once('../../wp-config.php'); cache_javascript_headers(); ?> 6 2 addLoadEvent(function(){theList=new listMan();}); 7 3 function deleteSomething(what,id,message,obj){if(!obj)obj=theList;if(!message)message="<?php printf(__('Are you sure you want to delete this %s?'),"'+what+'"); ?>";if(confirm(message))return obj.ajaxDelete(what,id);else return false;} … … 11 7 Object.extend(listMan.prototype, { 12 8 ajaxRespEl: 'ajax-response', 13 ajaxHandler: '<?php echo $handler; ?>',9 ajaxHandler: false, 14 10 inputData: '', 15 11 clearInputs: [], … … 52 48 tempObj.showLink = id; 53 49 }); 50 ajaxAdd.myResponseElement.update(tempObj.showLink ? ( "<div id='jumplink' class='updated fade'><p><a href='#" + what + '-' + tempObj.showLink + "'><?php _e('Jump to new item'); ?></a></p></div>" ) : ''); 54 51 } 55 ajaxAdd.myResponseElement.update(tempObj.showLink ? ( "<div id='jumplink' class='updated fade'><p><a href='#" + what + '-' + tempObj.showLink + "'><?php _e('Jump to new item'); ?></a></p></div>" ) : '');56 52 if ( tempObj.addComplete && typeof tempObj.addComplete == 'function' ) 57 53 tempObj.addComplete( what, where, update, transport ); … … 59 55 ajaxAdd.restoreInputs = null; 60 56 }); 61 ajaxAdd.addOnWPError( function(transport) { tempObj.restoreForm(ajaxAdd.restoreInputs); }); 57 if ( !update ) 58 ajaxAdd.addOnWPError( function(transport) { tempObj.restoreForm(ajaxAdd.restoreInputs); }); 62 59 ajaxAdd.request(ajaxAdd.url); 63 this.clear(); 60 if ( !update ) 61 this.clear(); 64 62 return false; 65 63 }, … … 263 261 } 264 262 } 265 //Pretty func adapted from ALA http://www.alistapart.com/articles/gettingstartedwithajax266 function getNodeValue(tree,el){try { var r = tree.getElementsByTagName(el)[0].firstChild.nodeValue; } catch(err) { var r = null; } return r; }267 263 //Generic but lame JS closure 268 264 function encloseFunc(f){var a=arguments[1];return function(){return f(a);}} -
trunk/wp-includes/js/wp-ajax-js.php
r4424 r4458 20 20 } 21 21 }); 22 this.url = url ;22 this.url = url ? url : '<?php bloginfo( 'wpurl' ); ?>/wp-admin/admin-ajax.php'; 23 23 this.getResponseElement(responseEl); 24 24 }, … … 92 92 } 93 93 }); 94 95 //Pretty func adapted from ALA http://www.alistapart.com/articles/gettingstartedwithajax 96 function getNodeValue(tree,el){try { var r = tree.getElementsByTagName(el)[0].firstChild.nodeValue; } catch(err) { var r = null; } return r; } -
trunk/wp-includes/script-loader.php
r4424 r4458 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'), '4206'); 22 $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax-js.php', array('prototype'), ' 4187');23 $this->add( 'listman', '/wp-includes/js/list-manipulation-js.php', array('wp-ajax', 'fat'), ' 4187');22 $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax-js.php', array('prototype'), '####'); 23 $this->add( 'listman', '/wp-includes/js/list-manipulation-js.php', array('wp-ajax', 'fat'), '####'); 24 24 if ( is_admin() ) { 25 25 $this->add( 'dbx-admin-key', '/wp-admin/dbx-admin-key-js.php', array('dbx'), '3651' );
Note: See TracChangeset
for help on using the changeset viewer.