Changeset 12057
- Timestamp:
- 05/05/2018 04:59:09 AM (6 years ago)
- Location:
- trunk/src/bp-templates/bp-nouveau
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/buddypress/common/js-templates/invites/index.php
r12054 r12057 66 66 <div class="action"> 67 67 <# if ( undefined === data.is_sent || ( false === data.is_sent && true === data.can_edit ) ) { #> 68 <button type="button" class="button invite-button group-add-remove-invite-button bp-tooltip bp-icons " data-bp-tooltip="<?php esc_attr_e( 'Invite / Uninvite', 'buddypress' ); ?>">68 <button type="button" class="button invite-button group-add-remove-invite-button bp-tooltip bp-icons<# if ( data.selected ) { #> selected<# } #>" data-bp-tooltip="<# if ( data.selected ) { #><?php esc_attr_e( 'Disinvite', 'buddypress' ); ?><# } else { #><?php esc_attr_e( 'Invite', 'buddypress' ); ?><# } #>"> 69 69 <span class="icons" aria-hidden="true"></span> 70 <span class="bp-screen-reader-text"><?php esc_html_e( 'Invite/Uninvite', 'buddypress' ); ?></span> 70 <span class="bp-screen-reader-text"> 71 <# if ( data.selected ) { #> 72 <?php esc_html_e( 'Disinvite', 'buddypress' ); ?> 73 <# } else { #> 74 <?php esc_html_e( 'Invite', 'buddypress' ); ?> 75 <# } #> 76 </span> 71 77 </button> 72 78 <# } #> 73 79 74 80 <# if ( undefined !== data.can_edit && true === data.can_edit ) { #> 75 <button type="button" class="button invite-button group-remove-invite-button bp-tooltip bp-icons" data-bp-tooltip="<?php esc_attr_e( ' Remove', 'buddypress' ); ?>">81 <button type="button" class="button invite-button group-remove-invite-button bp-tooltip bp-icons" data-bp-tooltip="<?php esc_attr_e( 'Disinvite', 'buddypress' ); ?>"> 76 82 <span class=" icons" aria-hidden="true"></span> 77 <span class="bp-screen-reader-text"><?php esc_html_e( ' Remove', 'buddypress' ); ?></span>83 <span class="bp-screen-reader-text"><?php esc_html_e( 'Disinvite', 'buddypress' ); ?></span> 78 84 </button> 79 85 <# } #> -
trunk/src/bp-templates/bp-nouveau/js/buddypress-group-invites.js
r12032 r12057 622 622 623 623 if ( invite ) { 624 this.model.set( 'selected', true, { silent: true } ); 625 } 626 }, 627 628 render: function() { 629 if ( this.model.get( 'selected' ) ) { 624 630 this.el.className = 'selected'; 625 this.model.set( 'selected', true, { silent: true } ); 626 } 631 } else { 632 this.el.className = ''; 633 } 634 635 bp.Nouveau.GroupInvites.View.prototype.render.apply( this, arguments ); 627 636 }, 628 637 … … 634 643 if ( false === selected ) { 635 644 this.model.set( 'selected', true ); 636 637 // Set the selected class638 $( this.el ).addClass( 'selected' );639 645 } else { 640 646 this.model.set( 'selected', false ); 641 647 642 // Set the selected class643 $( this.el ).removeClass( 'selected' );644 645 648 if ( ! bp.Nouveau.GroupInvites.invites.length ) { 646 649 bp.Nouveau.GroupInvites.invites.reset(); 647 650 } 648 651 } 652 653 // Rerender to update buttons. 654 this.render(); 649 655 }, 650 656
Note: See TracChangeset
for help on using the changeset viewer.