- Timestamp:
- 07/14/2015 05:42:00 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/translate.wordpress.org/public_html/gp-templates/locale-projects.php
r1734 r1739 68 68 </ul> 69 69 <div class="search-form"> 70 <label class="screen-reader-text" for="projects-filter"><?php esc_attr_e( 'Search projects...' ); ?></label> 71 <input placeholder="<?php esc_attr_e( 'Search projects...' ); ?>" type="search" id="projects-filter" class="filter-search"> 70 <form> 71 <label class="screen-reader-text" for="projects-filter"><?php esc_attr_e( 'Search projects...' ); ?></label> 72 <input placeholder="<?php esc_attr_e( 'Search projects...' ); ?>" type="search" id="projects-filter" name="s" value="<?php if ( !empty( $search ) ) { echo esc_attr( $search ); } ?>" class="filter-search"> 73 <input type="submit" value="<?php esc_attr_e( 'Search' ); ?>" class="screen-reader-text" /> 74 </form> 72 75 </div> 73 76 </div> … … 140 143 ?> 141 144 </div> 145 <?php 146 if ( isset( $pages ) && $pages['pages'] > 1 ) { 147 echo gp_pagination( $pages['page'], $pages['per_page'], $pages['results'] ); 148 } 149 ?> 142 150 143 151 <script> 144 152 jQuery( document ).ready( function( $ ) { 153 // Don't filter if there's an existing search term, or if we're paginated 154 // Fall back to a full page reload for those cases. 155 var live_filtering_enabled = ( ! $( '#projects-filter' ).val() && ! $( '.paging' ).length ); 145 156 $rows = $( '#projects' ).find( '.project' ); 146 157 $( '#projects-filter' ).on( 'input keyup', function() { 158 if ( ! live_filtering_enabled ) { 159 return; 160 } 161 147 162 var words = this.value.toLowerCase().split( ' ' ); 148 163
Note: See TracChangeset
for help on using the changeset viewer.