Changeset 3677 for trunk/wp-admin/list-manipulation-js.php
- Timestamp:
- 04/02/2006 12:31:26 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/list-manipulation-js.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/list-manipulation-js.php
r3669 r3677 10 10 this.getResponseElement=function(r){var p=document.getElementById(r+'-p');if(!p){p=document.createElement('span');p.id=r+'ajax-response-p';document.getElementById(r).appendChild(p);}this.myResponseElement=p; } 11 11 this.parseAjaxResponse=function(){ 12 if(isNaN(this.response)){this.myResponseElement.innerHTML= "<?php _e('Error: '); ?>"+this.response;return false;}12 if(isNaN(this.response)){this.myResponseElement.innerHTML='<div class="error">'+this.response+'</div>';return false;} 13 13 this.response=parseInt(this.response,10); 14 14 if(-1==this.response){this.myResponseElement.innerHTML="<?php _e("You don't have permission to do that."); ?>";return false;} … … 18 18 this.parseAjaxResponseXML=function(){ 19 19 if(this.responseXML&&typeof this.responseXML=='object')return true; 20 if(isNaN(this.response)){this.myResponseElement.innerHTML= "<?php _e('Error: '); ?>"+this.response;return false;}20 if(isNaN(this.response)){this.myResponseElement.innerHTML='<div class="error">'+this.response+'</div>';return false;} 21 21 var r=parseInt(this.response,10); 22 22 if(-1==r){this.myResponseElement.innerHTML="<?php _e("You don't have permission to do that."); ?>";} … … 154 154 } 155 155 //No submit unless eval(code) returns true. 156 function killSubmit(code,e){if(!e){if(window.event)e=window.event;else return;}var t=e.target?e.target:e.srcElement;if(('text'==t.type&&e.keyCode==13)||('submit'==t.type&&'click'==e.type)){if(!eval(code)) ;e.returnValue=false;e.cancelBubble=true;return false;}}156 function killSubmit(code,e){if(!e){if(window.event)e=window.event;else return;}var t=e.target?e.target:e.srcElement;if(('text'==t.type&&e.keyCode==13)||('submit'==t.type&&'click'==e.type)){if(!eval(code)){e.returnValue=false;e.cancelBubble=true;return false;}}} 157 157 //Pretty func from ALA http://www.alistapart.com/articles/gettingstartedwithajax 158 158 function getNodeValue(tree,el){return tree.getElementsByTagName(el)[0].firstChild.nodeValue;}
Note: See TracChangeset
for help on using the changeset viewer.