Skip to:
Content

BuddyPress.org

Changeset 4884


Ignore:
Timestamp:
07/28/2011 03:52:10 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Fix load button state so that spinner appears along with gradient background. Tweak new activity stream animations. Consolidates some of default.css's button styles and renumbers as needed.

Chips away at #3320, #3241, and #3367.

Location:
trunk/bp-themes/bp-default
Files:
3 edited

Legend:

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

    r4871 r4884  
    2828                6.1.2 - Activity Comments
    2929        6.2 - Admin Bar
    30         6.3 - Ajax Loading
    31         6.4 - Directories - Members, Groups, Blogs, Forums
    32         6.5 - Error / Success Messages
    33         6.6 - Forms
     30        6.3 - Directories - Members, Groups, Blogs, Forums
     31        6.4 - Error / Success Messages
     32        6.5 - Forms
     33        6.6 - Ajax Loading
    3434        6.7 - Topics and Tables - Forums and General
    3535        6.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums
     
    10421042        border-bottom: 1px solid #ddd;
    10431043        margin: 20px 0 10px;
     1044        padding-bottom: 20px;
    10441045}
    10451046.home-page form#whats-new-form {
     
    10711072        font-family: inherit;
    10721073        font-size: 14px;
    1073         height: 50px;
     1074        height: 20px;
    10741075        padding: 6px;
    10751076        width: 98%;
     
    10841085}
    10851086#whats-new-options {
    1086         margin-bottom: 18px;
    10871087        overflow: auto;
    1088 }
    1089 #aw-whats-new-submit {
    1090         display: none;
     1088        height: 0;
    10911089}
    10921090#whats-new:focus {
     
    14661464
    14671465/*--------------------------------------------------------------
    1468 6.3 - Ajax Loading
    1469 --------------------------------------------------------------*/
    1470 a.loading,
    1471 input.loading {
    1472         background-image: url( ../images/ajax-loader.gif ) !important;
    1473         background-position: 95% 50% !important;
    1474         background-repeat: no-repeat !important;
    1475         padding-right: 25px !important;
    1476 }
    1477 
    1478 
    1479 /*--------------------------------------------------------------
    1480 6.4 - Directories - Members, Groups, Blogs, Forums
     14666.3 - Directories - Members, Groups, Blogs, Forums
    14811467--------------------------------------------------------------*/
    14821468div.dir-search {
     
    14911477
    14921478/*--------------------------------------------------------------
    1493 6.5 - Errors / Success Messages
     14796.4 - Errors / Success Messages
    14941480--------------------------------------------------------------*/
    14951481div#message {
     
    15281514        width: 90%;
    15291515}
    1530 input[type="submit"].pending,
    1531 input[type="button"].pending,
    1532 input[type="reset"].pending,
    1533 input[type="submit"].disabled,
    1534 input[type="button"].disabled,
    1535 input[type="reset"].disabled,
    1536 button.pending,
    1537 button.disabled,
    1538 div.pending a,
    1539 a.disabled {
    1540         border-color: #eee;
    1541         color: #bbb;
    1542         cursor: default;
    1543 }
    1544 input[type="submit"]:hover.pending,
    1545 input[type="button"]:hover.pending,
    1546 input[type="reset"]:hover.pending,
    1547 input[type="submit"]:hover.disabled,
    1548 input[type="button"]:hover.disabled,
    1549 input[type="reset"]:hover.disabled,
    1550 button.pending:hover,
    1551 button.disabled:hover,
    1552 div.pending a:hover,
    1553 a.disabled:hover {
    1554         border-color: #eee;
    1555         color: #bbb;
    1556 }
    15571516div.accept,
    15581517div.reject {
     
    15701529
    15711530/*--------------------------------------------------------------
    1572 6.6 - Forms
     15316.5 - Forms
    15731532--------------------------------------------------------------*/
    15741533.standard-form textarea,
     
    17501709
    17511710/*--------------------------------------------------------------
     17116.6 - Ajax Loading
     1712--------------------------------------------------------------*/
     1713a.loading,
     1714input.loading {
     1715    background-image: url( ../images/ajax-loader.gif ), -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
     1716        background-image: url( ../images/ajax-loader.gif ), -moz-linear-gradient(top,  #fff,  #e0e0e0);
     1717    background-position: 95% 50%;
     1718    background-repeat: no-repeat;
     1719    padding-right: 25px;
     1720}
     1721a.loading:hover,
     1722input.loading:hover {
     1723    background-image: url( ../images/ajax-loader.gif ), -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
     1724    background-image: url( ../images/ajax-loader.gif ), -moz-linear-gradient(top,  #fff,  #e0e0e0);
     1725    background-position: 95% 50%;
     1726    background-repeat: no-repeat;
     1727    padding-right: 25px;
     1728    border: 1px solid #ccc;
     1729    color: #777;
     1730}
     1731input[type="submit"].pending,
     1732input[type="button"].pending,
     1733input[type="reset"].pending,
     1734input[type="submit"].disabled,
     1735input[type="button"].disabled,
     1736input[type="reset"].disabled,
     1737button.pending,
     1738button.disabled,
     1739div.pending a,
     1740a.disabled {
     1741    border-color: #eee;
     1742    color: #bbb;
     1743    cursor: default;
     1744}
     1745input[type="submit"]:hover.pending,
     1746input[type="button"]:hover.pending,
     1747input[type="reset"]:hover.pending,
     1748input[type="submit"]:hover.disabled,
     1749input[type="button"]:hover.disabled,
     1750input[type="reset"]:hover.disabled,
     1751button.pending:hover,
     1752button.disabled:hover,
     1753div.pending a:hover,
     1754a.disabled:hover {
     1755    background: -webkit-gradient(linear, left top, left bottom, from(white), to(#ededed));
     1756    border-color: #eee;
     1757    color: #bbb;
     1758}
     1759
     1760
     1761/*--------------------------------------------------------------
    175217626.7 - Forums, Tables and Topics
    17531763--------------------------------------------------------------*/
  • trunk/bp-themes/bp-default/_inc/global.js

    r4866 r4884  
    3131
    3232        /* Textarea focus */
    33         jq('#whats-new').focus( function(){ jq("#aw-whats-new-submit").fadeIn(300); });
     33        jq('#whats-new').focus( function(){
     34                jq("#whats-new-options").animate({height:'40px'});
     35                jq("form#whats-new-form textarea").animate({height:'50px'});
     36                jq("#aw-whats-new-submit").prop("disabled", false);
     37        });
    3438
    3539        /* New posts */
     
    6670                        'item_id': item_id
    6771                },
    68                 function(response)
    69                 {
    70                         button.removeClass('loading');
     72                function(response) {
    7173
    7274                        form.children().each( function() {
    73                                 if ( jq.nodeName(this, "textarea") || jq.nodeName(this, "input") )
     75                                if ( jq.nodeName(this, "textarea") || jq.nodeName(this, "input") ) {
    7476                                        jq(this).prop( 'disabled', false );
     77                                }
    7578                        });
    7679
     
    112115                        }
    113116
    114                         button.fadeOut(100, function(){ button.prop("disabled", false); });
     117                        jq("#whats-new-options").animate({height:'0px'});
     118                        jq("form#whats-new-form textarea").animate({height:'20px'});
     119                        jq("#aw-whats-new-submit").prop("disabled", true).removeClass('loading');
    115120                });
    116121
     
    214219                /* Delete activity stream items */
    215220                if ( target.hasClass('delete-activity') ) {
    216                         var li = target.parents('div.activity ul li');
    217                         var id = li.attr('id').substr( 9, li.attr('id').length );
     221                        var li        = target.parents('div.activity ul li');
     222                        var id        = li.attr('id').substr( 9, li.attr('id').length );
    218223                        var link_href = target.attr('href');
    219 
    220                         var nonce = link_href.split('_wpnonce=');
    221                                 nonce = nonce[1];
     224                        var nonce     = link_href.split('_wpnonce=');
     225
     226                        nonce = nonce[1];
    222227
    223228                        target.addClass('loading');
     
    230235                        },
    231236                        function(response) {
    232                                 target.removeClass('loading');
    233237
    234238                                if ( response[0] + response[1] == '-1' ) {
    235239                                        li.prepend( response.substr( 2, response.length ) );
    236                                         li.children('div#message').hide().fadeIn(200);
     240                                        li.children('div#message').hide().fadeIn(300);
    237241                                } else {
    238                                         li.slideUp(200);
     242                                        li.slideUp(300);
    239243                                }
    240244                        });
  • trunk/bp-themes/bp-default/functions.php

    r4861 r4884  
    135135 */
    136136function bp_dtheme_enqueue_scripts() {
    137         wp_enqueue_script( 'dtheme-ajax-js', get_template_directory_uri() . '/_inc/global.js', array( 'jquery' ), '20110723' );
     137       
     138        // Bump this when changes are made to bust cache
     139        $version = '20110727';
     140       
     141        // Enqueue the global JS - Ajax will not work without it
     142        wp_enqueue_script( 'dtheme-ajax-js', get_template_directory_uri() . '/_inc/global.js', array( 'jquery' ), $version );
    138143
    139144        // Add words that we need to use in JS to the end of the page so they can be translated and still used.
     
    163168function bp_dtheme_enqueue_styles() {
    164169
     170        // Bump this when changes are made to bust cache
     171        $version = '20110727';
     172       
    165173        // Default CSS
    166         wp_enqueue_style( 'bp-default-main',  get_template_directory_uri() . '/_inc/css/default.css', array(), '20110723' );
     174        wp_enqueue_style( 'bp-default-main', get_template_directory_uri() . '/_inc/css/default.css', array(), $version );
    167175
    168176        // Right to left CSS
    169177        if ( is_rtl() )
    170                 wp_enqueue_style( 'bp-default-main-rtl',  get_template_directory_uri() . '/_inc/css/default-rtl.css', array( 'bp-default-main' ), '20110723' );
     178                wp_enqueue_style( 'bp-default-main-rtl',  get_template_directory_uri() . '/_inc/css/default-rtl.css', array( 'bp-default-main' ), $version );
    171179}
    172180add_action( 'wp_print_styles', 'bp_dtheme_enqueue_styles' );
Note: See TracChangeset for help on using the changeset viewer.