Changeset 1668

Show
Ignore:
Timestamp:
08/27/08 03:14:21 (3 months ago)
Author:
mdawaffe
Message:

wp-lists improvements: allow add to accept ajax return value of 1, don't cancel action if dimming from a checkbox (or anything but a link or a button), typo

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/bb-includes/js/wp-lists.js

    r1664 r1668  
    8989                        if ( !res || res.errors ) { return false; } 
    9090 
     91                        if ( true === res ) { return true; } 
     92 
    9193                        jQuery.each( res.responses, function() { 
    9294                                wpList.add.call( list, this.data, $.extend( {}, s, { // this.firstChild.nodevalue 
     
    235237 
    236238                $.ajax( s ); 
    237                 return false; 
     239                if ( element.is( 'a, :submit, :button' ) ) 
     240                        return false; 
    238241        }, 
    239242 
     
    333336                        } ); 
    334337                $("[class^=delete:" + list.id + ":]", el || null).click( function() { return list.wpList.del(this); } ); 
    335                 var c = $("[class^=dim:" + list.id + ":]", el || null).click( function() { return list.wpList.dim(this); } ); 
     338                $("[class^=dim:" + list.id + ":]", el || null).click( function() { return list.wpList.dim(this); } ); 
    336339        }, 
    337340