Making WordPress.org

Changeset 10266


Ignore:
Timestamp:
09/16/2020 06:02:02 AM (5 years ago)
Author:
dd32
Message:

Trac: Make the whole text of ticket actions clickable.

Trac templates only have the first word of the action clickable, for example: <label>close</label> as fixed
This simply moves the following text node (as fixed) into the label contents, avoiding selecting the following <input> and <span>.

Location:
sites/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/trac.wordpress.org/templates/site.html

    r10265 r10266  
    55
    66<?python
    7     scripts_version = '146'
     7    scripts_version = '147'
    88    project_slug = req.environ['HTTP_HOST'].split(':')[0].split('.')[0]
    99    wporg_endpoint = 'https://make.wordpress.org/' + project_slug + '/'
  • sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js

    r10156 r10266  
    355355                    }
    356356                });
     357
     358                // Move all of the ticket actions text into the label.
     359                // Trac markup is like this: `<label>close</label> as fixed`
     360                jQuery('#action div label' ).each( function() {
     361                    if ( this.nextSibling && Node.TEXT_NODE === this.nextSibling.nodeType ) {
     362                        this.textContent += this.nextSibling.nodeValue;
     363                        this.nextSibling.nodeValue = '';
     364                    }
     365                } );
    357366
    358367                // Point users to open new tickets when they comment on old tickets.
Note: See TracChangeset for help on using the changeset viewer.