Skip to:
Content

BuddyPress.org

Changeset 2572


Ignore:
Timestamp:
02/03/2010 05:28:38 PM (14 years ago)
Author:
apeatling
Message:

Removing path setting as this is causing issues with clearing of cookies. Clearing page, search_terms and extras cookies on page load.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/_inc/global.js

    r2570 r2572  
    107107
    108108        /* Reset the page */
    109         j.cookie( 'bp-activity-oldestpage', 1, {path: '/'} );
     109        j.cookie( 'bp-activity-oldestpage', 1 );
    110110
    111111        /* Activity Stream Tabs */
     
    227227
    228228            if ( null == j.cookie('bp-activity-oldestpage') )
    229                 j.cookie('bp-activity-oldestpage', 1, {path: '/'} );
     229                j.cookie('bp-activity-oldestpage', 1 );
    230230
    231231            var oldest_page = ( j.cookie('bp-activity-oldestpage') * 1 ) + 1;
     
    239239            {
    240240                j("li.load-more").removeClass('loading');
    241                 j.cookie( 'bp-activity-oldestpage', oldest_page, {path: '/'} );
     241                j.cookie( 'bp-activity-oldestpage', oldest_page );
    242242                j("ul.activity-list").append(response.contents);
    243243
     
    10091009    /* Clear BP cookies on logout */
    10101010    j('a.logout').click( function() {
    1011         j.cookie('bp-activity-scope', null, {path: '/'});
    1012         j.cookie('bp-activity-filter', null, {path: '/'});
    1013         j.cookie('bp-activity-oldestpage', null, {path: '/'});
     1011        j.cookie('bp-activity-scope', null);
     1012        j.cookie('bp-activity-filter', null);
     1013        j.cookie('bp-activity-oldestpage', null);
    10141014
    10151015        var objects = [ 'members', 'groups', 'blogs', 'forums' ];
    10161016        j(objects).each( function(i) {
    1017             j.cookie('bp-' + objects[i] + '-scope', null, {path: '/'} );
    1018             j.cookie('bp-' + objects[i] + '-filter', null, {path: '/'} );
    1019             j.cookie('bp-' + objects[i] + '-search-terms', null, {path: '/'} );
    1020             j.cookie('bp-' + objects[i] + '-page', null, {path: '/'} );
    1021             j.cookie('bp-' + objects[i] + '-extras', null, {path: '/'} );
     1017            j.cookie('bp-' + objects[i] + '-scope', null );
     1018            j.cookie('bp-' + objects[i] + '-filter', null );
     1019            j.cookie('bp-' + objects[i] + '-search-terms', null );
     1020            j.cookie('bp-' + objects[i] + '-page', null );
     1021            j.cookie('bp-' + objects[i] + '-extras', null );
    10221022        });
    10231023    });
     
    10271027function bp_init_activity() {
    10281028    /* Reset the page */
    1029     j.cookie( 'bp-activity-oldestpage', 1, {path: '/'} );
     1029    j.cookie( 'bp-activity-oldestpage', 1 );
    10301030
    10311031    if ( null != j.cookie('bp-activity-filter') && j('#activity-filter-select').length )
     
    10541054        }
    10551055
    1056         /* Reset the page cookie on reload */
    1057         j.cookie('bp-' + objects[i] + '-page', null, {path: '/'});
     1056        /* Reset specfic cookies on reload */
     1057        j.cookie('bp-' + objects[i] + '-search-terms', null );
     1058        j.cookie('bp-' + objects[i] + '-page', null );
     1059        j.cookie('bp-' + objects[i] + '-extras', null );
    10581060    });
    10591061}
     
    10831085
    10841086    /* Save the type and filter to a session cookie */
    1085     j.cookie( 'bp-' + object + '-scope', scope, null, {path: '/'} );
    1086     j.cookie( 'bp-' + object + '-filter', filter, null, {path: '/'} );
    1087     j.cookie( 'bp-' + object + '-page', page, null, {path: '/'} );
    1088     j.cookie( 'bp-' + object + '-search-terms', search_terms, null, {path: '/'} );
    1089     j.cookie( 'bp-' + object + '-extras', extras, null, {path: '/'} );
     1087    j.cookie( 'bp-' + object + '-scope', scope, null );
     1088    j.cookie( 'bp-' + object + '-filter', filter, null );
     1089    j.cookie( 'bp-' + object + '-page', page, null );
     1090    j.cookie( 'bp-' + object + '-search-terms', search_terms, null );
     1091    j.cookie( 'bp-' + object + '-extras', extras, null );
    10901092
    10911093    /* Set the correct selected nav and filter */
     
    11291131
    11301132    /* Save the type and filter to a session cookie */
    1131     j.cookie( 'bp-activity-scope', scope, null, {path: '/'} );
    1132     j.cookie( 'bp-activity-filter', filter, null, {path: '/'} );
    1133     j.cookie( 'bp-activity-oldestpage', 1, {path: '/'} );
     1133    j.cookie( 'bp-activity-scope', scope, null );
     1134    j.cookie( 'bp-activity-filter', filter, null );
     1135    j.cookie( 'bp-activity-oldestpage', 1 );
    11341136
    11351137    /* Remove selected and loading classes from tabs */
Note: See TracChangeset for help on using the changeset viewer.