Skip to:
Content

BuddyPress.org

Ticket #5513: bulk_notifications_management.6.diff

File bulk_notifications_management.6.diff, 4.8 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..92ba8ba 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( 'Select 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..293fe67 100644
    body.activity-permalink #buddypress div.activity-comments div.acomment-content { 
    728728#buddypress .standard-form #profile-details-section {
    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;
    742742}
    a.bp-title-button { 
    827827#buddypress .wp-editor-wrap input[type=reset] {
    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
    832843--------------------------------------------------------------*/
    a.bp-title-button { 
    871882#buddypress input[type="submit"].disabled,
    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,
    876888#buddypress div.pending a,
    a.bp-title-button { 
    885897#buddypress input[type="submit"]:hover.disabled,
    886898#buddypress input[type="button"]:hover.disabled,
    887899#buddypress input[type="reset"]:hover.disabled,
     900#buddypress input[type="submit"][disabled=disabled]:hover,
     901#buddypress form input[type=submit][disabled="disabled"]:focus,
    888902#buddypress button.pending:hover,
    889903#buddypress button.disabled:hover,
    890904#buddypress div.pending a:hover,
    891905#buddypress a.disabled:hover {
    892906        border-color: #eee;
    893     color: #bbb;
     907        color: #bbb;
    894908}
    895909
    896910/*--------------------------------------------------------------
  • 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..b8822c5 100644
    jq(document).ready( function() { 
    15381538                }
    15391539        });
    15401540
     1541        /* Make sure a 'Bulk Action' is choosed before submiting the form */
     1542        jq('#notification-bulk-manage').attr('disabled', 'disabled');
     1543
     1544
     1545        /* Remove the disabled attribute from the form submit button when bulk action has a value */
     1546        jq('#notification-select').on('change', function(){
     1547                jq('#notification-bulk-manage').attr('disabled', jq(this).val().length <= 0);
     1548        });
     1549
    15411550        /* Close site wide notices in the sidebar */
    15421551        jq('#close-notice').on( 'click', function() {
    15431552                jq(this).addClass('loading');