Make WordPress Core


Ignore:
Timestamp:
06/06/2006 04:14:04 AM (20 years ago)
Author:
ryan
Message:

List manipulation improvements from mdawaffe. fixes #2786

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/list-manipulation-js.php

    r3733 r3847  
    44?>
    55addLoadEvent(function(){theList=new listMan();});
    6 function deleteSomething(what,id,message){if(!message)message="<?php printf(__('Are you sure you want to delete this %s?'),"'+what+'"); ?>";if(confirm(message))return theList.ajaxDelete(what,id);else return false;}
    7 function dimSomething(what,id,dimClass){return theList.ajaxDimmer(what,id,dimClass);}
     6function 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;}
     7function dimSomething(what,id,dimClass,obj){if(!obj)obj=theList;return obj.ajaxDimmer(what,id,dimClass);}
    88
    99function WPAjax(file, responseEl){//class WPAjax extends sack
     
    7575                if(this.ajaxDel.failed)return true;
    7676                var tempObj=this;
    77                 this.ajaxDel.onCompletion=function(){if(this.parseAjaxResponse()){tempObj.removeListItem(what.replace('-as-spam','')+'-'+id);this.myResponseElement.innerHTML='';if(tempObj.delComplete&&typeof tempObj.delComplete=='function')tempObj.delComplete(what,where);tempObj.recolorList(tempObj.recolorPos,1000)}};
     77                this.ajaxDel.onCompletion=function(){if(this.parseAjaxResponse()){tempObj.removeListItem(what.replace('-as-spam','')+'-'+id);this.myResponseElement.innerHTML='';if(tempObj.delComplete&&typeof tempObj.delComplete=='function')tempObj.delComplete(what,id);tempObj.recolorList(tempObj.recolorPos,1000)}};
    7878                this.ajaxDel.runAJAX('action=delete-'+what+'&id='+id);
    7979                return false;
Note: See TracChangeset for help on using the changeset viewer.