Skip to:
Content

BuddyPress.org

Changeset 4814


Ignore:
Timestamp:
07/23/2011 02:17:43 PM (14 years ago)
Author:
djpaul
Message:

Remove hidden delay from posting to the activity stream, and tweak behaviour of the "what's up" form when posting. Fixes #3165. See also #3360

Location:
trunk/bp-themes/bp-default/_inc
Files:
2 edited

Legend:

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

    r4813 r4814  
    10901090    overflow: auto;
    10911091}
    1092 
     1092#aw-whats-new-submit {
     1093    display: none;
     1094}
     1095#whats-new:focus {
     1096    border-color: rgba(31, 179, 221, 0.9) !important;
     1097    outline-color: rgba(31, 179, 221, 0.9);
     1098    box-shadow: 0 0 7px         rgba(31, 179, 221, 0.7);
     1099    -moz-box-shadow: 0 0 7px    rgba(31, 179, 221, 0.7);
     1100    -webkit-box-shadow: 0 0 7px rgba(31, 179, 221, 0.7);
     1101}
    10931102
    10941103/*--------------------------------------------------------------
     
    15401549    width: 90%;
    15411550}
     1551input[type="submit"].pending,
     1552input[type="button"].pending,
     1553input[type="reset"].pending,
     1554input[type="submit"].disabled,
     1555input[type="button"].disabled,
     1556input[type="reset"].disabled,
    15421557button.pending,
    15431558button.disabled,
     
    15481563    cursor: default;
    15491564}
     1565input[type="submit"]:hover.pending,
     1566input[type="button"]:hover.pending,
     1567input[type="reset"]:hover.pending,
     1568input[type="submit"]:hover.disabled,
     1569input[type="button"]:hover.disabled,
     1570input[type="reset"]:hover.disabled,
    15501571button.pending:hover,
    15511572button.disabled:hover,
  • trunk/bp-themes/bp-default/_inc/global.js

    r4809 r4814  
    2222
    2323    /* @mention Compose Scrolling */
    24     if ( jq.query.get('r') ) {
    25         if ( jq('textarea#whats-new').length ) {
    26             jq.scrollTo( jq('textarea#whats-new'), 500, { offset:-125, easing:'easeOutQuad' } );
    27             jq('textarea#whats-new').focus();
    28         }
     24    if ( jq.query.get('r') && jq('textarea#whats-new').length ) {
     25        jq.scrollTo( jq('textarea#whats-new'), 500, { offset:-125, easing:'easeOutQuad' } );
     26        jq('textarea#whats-new').focus();
    2927    }
    3028
    3129    /**** Activity Posting ********************************************************/
     30
     31    /* Textarea focus */
     32    jq('#whats-new').focus( function(){ jq("#aw-whats-new-submit").fadeIn(300); });
    3233
    3334    /* New posts */
     
    7778                form.prepend( response.substr( 2, response.length ) );
    7879                jq( 'form#' + form.attr('id') + ' div.error').hide().fadeIn( 200 );
    79                 button.prop("disabled", false);
    8080            } else {
    8181                if ( 0 == jq("ul.activity-list").length ) {
     
    109109                jq("li.new-update").removeClass( 'new-update' );
    110110                jq("textarea#whats-new").val('');
    111 
    112                 /* Re-enable the submit button after 8 seconds. */
    113                 setTimeout( function() { button.prop("disabled", false); }, 8000 );
    114             }
     111            }
     112
     113            button.fadeOut(100, function(){ button.prop("disabled", false); });
    115114        });
    116115
     
    360359            /* Hide any error messages */
    361360            jq( 'form#' + form + ' div.error').hide();
    362             target.addClass('loading');
    363             target.prop('disabled', true);
     361            target.addClass('loading').prop('disabled', true);
    364362
    365363            jq.post( ajaxurl, {
     
    398396                    /* Increase the "Reply (X)" button count */
    399397                    jq('li#activity-' + form_id[2] + ' a.acomment-reply span').html( Number( jq('li#activity-' + form_id[2] + ' a.acomment-reply span').html() ) + 1 );
    400 
    401                     /* Re-enable the submit button after 5 seconds. */
    402                     setTimeout( function() { target.prop("disabled", false); }, 5000 );
    403398                }
     399
     400                target.fadeOut(100, function(){ target.prop("disabled", false); });
    404401            });
    405402
Note: See TracChangeset for help on using the changeset viewer.