WordPress.org

Making WordPress.org

Changeset 234


Ignore:
Timestamp:
01/08/2014 07:14:00 PM (7 years ago)
Author:
nacin
Message:

Trac/WP.org: Display updates for the notifications subscription page. see #127.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-notifications.php

    r230 r234  
    5757
    5858    function get_trac_milestones() {
     59        // Only shoe 3.8+, when this feature was launched.
    5960        return $this->trac->get_results( "SELECT name, completed FROM milestone
    60             WHERE name != 'WordPress.org' ORDER BY (completed = 0) DESC, name != 'MU 2.9.x' DESC, name DESC", OBJECT_K );
     61            WHERE name NOT IN ('WordPress.org', '3.5.3', '3.6.2', '3.7.2') AND (completed = 0 OR completed >= 1386864000000000)
     62            ORDER BY (completed = 0) DESC, name DESC", OBJECT_K );
    6163    }
    6264
     
    241243
    242244        <style>
     245        #components, #milestones, p.save-changes {
     246            clear: both;
     247        }
     248        #milestones, p.save-changes {
     249            padding-top: 1em;
     250        }
     251        #components li,
     252        #milestones li {
     253            float: left;
     254            width: 25%;
     255            list-style: none;
     256        }   
    243257        .completed-milestone {
    244             display: none;
     258            display: none !important;
    245259        }
    246260        .completed-milestone.checked,
    247261        #milestones.show-completed-milestones .completed-milestone {
    248             display: list-item;
     262            display: list-item !important;
    249263        }
    250264        </style>
    251265        <script>
    252266        jQuery(document).ready( function($) {
    253             $('#show-completed').on('click', function() {
    254                 $(this).hide();
     267            $('#show-completed').on('click', 'a', function() {
     268                $('#show-completed').hide();
    255269                $('#milestones').addClass( 'show-completed-milestones' );
     270                return false;
     271            });
     272            $('p.select-all').on('click', 'a', function() {
     273                $('#components').find('input[type=checkbox]').prop('checked', $(this).data('action') === 'select-all');
    256274                return false;
    257275            });
     
    263281        echo '<div id="components">';
    264282        echo '<h3>Components</h3>';
     283        echo '<p class="select-all"><a href="#" data-action="select-all">select all</a> &bull; <a href="#" data-action="clear-all">clear all</a></p>';
    265284        echo '<ul>';
    266285        foreach ( $components as $component ) {
     
    270289        echo '</ul>';
    271290        echo '</div>';
    272 
    273291        echo '<div id="milestones">';
    274292        echo '<h3>Milestones</h3>';
     
    286304            echo  '<li' . $class . '><label><input type="checkbox" ' . $checked . 'name="milestone[' . esc_attr( $milestone->name ) . ']" /> ' . $milestone->name . '</label></li>';
    287305        }
     306        echo '<li id="show-completed"><a href="#">Show recently completed&hellip;</a></li>';
    288307        echo '</ul>';
    289         echo '<a id="show-completed" href="#">Show all milestones</a>';
    290308        echo '</div>';
    291         echo '<p><input type="submit" value="Save Changes" /></p>';
     309        echo '<p class="save-changes"><input type="submit" value="Save Changes" /></p>';
    292310        echo '</form>';
    293311        return ob_get_clean();
Note: See TracChangeset for help on using the changeset viewer.