Skip to:
Content

bbPress.org

Changeset 1837


Ignore:
Timestamp:
12/09/2008 02:19:59 PM (18 years ago)
Author:
sambauers
Message:

wp-lists.js updates from Wordpress

File:
1 edited

Legend:

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

    r1668 r1837  
    2727                try {
    2828                        cl = $(e).attr('class') || '';
    29                         cl = cl.match(new RegExp(t+':[A-Za-z0-9:_=-]+'));
     29                        cl = cl.match(new RegExp(t+':[\\S]+'));
    3030                        if ( cl ) { c = cl[0].split(':'); }
    3131                } catch(r) {}
     
    5555                var list = this; e = $(e); s = s || {};
    5656                var cls = wpList.parseClass(e,'add');
     57                s = wpList.pre.call( list, e, s, 'add' );
     58
    5759                s.element = cls[2] || e.attr( 'id' ) || s.element || null;
    5860                if ( cls[3] ) { s.addColor = '#' + cls[3]; }
    5961                else { s.addColor = s.addColor || '#FFFF33'; }
    60 
    61                 s = wpList.pre.call( list, e, s, 'add' );
    6262
    6363                if ( !s ) { return false; }
     
    118118                var list = this; e = $(e); s = s || {};
    119119                var cls = wpList.parseClass(e,'delete');
     120                s = wpList.pre.call( list, e, s, 'delete' );
     121
    120122                s.element = cls[2] || s.element || null;
    121123                if ( cls[3] ) { s.delColor = '#' + cls[3]; }
    122124                else { s.delColor = s.delColor || '#FF3333'; }
    123 
    124                 s = wpList.pre.call( list, e, s, 'delete' );
    125125
    126126                if ( !s || !s.element ) { return false; }
     
    176176
    177177        ajaxDim: function( e, s ) {
     178                if ( $(e).parent().css('display') == 'none' ) // Prevent hidden links from being clicked by hotkeys
     179                        return false;
    178180                var list = this; e = $(e); s = s || {};
    179181                var cls = wpList.parseClass(e,'dim');
     182                s = wpList.pre.call( list, e, s, 'dim' );
    180183
    181184                s.element = cls[2] || s.element || null;
     
    185188                if ( cls[5] ) { s.dimDelColor = '#' + cls[5]; }
    186189                else { s.dimDelColor = s.dimDelColor || '#FF3333'; }
    187 
    188                 s = wpList.pre.call( list, e, s, 'dim' );
    189190
    190191                if ( !s || !s.element || !s.dimClass ) { return true; }
     
    237238
    238239                $.ajax( s );
    239                 if ( element.is( 'a, :submit, :button' ) )
    240                         return false;
     240                return false;
    241241        },
    242242
     
    273273                                s.pos = s.pos.substr(1);
    274274                                ba = 'before';
    275                         } else if ( '+' == s.pos.substr(0,1) ) {
    276                                 s.pos = s.pos.substr(1);
    277                                 ba = 'append';
    278275                        }
    279276                        var ref = list.find( '#' + s.pos );
Note: See TracChangeset for help on using the changeset viewer.