WordPress.org

Making WordPress.org

Changeset 319


Ignore:
Timestamp:
01/26/2014 07:39:06 PM (6 years ago)
Author:
nacin
Message:

Trac: Point users to open new tickets when they comment on old tickets. fixes #296.

Location:
sites/trunk/wordpress.org/public_html/style/trac
Files:
2 edited

Legend:

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

    r318 r319  
    952952    height: 36px;
    953953    margin-left: 25px;
     954}
     955#main p.ticket-reopen-notice {
     956    margin: 1em 0 2em;
     957}
     958p.ticket-reopen-notice .dashicons {
     959    float: left;
     960    padding-right: 8px;
    954961}
    955962
  • sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js

    r316 r319  
    146146                });
    147147
     148                // Point users to open new tickets when they comment on old tickets.
     149                if ( $('#ticket').find('.milestone').hasClass('closed') ) {
     150                    var component = $('#field-component').val(), ticket_id = $('.trac-id').text(),
     151                        newticket = '/newticket?component=' + encodeURIComponent( component ) + '&description=' + encodeURIComponent( 'This is a follow-up to ' + ticket_id + '.' );
     152                    $('#trac-add-comment fieldset').prepend('<p class="ticket-reopen-notice"><span class="dashicons dashicons-info"></span> <strong>This ticket was closed on a completed milestone.</strong><br /> If you have a bug or enhancement to report, please <a href="' + newticket + '">open a new ticket</a>. Be sure to mention this ticket, ' + ticket_id + '.</p>');
     153                    if ( ! wpTrac.gardener ) {
     154                        $('#action_reopen').parent().remove();
     155                    }
     156                }
     157
    148158                // Rudimentary save alerts for new tickets (summary/description) and comments.
    149159                window.onbeforeunload = function() {
Note: See TracChangeset for help on using the changeset viewer.