Changeset 12684
- Timestamp:
- 07/03/2023 04:47:25 AM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/js/page-stats.js
r12669 r12684 120 120 if ( 'versions' === sort ) { 121 121 tableData.sort( function ( a, b ) { 122 return a[0] - b[0]; 122 /* 123 * Converts a string such as 'Example 1.1' to '1.01', or 'Example 10.10' to '10.10'. 124 * 125 * This allows for MariaDB 10.10 to appear beside 10.9. 126 */ 127 var a_version = a[0].replace( /[^0-9.]/g, '' ).replace( /\.(\d{1})$/g, '.0$1' ), 128 b_version = b[0].replace( /[^0-9.]/g, '' ).replace( /\.(\d{1})$/g, '.0$1' ); 129 130 return b_version - a_version; 123 131 } ); 124 tableData.reverse();125 132 } else if ( 'alphabeticaly' === sort ) { 126 133 tableData.sort(); … … 225 232 color: '#444' 226 233 }, 227 showColorCode: true 234 showColorCode: true, 235 trigger: 'selection' 228 236 } 229 237 }; … … 238 246 chart.setOptions( chartOptions ); 239 247 chart.draw(); 248 249 google.visualization.events.addListener( 250 chart.getChart(), 251 'onmouseover', 252 ( entry ) => chart.getChart().setSelection( [ { row: entry.row } ] ) 253 ); 254 255 google.visualization.events.addListener( 256 chart.getChart(), 257 'onmouseout', 258 ( entry ) => chart.getChart().setSelection( [] ) 259 ); 240 260 } 241 261 } )( window.jQuery, window.google, window.wporgPageStats );
Note: See TracChangeset
for help on using the changeset viewer.