Skip to:
Content

BuddyPress.org

Changeset 9143


Ignore:
Timestamp:
11/14/2014 03:16:38 PM (10 years ago)
Author:
boonebgorges
Message:

Improve labeling and validation behavior of notifications Bulk Action dropdown.

Props lakrisgubben, hnla.
Fixes #5513.

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-notifications/bp-notifications-template.php

    r9132 r9143  
    10581058function bp_notifications_bulk_management_dropdown() {
    10591059    ?>
     1060    <label class="bp-screen-reader-text" for="notification-select"><?php _e( 'Select Bulk Action', 'buddypress' ); ?></label>
    10601061    <select name="notification_bulk_action" id="notification-select">
    10611062        <option value="" selected="selected"><?php _e( 'Bulk Actions', 'buddypress' ); ?></option>
  • trunk/src/bp-templates/bp-legacy/buddypress/members/single/notifications/notifications-loop.php

    r9132 r9143  
    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>
  • trunk/src/bp-templates/bp-legacy/css/buddypress.css

    r9132 r9143  
    729729    float: right;
    730730}
    731 #buddypress .standard-form #blog-details-section {
    732     clear: left;
    733 }
    734 #buddypress label[for="select-all-notifications"] {
    735     display: none;
    736 }
     731#buddypress .standard-form #blog-details-section,
    737732#buddypress #notifications-bulk-management {
    738733    clear: left;
    739734}
     735body.no-js #buddypress #notifications-bulk-management #select-all-notifications,
     736body.no-js #buddypress label[for="message-type-select"],
     737body.no-js #buddypress #message-type-select,
     738body.no-js #buddypress #delete_inbox_messages,
     739body.no-js #buddypress #delete_sentbox_messages,
    740740body.no-js #buddypress #notifications-bulk-management #select-all-notifications {
    741741    display: none;
     
    828828    padding: 0 10px 1px;
    829829}
     830
     831/* Form classes & generic attr styling */
     832#buddypress form *[disabled="disabled"]{
     833    cursor: default;
     834    opacity: .4;
     835 }
     836.bp-screen-reader-text {
     837    clip: rect(1px, 1px, 1px, 1px);
     838    position: absolute;
     839}
     840
    830841/*--------------------------------------------------------------
    8318423.6 - Ajax Loading
     
    872883#buddypress input[type="button"].disabled,
    873884#buddypress input[type="reset"].disabled,
     885#buddypress input[type="submit"][disabled=disabled],
    874886#buddypress button.pending,
    875887#buddypress button.disabled,
  • trunk/src/bp-templates/bp-legacy/js/buddypress.js

    r9132 r9143  
    15371537            });
    15381538        }
     1539    });
     1540
     1541    /* Make sure a 'Bulk Action' is selected before submiting the form */
     1542    jq('#notification-bulk-manage').attr('disabled', 'disabled');
     1543
     1544    /* Remove the disabled attribute from the form submit button when bulk action has a value */
     1545    jq('#notification-select').on('change', function(){
     1546        jq('#notification-bulk-manage').attr('disabled', jq(this).val().length <= 0);
    15391547    });
    15401548
Note: See TracChangeset for help on using the changeset viewer.