Skip to:
Content

BuddyPress.org

Ticket #6122: 6122-01.patch

File 6122-01.patch, 2.5 KB (added by hnla, 10 years ago)
  • src/bp-templates/bp-legacy/js/buddypress.js

     
    3333                var $member_nicename = $whats_new.val();
    3434
    3535                jq('#whats-new-options').animate({
    36                         height:'40px'
     36                        minHeight:'40px'
    3737                });
    3838
    3939                $whats_new.animate({
    40                         height:'50px'
     40                        minHeight:'50px'
    4141                });
    4242
    4343                jq.scrollTo( $whats_new, 500, {
     
    5050
    5151        /**** Activity Posting ********************************************************/
    5252
     53        // Set a class of 'hide' on initial #whats-new-options element
     54        jq('#whats-new-options').addClass('whats-new-hide');
     55
    5356        /* Textarea focus */
    5457        $whats_new.focus( function(){
     58
     59                // Add a class for focussed state of textarea
     60                $whats_new.addClass('whats-new-has-focus');
     61
    5562                jq('#whats-new-options').animate({
    56                         height:'40px'
     63                        minHeight: '40px'
    5764                });
    5865                jq('#whats-new-form textarea').animate({
    59                         height:'50px'
     66                        minHeight: '50px'
    6067                });
    6168                jq('#aw-whats-new-submit').prop('disabled', false);
     69                jq('#whats-new-options').addClass('whats-new-show').removeClass('whats-new-hide');
    6270
    6371                var $whats_new_form = jq('form#whats-new-form'),
    6472                        $activity_all = jq( '#activity-all' );
     
    8795                        if (!this.value.match(/\S+/)) {
    8896                                this.value = '';
    8997                                jq('#whats-new-options').animate({
    90                                         height:'40px'
     98                                        minHeight: ''
    9199                                });
    92100                                jq('form#whats-new-form textarea').animate({
    93                                         height:'20px'
     101                                        minHeight: '20px'
    94102                                });
     103                                $whats_new.removeClass('whats-new-has-focus');
    95104                                jq('#aw-whats-new-submit').prop('disabled', true);
     105                                jq('#whats-new-options').removeClass('whats-new-show').addClass('whats-new-hide');
    96106                        }
    97107                }
    98108        });
     
    13661376                var target = jq(event.target),
    13671377                        object;
    13681378
    1369                 if ( target.attr('type') === 'submit' ) {
     1379                if ( target.attr('type') === 'submit' || target.attr('type') === 'button' ) {
    13701380                        //var css_id = jq('.item-list-tabs li.selected').attr('id').split( '-' );
    13711381                        object = 'messages';
    13721382
    1373                         bp_filter_request( object, jq.cookie('bp-' + object + '-filter'), jq.cookie('bp-' + object + '-scope') , 'div.' + object, target.parent().children('label').children('input').val(), 1, jq.cookie('bp-' + object + '-extras') );
     1383                        bp_filter_request( object, jq.cookie('bp-' + object + '-filter'), jq.cookie('bp-' + object + '-scope') , 'div.' + object, jq('#messages_search').val(), 1, jq.cookie('bp-' + object + '-extras') );
    13741384
    13751385                        return false;
    13761386                }