Ticket #7711: 7711-2.patch
File 7711-2.patch, 6.6 KB (added by , 7 years ago) |
---|
-
src/bp-templates/bp-nouveau/common-styles/_bp-mixins.scss
147 147 // Convenience helper to add hide properties to rulesets 148 148 149 149 @mixin hide() { 150 height: 0; 151 left: -999em; 152 overflow: hidden; 153 position: absolute; 154 top: -999em; 150 display: none; 155 151 } 156 152 157 153 // companion mixins properties for showing the element for :focus/:hover -
src/bp-templates/bp-nouveau/common-styles/_bp_search.scss
54 54 } 55 55 } 56 56 57 // For non no-js we'll add back in show() further down.58 button[type="submit"] {59 60 @include hide();61 }62 63 57 button[type="submit"].bp-show { 64 58 65 59 @include show(); -
src/bp-templates/bp-nouveau/css/buddypress-rtl.css
3569 3569 line-height: 1.6; 3570 3570 } 3571 3571 3572 .buddypress-wrap form.bp-dir-search-form button[type="submit"],3573 .buddypress-wrap form.bp-messages-search-form button[type="submit"],3574 .buddypress-wrap form.bp-invites-search-form button[type="submit"] {3575 height: 0;3576 right: -999em;3577 overflow: hidden;3578 position: absolute;3579 top: -999em;3580 }3581 3582 3572 .buddypress-wrap form.bp-dir-search-form button[type="submit"].bp-show, 3583 3573 .buddypress-wrap form.bp-messages-search-form button[type="submit"].bp-show, 3584 3574 .buddypress-wrap form.bp-invites-search-form button[type="submit"].bp-show { … … 3814 3804 } 3815 3805 3816 3806 .bp-hide { 3817 height: 0; 3818 right: -999em; 3819 overflow: hidden; 3820 position: absolute; 3821 top: -999em; 3807 display: none; 3822 3808 } 3823 3809 3824 3810 .bp-show { -
src/bp-templates/bp-nouveau/css/buddypress.css
3569 3569 line-height: 1.6; 3570 3570 } 3571 3571 3572 .buddypress-wrap form.bp-dir-search-form button[type="submit"],3573 .buddypress-wrap form.bp-messages-search-form button[type="submit"],3574 .buddypress-wrap form.bp-invites-search-form button[type="submit"] {3575 height: 0;3576 left: -999em;3577 overflow: hidden;3578 position: absolute;3579 top: -999em;3580 }3581 3582 3572 .buddypress-wrap form.bp-dir-search-form button[type="submit"].bp-show, 3583 3573 .buddypress-wrap form.bp-messages-search-form button[type="submit"].bp-show, 3584 3574 .buddypress-wrap form.bp-invites-search-form button[type="submit"].bp-show { … … 3814 3804 } 3815 3805 3816 3806 .bp-hide { 3817 height: 0; 3818 left: -999em; 3819 overflow: hidden; 3820 position: absolute; 3821 top: -999em; 3807 display: none; 3822 3808 } 3823 3809 3824 3810 .bp-show { -
src/bp-templates/bp-nouveau/js/buddypress-group-invites.js
489 489 template: bp.template( 'bp-invites-filters' ), 490 490 491 491 events : { 492 'focus #group_invites_search' : 'displaySrcBtn',493 'blur #group_invites_search' : 'hideSrcBtn',494 492 'search #group_invites_search' : 'resetSearchTerms', 495 493 'submit #group_invites_search_form' : 'setSearchTerms', 496 494 'click #bp-invites-next-page' : 'nextPage', … … 530 528 bp.Nouveau.GroupInvites.displayFeedback( response.feedback, 'error' ); 531 529 }, 532 530 533 displaySrcBtn: function( event ) {534 event.preventDefault();535 536 $( event.target ).closest( 'form' ).find( '[type=submit]' ).addClass('bp-show');537 },538 539 hideSrcBtn: function( event ) {540 event.preventDefault();541 542 if ( $( event.target ).val() ) {543 return;544 }545 546 $( event.target ).closest( 'form' ).find( '[type=submit]' ).addClass('bp-hide').removeClass('bp-show');547 },548 549 531 resetSearchTerms: function( event ) { 550 532 event.preventDefault(); 551 533 -
src/bp-templates/bp-nouveau/js/buddypress-messages.js
1007 1007 template: bp.template( 'bp-messages-filters' ), 1008 1008 1009 1009 events : { 1010 'focus #user_messages_search' : 'displaySrcBtn',1011 'blur #user_messages_search' : 'hideSrcBtn',1012 1010 'search #user_messages_search' : 'resetSearchTerms', 1013 1011 'submit #user_messages_search_form' : 'setSearchTerms', 1014 1012 'click #bp-messages-next-page' : 'nextPage', … … 1056 1054 bp.Nouveau.Messages.displayFeedback( response.feedback, response.type ); 1057 1055 }, 1058 1056 1059 displaySrcBtn: function( event ) {1060 event.preventDefault();1061 1062 $( event.target ).closest( 'form' ).find( '[type=submit]' ).addClass('bp-show').removeClass('bp-hide');1063 },1064 1065 hideSrcBtn: function( event ) {1066 event.preventDefault();1067 1068 if ( $( event.target ).val() ) {1069 return;1070 }1071 1072 $( event.target ).closest( 'form' ).find( '[type=submit]' ).addClass('bp-hide').removeClass('bp-show');1073 },1074 1075 1057 resetSearchTerms: function( event ) { 1076 1058 event.preventDefault(); 1077 1059 -
src/bp-templates/bp-nouveau/js/buddypress-nouveau.js
487 487 488 488 // Searching 489 489 $( '#buddypress [data-bp-search]' ).on( 'submit', 'form', this, this.searchQuery ); 490 $( '#buddypress [data-bp-search]' ).on( 'focus', 'input[type=search]', this.showSearchSubmit );491 $( '#buddypress [data-bp-search]' ).on( 'blur', 'input[type=search]', this.hideSearchSubmit );492 490 $( '#buddypress [data-bp-search] form' ).on( 'search', 'input[type=search]', this.resetSearch ); 493 491 494 492 // Buttons … … 674 672 }, 675 673 676 674 /** 677 * [hideSearchSubmit description]678 * @param {[type]} event [description]679 * @return {[type]} [description]680 */681 hideSearchSubmit: function( event ) {682 if ( ! $( event.target ).val() ) {683 $( event.delegateTarget ).find( '[type=submit]' ).addClass('bp-hide').removeClass('bp-show');684 }685 },686 687 /**688 675 * [resetSearch description] 689 676 * @param {[type]} event [description] 690 677 * @return {[type]} [description]