Changeset 11906
- Timestamp:
- 03/21/2018 03:01:04 PM (6 years ago)
- Location:
- trunk/src/bp-templates/bp-nouveau
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/common-styles/_bp-mixins.scss
r11755 r11906 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 -
trunk/src/bp-templates/bp-nouveau/common-styles/_bp_search.scss
r11686 r11906 53 53 line-height: 1.6; 54 54 } 55 }56 57 // For non no-js we'll add back in show() further down.58 button[type="submit"] {59 60 @include hide();61 55 } 62 56 -
trunk/src/bp-templates/bp-nouveau/css/buddypress-rtl.css
r11905 r11906 3574 3574 } 3575 3575 3576 .buddypress-wrap form.bp-dir-search-form button[type="submit"],3577 .buddypress-wrap form.bp-messages-search-form button[type="submit"],3578 .buddypress-wrap form.bp-invites-search-form button[type="submit"] {3579 height: 0;3580 right: -999em;3581 overflow: hidden;3582 position: absolute;3583 top: -999em;3584 }3585 3586 3576 .buddypress-wrap form.bp-dir-search-form button[type="submit"].bp-show, 3587 3577 .buddypress-wrap form.bp-messages-search-form button[type="submit"].bp-show, … … 3819 3809 3820 3810 .bp-hide { 3821 height: 0; 3822 right: -999em; 3823 overflow: hidden; 3824 position: absolute; 3825 top: -999em; 3811 display: none; 3826 3812 } 3827 3813 -
trunk/src/bp-templates/bp-nouveau/css/buddypress.css
r11905 r11906 3574 3574 } 3575 3575 3576 .buddypress-wrap form.bp-dir-search-form button[type="submit"],3577 .buddypress-wrap form.bp-messages-search-form button[type="submit"],3578 .buddypress-wrap form.bp-invites-search-form button[type="submit"] {3579 height: 0;3580 left: -999em;3581 overflow: hidden;3582 position: absolute;3583 top: -999em;3584 }3585 3586 3576 .buddypress-wrap form.bp-dir-search-form button[type="submit"].bp-show, 3587 3577 .buddypress-wrap form.bp-messages-search-form button[type="submit"].bp-show, … … 3819 3809 3820 3810 .bp-hide { 3821 height: 0; 3822 left: -999em; 3823 overflow: hidden; 3824 position: absolute; 3825 top: -999em; 3811 display: none; 3826 3812 } 3827 3813 -
trunk/src/bp-templates/bp-nouveau/js/buddypress-group-invites.js
r11810 r11906 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', … … 529 527 usersFilterError: function( collection, response ) { 530 528 bp.Nouveau.GroupInvites.displayFeedback( response.feedback, 'error' ); 531 },532 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 529 }, 548 530 -
trunk/src/bp-templates/bp-nouveau/js/buddypress-messages.js
r11900 r11906 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', … … 1055 1053 threadsFilterError: function( collection, response ) { 1056 1054 bp.Nouveau.Messages.displayFeedback( response.feedback, response.type ); 1057 },1058 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 1055 }, 1074 1056 -
trunk/src/bp-templates/bp-nouveau/js/buddypress-nouveau.js
r11876 r11906 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 … … 671 669 if( $('[type=submit]').hasClass( 'bp-hide' ) ) { 672 670 $( '[type=submit]' ).removeClass( 'bp-hide' ); 673 }674 },675 676 /**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 671 } 685 672 },
Note: See TracChangeset
for help on using the changeset viewer.