Changeset 4813 for trunk/wp-includes/js/list-manipulation-js.php
- Timestamp:
- 01/26/2007 03:41:17 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/js/list-manipulation-js.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/list-manipulation-js.php
r4768 r4813 33 33 if ( ajaxAdd.notInitialized() ) 34 34 return true; 35 ajaxAdd.options.parameters += '&action=' + ( update ? 'update-' : 'add-' ) + what + '&' + this.grabInputs( where, ajaxAdd ) + this.inputData; 35 var action = ( update ? 'update-' : 'add-' ) + what; 36 ajaxAdd.options.parameters = $H(ajaxAdd.options.parameters).merge({action: action}).merge(this.inputData.toQueryParams()).merge(this.grabInputs( where, ajaxAdd ).toQueryParams()); 37 36 38 var tempObj=this; 37 39 ajaxAdd.addOnComplete( function(transport) { … … 80 82 return true; 81 83 var tempObj = this; 82 var action = 'delete-' + what + '&id=' + id; 84 var action = 'delete-' + what; 85 var actionId = action + '&id=' + id; 83 86 var idName = what.replace('-as-spam','') + '-' + id; 84 87 ajaxDel.addOnComplete( function(transport) { 85 88 Element.update(ajaxDel.myResponseElement,''); 86 tempObj.destore(action );89 tempObj.destore(actionId); 87 90 if( tempObj.delComplete && typeof tempObj.delComplete == 'function' ) 88 91 tempObj.delComplete( what, id, transport ); 89 92 }); 90 ajaxDel.addOnWPError( function(transport) { tempObj.restore(action , true); });91 ajaxDel.options.parameters += '&action=' + action + this.inputData;93 ajaxDel.addOnWPError( function(transport) { tempObj.restore(actionId, true); }); 94 ajaxDel.options.parameters = $H(ajaxDel.options.parameters).merge({action: action, id: id}).merge(this.inputData.toQueryParams()); 92 95 ajaxDel.request(ajaxDel.url); 93 this.store(action , idName);96 this.store(actionId, idName); 94 97 tempObj.removeListItem( idName ); 95 98 return false; … … 103 106 return true; 104 107 var tempObj = this; 105 var action = 'dim-' + what + '&id=' + id; 108 var action = 'dim-' + what; 109 var actionId = action + '&id=' + id; 106 110 var idName = what + '-' + id; 107 111 ajaxDim.addOnComplete( function(transport) { 108 112 Element.update(ajaxDim.myResponseElement,''); 109 tempObj.destore(action );113 tempObj.destore(actionId); 110 114 if ( tempObj.dimComplete && typeof tempObj.dimComplete == 'function' ) 111 115 tempObj.dimComplete( what, id, dimClass, transport ); 112 116 }); 113 ajaxDim.addOnWPError( function(transport) { tempObj.restore(action , true); });114 ajaxDim.options.parameters += '&action=' + action + this.inputData;117 ajaxDim.addOnWPError( function(transport) { tempObj.restore(actionId, true); }); 118 ajaxDim.options.parameters = $H(ajaxDim.options.parameters).merge({action: action, id: id}).merge(this.inputData.toQueryParams()); 115 119 ajaxDim.request(ajaxDim.url); 116 this.store(action , idName);120 this.store(actionId, idName); 117 121 this.dimItem( idName, dimClass ); 118 122 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)