Making WordPress.org

Changeset 9618


Ignore:
Timestamp:
03/22/2020 02:38:42 PM (5 years ago)
Author:
ocean90
Message:

Translate: Add sorting indicators to stats tables.

Fixes #4191.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/projects-wp-plugins.php

    r8557 r9618  
    130130jQuery( function( $ ) {
    131131    $( '#stats-table' ).tablesorter( {
     132        theme: 'wporg-translate',
    132133        textExtraction: function( node ) {
    133134            var cellValue = $( node ).text(),
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/projects-wp-themes.php

    r8498 r9618  
    121121jQuery( function( $ ) {
    122122    $( '#stats-table' ).tablesorter( {
     123        theme: 'wporg-translate',
    123124        textExtraction: function( node ) {
    124125            var cellValue = $( node ).text(),
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/stats-overview.php

    r8348 r9618  
    1515            <tr>
    1616                <th class="col-locale-code"><?php _e( 'Locale' ); ?></th>
    17                 <?php foreach ( $projects as $slug => $project ) : ?>
    18                     <th><?php
    19                         $namereplace = array( 'WordPress.org ', 'WordPress for ', 'WordPress ', 'ectory', ' - Development' );
    20                         echo esc_html( str_replace( $namereplace, '', $project->name ) );
    21                     ?></th>
     17                <?php foreach ( $projects as $slug => $project ) :
     18                    $name = str_replace( array( 'WordPress.org ', 'WordPress for ', 'WordPress ', 'ectory', ' - Development' ), '', $project->name );
     19                    ?>
     20                    <th class="col-<?php echo esc_attr( sanitize_title( $name ) ); ?>"><?php echo esc_html( $name ); ?></th>
    2221                <?php endforeach; ?>
    2322            </tr>
     
    7675jQuery( document ).ready( function( $ ) {
    7776    $( '#stats-table' ).tablesorter( {
     77        theme: 'wporg-translate',
    7878        textExtraction: function( node ) {
    7979            var cellValue = $( node ).text(),
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/stats-plugin-themes-overview.php

    r8499 r9618  
    2424        <thead>
    2525            <tr>
    26                 <th><?php echo $main_column_title; ?></th>
     26                <th><span class="with-tooltip" aria-label="Sorted by active installations"><?php echo $main_column_title; ?></span></th>
    2727                <?php
    2828                    foreach ( $columns as $title ) {
     
    8989jQuery( document ).ready( function( $ ) {
    9090    $( '#stats-table' ).tablesorter( {
     91        theme: 'wporg-translate',
    9192        textExtraction: function( node ) {
    9293            var cellValue = $( node ).text(),
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/style.css

    r9617 r9618  
    14181418    font-weight: bold;
    14191419    text-align: center;
    1420     vertical-align: bottom;
    1421     padding: 10px 3px;
     1420    vertical-align: middle;
     1421    padding: 10px .5em 10px 10px;
    14221422    font-size: .8em;
    14231423    line-height: 1.2;
     
    14361436.stats-table table th.col-locale-code {
    14371437    width: 110px;
     1438}
     1439
     1440.stats-table table th.col-wordpress-org {
     1441    width: 60px;
    14381442}
    14391443
     
    28932897    direction: ltr;
    28942898}
     2899
     2900.tablesorter-wporg-translate .header,
     2901.tablesorter-wporg-translate .tablesorter-header {
     2902    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 9'%3E%3Cg fill='%2332373C' fill-rule='evenodd'%3E%3Cpath d='M5.5 9L9 5H2zM5.5 0L9 4H2z'/%3E%3C/g%3E%3C/svg%3E");
     2903    background-position: right center;
     2904    background-repeat: no-repeat;
     2905    background-size: 11px 9px;
     2906    cursor: pointer;
     2907    white-space: normal;
     2908}
     2909
     2910.tablesorter-wporg-translate thead .headerSortUp,
     2911.tablesorter-wporg-translate thead .tablesorter-headerSortUp,
     2912.tablesorter-wporg-translate thead .tablesorter-headerAsc {
     2913    background-color: #f9f9f9;
     2914    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 4'%3E%3Cpath fill='%2332373C' fill-rule='evenodd' d='M5.5 0L9 4H2z'/%3E%3C/svg%3E");
     2915    background-size: 11px 4px;
     2916}
     2917
     2918.tablesorter-wporg-translate thead .headerSortDown,
     2919.tablesorter-wporg-translate thead .tablesorter-headerSortDown,
     2920.tablesorter-wporg-translate thead .tablesorter-headerDesc {
     2921    background-color: #f9f9f9;
     2922    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 4'%3E%3Cpath fill='%2332373C' fill-rule='evenodd' d='M5.5 4L9 0H2z'/%3E%3C/svg%3E");
     2923    background-size: 11px 4px;
     2924}
Note: See TracChangeset for help on using the changeset viewer.