Skip to:
Content

BuddyPress.org

Ticket #5513: bulk_notifications_management.4.diff

File bulk_notifications_management.4.diff, 3.1 KB (added by lakrisgubben, 10 years ago)
  • src/bp-notifications/bp-notifications-template.php

    diff --git src/bp-notifications/bp-notifications-template.php src/bp-notifications/bp-notifications-template.php
    index 1caf8a1..02b0f9f 100644
    function bp_notifications_sort_order_form() { 
    10571057 */
    10581058function bp_notifications_bulk_management_dropdown() {
    10591059        ?>
     1060        <label class="bp-screen-reader-text" for="notification-select"><?php _e( 'Bulk Actions', 'buddypress' ); ?></label>
    10601061        <select name="notification_bulk_action" id="notification-select">
    10611062                <option value="" selected="selected"><?php _e( 'Bulk Actions', 'buddypress' ); ?></option>
    10621063
  • src/bp-templates/bp-legacy/buddypress/members/single/notifications/notifications-loop.php

    diff --git src/bp-templates/bp-legacy/buddypress/members/single/notifications/notifications-loop.php src/bp-templates/bp-legacy/buddypress/members/single/notifications/notifications-loop.php
    index 7647d7d..90e4d52 100644
     
    33                <thead>
    44                        <tr>
    55                                <th class="icon"></th>
    6                                 <th><label for="select-all-notifications"><?php _e( 'Select all', 'buddypress' ); ?></label><input id="select-all-notifications" type="checkbox"></th>
     6                                <th><label class="bp-screen-reader-text" for="select-all-notifications"><?php _e( 'Select all', 'buddypress' ); ?></label><input id="select-all-notifications" type="checkbox"></th>
    77                                <th class="title"><?php _e( 'Notification', 'buddypress' ); ?></th>
    88                                <th class="date"><?php _e( 'Date Received', 'buddypress' ); ?></th>
    99                                <th class="actions"><?php _e( 'Actions',    'buddypress' ); ?></th>
  • src/bp-templates/bp-legacy/css/buddypress.css

    diff --git src/bp-templates/bp-legacy/css/buddypress.css src/bp-templates/bp-legacy/css/buddypress.css
    index 539da68..8674926 100644
    body.activity-permalink #buddypress div.activity-comments div.acomment-content { 
    731731#buddypress .standard-form #blog-details-section {
    732732        clear: left;
    733733}
    734 #buddypress label[for="select-all-notifications"] {
    735         display: none;
    736 }
    737734#buddypress #notifications-bulk-management {
    738735        clear: left;
    739736}
  • src/bp-templates/bp-legacy/js/buddypress.js

    diff --git src/bp-templates/bp-legacy/js/buddypress.js src/bp-templates/bp-legacy/js/buddypress.js
    index 3cf551b..5f71204 100644
    jq(document).ready( function() { 
    15381538                }
    15391539        });
    15401540
     1541        /* Make sure a 'Bulk Action' is choosed before submiting the form */
     1542        jq('#notifications-bulk-management').on('submit', function(){
     1543                if ( jq(this).find('#notification-select').val() === '' ) {
     1544                        jq('#notification-bulk-manage').attr('disabled', 'disabled');
     1545                        return false;
     1546                }
     1547        });
     1548
     1549        /* Remove the disabled attribute from the form submit button when bulk action has a value */
     1550        jq('#notification-select').on('change', function(){
     1551                if ( jq(this).val() !== '' ) {
     1552                        jq('#notification-bulk-manage').removeAttr('disabled');
     1553                }
     1554        });
     1555
    15411556        /* Close site wide notices in the sidebar */
    15421557        jq('#close-notice').on( 'click', function() {
    15431558                jq(this).addClass('loading');