Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/02/2018 05:25:24 PM (8 years ago)
Author:
imath
Message:

BP Nouveau: add interactivity to starring buttons in single Messages

  • Make sure the BP Tooltip is displayed
  • Toggle the color of the star when starring unstarring
  • Move the feedback messages over the threads

Props mercime

Fixes #7723

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/buddypress/common/js-templates/messages/index.php

    r12036 r12041  
    1010?>
    1111<div class="subnav-filters filters user-subnav bp-messages-filters" id="subsubnav"></div>
     12
     13<div class="bp-messages-feedback"></div>
    1214<div class="bp-messages-content"></div>
    13 <div class="bp-messages-feedback"></div>
    1415
    1516<script type="text/html" id="tmpl-bp-messages-form">
     
    229230            <# if ( undefined !== data.star_link ) { #>
    230231
    231                 <?php $test = 1; ?>
    232 
    233                 <# if ( false !== data.is_starred ) { #>
    234                     <button type="button" class="message-action-unstar bp-tooltip bp-icons" data-bp-star-link="{{data.star_link}}" data-bp-action="unstar" data-bp-tooltip="<?php esc_attr_e( 'Unstar Message', 'buddypress' ); ?>">
    235                         <span class="bp-screen-reader-text"><?php esc_html_e( 'Unstar Message', 'buddypress' ); ?></span>
    236                     </button>
    237                 <# } else { #>
    238                     <button type="button" class="message-action-star bp-tooltip bp-icons" data-bp-star-link="{{data.star_link}}" data-bp-action="star" data-bp-tooltip="<?php esc_attr_e( 'Star Message', 'buddypress' ); ?>">
    239                         <span class="bp-screen-reader-text"><?php esc_html_e( 'Star Message', 'buddypress' ); ?></span>
    240                     </button>
    241                 <# } #>
     232                <button type="button" class="message-action-unstar bp-tooltip bp-icons <# if ( false === data.is_starred ) { #>bp-hide<# } #>" data-bp-star-link="{{data.star_link}}" data-bp-action="unstar" data-bp-tooltip="<?php esc_attr_e( 'Unstar Message', 'buddypress' ); ?>">
     233                    <span class="bp-screen-reader-text"><?php esc_html_e( 'Unstar Message', 'buddypress' ); ?></span>
     234                </button>
     235
     236                <button type="button" class="message-action-star bp-tooltip bp-icons <# if ( false !== data.is_starred ) { #>bp-hide<# } #>" data-bp-star-link="{{data.star_link}}" data-bp-action="star" data-bp-tooltip="<?php esc_attr_e( 'Star Message', 'buddypress' ); ?>">
     237                    <span class="bp-screen-reader-text"><?php esc_html_e( 'Star Message', 'buddypress' ); ?></span>
     238                </button>
    242239
    243240            <# } #>
Note: See TracChangeset for help on using the changeset viewer.