Making WordPress.org

Changeset 175


Ignore:
Timestamp:
12/27/2013 08:51:53 PM (13 years ago)
Author:
nacin
Message:

Trac: Add a 'Show only commits/attachments' view option for tickets.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js

    r166 r175  
    7676                        }
    7777
     78                        // Add a 'Show only commits/attachments' view option to tickets
     79                        $('label[for="trac-comments-only-toggle"]').text('Show only comment text');
     80                        $'form#prefs')
     81                                .has('#trac-comments-order')
     82                                        .append('<div><input type="checkbox" id="wp-trac-commits-only" /> <label for="wp-trac-commits-only">Show only commits/attachments</label></div>');
     83                        $('#wp-trac-commits-only').change( function() {
     84                                if ( ! this.checked ) {
     85                                        $('div.change').show();
     86                                        return;
     87                                }
     88                                $('div.change')
     89                                        .hide()
     90                                                // Best we can do to target a
     91                                                .has('.comment p a.changeset')
     92                                                        .has('.comment div.message p a.ticket')
     93                                                        .show()
     94                                                .end()
     95                                        .end()
     96                                        .has('li.trac-field-attachment')
     97                                        .show();
     98                        });
     99
     100                        // Start of Keywords manipulation.
    78101                        wpTrac.hiddenEl = $('#field-keywords');
    79102                        if ( ! wpTrac.hiddenEl.length )
Note: See TracChangeset for help on using the changeset viewer.