Changeset 11570
- Timestamp:
- 02/17/2022 07:14:23 AM (3 years ago)
- Location:
- sites/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/trac.wordpress.org/templates/site.html
r11565 r11570 5 5 6 6 <?python 7 scripts_version = '16 2'7 scripts_version = '163' 8 8 project_slug = req.environ['HTTP_HOST'].split(':')[0].split('.')[0] 9 9 wporg_endpoint = 'https://make.wordpress.org/' + project_slug + '/' -
sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js
r11544 r11570 1987 1987 if ( ! noticeDiv ) { 1988 1988 noticeDiv = $( '<div id="componentSuggest"/>' ).insertBefore( $( '.buttons').first() ); 1989 1990 noticeDiv.on( 'click', 'a.component', function(e) { 1991 e.preventDefault(); 1992 const component = $(this).text(); 1993 1994 $( `#field-component option[value="${component}"]` ).prop( 'selected', 'selected' ).change(); 1995 } ); 1989 1996 } 1990 1997 noticeDiv.html( getNoticeHTML( matchingComponents ) ); … … 2004 2011 2005 2012 if ( hasMatches ) { 2006 template.append( $('<ul/>' ) ); 2007 ulList = template.find('ul'); 2008 2009 ulList.on( 'click', 'a', function(e) { 2010 e.preventDefault(); 2011 const component = $(this).text(); 2012 2013 $( `#field-component option[value="${component}"]` ).prop( 'selected', 'selected' ).change(); 2013 ulList = $('<ul/>' ); 2014 2015 matchingComponents.forEach( (component) => { 2016 ulList.append( $( `<li><a href="#" class="component">${component}</a></li>` ) ); 2014 2017 } ); 2015 2016 matchingComponents.forEach( (component) => { 2017 ulList.append( $( `<li><a href="#">${component}</a></li>` ) ); 2018 } ); 2018 template.append( ulList ); 2019 2019 } 2020 2020
Note: See TracChangeset
for help on using the changeset viewer.