Ticket #15355: clear_search.15355.patch
File clear_search.15355.patch, 10.3 KB (added by , 15 years ago) |
---|
-
wp-includes/script-loader.php
372 372 $scripts->localize( 'list-table', 'listTableL10n', array( 373 373 'loading' => __('Loading...'), 374 374 'error' => __('An error has occurred while loading the items.'), 375 'search' => __('Search results for “%s”') 375 'search' => __('Search results for “%s”'), 376 'clear_search' => __('Clear search results') 376 377 ) ); 377 378 378 379 $scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest' ), '20100707' ); -
wp-admin/users.php
347 347 <div class="wrap"> 348 348 <?php screen_icon(); ?> 349 349 <h2><?php echo esc_html( $title ); if ( current_user_can( 'create_users' ) || current_user_can( 'promote_users' ) ) { ?> <a href="user-new.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'user'); ?></a><?php } 350 if ( $usersearch)351 printf( '<span class="subtitle">' . __( 'Search results for “%s”') . '</span>', esc_html( $usersearch) ); ?>350 if ( !empty( $usersearch ) ) 351 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '<a id="clear-search" href="%s" class="ntdelbutton" title="' . __( 'Clear search results' ) . '">X</a></span>', esc_html( $usersearch ), admin_url( 'users.php' ) ); ?> 352 352 </h2> 353 353 354 354 <?php $wp_list_table->views(); ?> -
wp-admin/edit-comments.php
128 128 <?php screen_icon(); ?> 129 129 <h2><?php echo esc_html( $title ); 130 130 if ( isset($_REQUEST['s']) && $_REQUEST['s'] ) 131 printf( '<span class="subtitle">' . sprintf( __( 'Search results for “%s”' ), wp_html_excerpt( esc_html( stripslashes( $_REQUEST['s'] ) ), 50 ) ) . '</span>'); ?>131 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '<a id="clear-search" href="%s" class="ntdelbutton" title="' . __( 'Clear search results' ) . '">X</a></span>', wp_html_excerpt( esc_html( stripslashes( $_REQUEST['s'] ) ), 50 ), admin_url( 'edit-comments.php' ) ); ?> 132 132 </h2> 133 133 134 134 <?php -
wp-admin/edit-tags.php
212 212 <div class="wrap nosubsub"> 213 213 <?php screen_icon(); ?> 214 214 <h2><?php echo esc_html( $title ); 215 if ( !empty($_REQUEST['s']))216 printf( '<span class="subtitle">' . __( 'Search results for “%s”') . '</span>', esc_html( stripslashes($_REQUEST['s'])) ); ?>215 if ( isset($_REQUEST['s']) && $_REQUEST['s'] ) 216 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '<a id="clear-search" href="%s" class="ntdelbutton" title="' . __( 'Clear search results' ) . '">X</a></span>', esc_html( stripslashes($_REQUEST['s']) ), admin_url( "edit-tags.php?taxonomy=$taxonomy" ) ); ?> 217 217 </h2> 218 218 219 219 <?php if ( isset($_REQUEST['message']) && ( $msg = (int) $_REQUEST['message'] ) ) : ?> -
wp-admin/js/list-table.dev.js
220 220 listTable.update_rows(data, true, function() { 221 221 $('h2 .subtitle').remove(); 222 222 223 if ( data.s ) 224 $('h2').append($('<span class="subtitle">').html( 225 listTableL10n.search.replace('%s', this.htmlencode(data.s)) 226 )); 223 if ( data.s ) { 224 $('h2').append( $('<span class="subtitle">').html( 225 listTableL10n.search.replace('%s', this.htmlencode(data.s)) + 226 '<a id="clear-search" class="ntdelbutton" title="' + 227 listTableL10n.clear_search + 228 '">X</a></span>' 229 ) ); 230 } 231 227 232 }); 228 233 } 234 235 function clear_search() { 236 listTable.update_rows({'s': ''}, true, function() { 237 $('h2 .subtitle').remove(); 238 $('.search-box input[type="text"]').val(''); 239 }); 240 241 return false; 242 }; 243 229 244 $('.search-box :submit').click(change_search); 230 245 $('.search-box :text').keypress(change_search); 246 $('#clear-search').live('click', clear_search) 231 247 232 248 // tablenav dropdowns 233 249 $('#post-query-submit').click(function() { -
wp-admin/upload.php
152 152 <div class="wrap"> 153 153 <?php screen_icon(); ?> 154 154 <h2><?php echo esc_html( $title ); ?> <a href="media-new.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'file'); ?></a> <?php 155 if ( isset($_ GET['s']) && $_GET['s'] )156 printf( '<span class="subtitle">' . __( 'Search results for “%s”') . '</span>', get_search_query() ); ?>155 if ( isset($_REQUEST['s']) && $_REQUEST['s'] ) 156 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '<a id="clear-search" href="%s" class="ntdelbutton" title="' . __( 'Clear search results' ) . '">X</a></span>', get_search_query(), admin_url( 'upload.php' ) ); ?> 157 157 </h2> 158 158 159 159 <?php -
wp-admin/network/users.php
70 70 if ( current_user_can( 'create_users') ) : ?> 71 71 <a href="<?php echo network_admin_url('user-new.php'); ?>" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'users' ); ?></a><?php 72 72 endif; 73 73 74 74 if ( !empty( $usersearch ) ) 75 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $usersearch ) );75 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '<a id="clear-search" href="%s" class="ntdelbutton" title="' . __( 'Clear search results' ) . '">X</a></span>', esc_html( $usersearch ), network_admin_url( 'users.php' ) ); ?> 76 76 ?> 77 77 </h2> 78 78 -
wp-admin/network/sites.php
96 96 <a href="<?php echo network_admin_url('site-new.php'); ?>" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'sites' ); ?></a> 97 97 <?php endif; ?> 98 98 99 <?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) { 100 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '</span>', esc_html( $s ) ); 101 } ?> 99 <?php if ( isset($_REQUEST['s']) && $_REQUEST['s'] ) 100 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '<a id="clear-search" href="%s" class="ntdelbutton" title="' . __( 'Clear search results' ) . '">X</a></span>', esc_html( stripslashes($_REQUEST['s']) ), network_admin_url( 'sites.php' ) ); ?> 102 101 </h2> 103 102 104 103 <form action="" method="get" id="ms-search"> -
wp-admin/edit.php
171 171 <?php screen_icon(); ?> 172 172 <h2><?php echo esc_html( $post_type_object->labels->name ); ?> <a href="<?php echo $post_new_file ?>" class="button add-new-h2"><?php echo esc_html($post_type_object->labels->add_new); ?></a> <?php 173 173 if ( isset($_REQUEST['s']) && $_REQUEST['s'] ) 174 printf( '<span class="subtitle">' . __( 'Search results for “%s”') . '</span>', get_search_query() ); ?>174 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '<a id="clear-search" href="%s" class="ntdelbutton" title="' . __( 'Clear search results' ) . '">X</a></span>', get_search_query(), admin_url( "edit.php?post_type=$post_type" ) ); ?> 175 175 </h2> 176 176 177 177 <?php -
wp-admin/css/colors-classic.dev.css
684 684 } 685 685 686 686 .tagchecklist span a, 687 #bulk-titles div a { 687 #bulk-titles div a, 688 a#clear-search { 688 689 background: url(../images/xit.gif) no-repeat; 689 690 } 690 691 691 692 .tagchecklist span a:hover, 692 #bulk-titles div a:hover { 693 #bulk-titles div a:hover, 694 a#clear-search:hover { 693 695 background: url(../images/xit.gif) no-repeat -10px 0; 694 696 } 695 697 -
wp-admin/css/colors-fresh.dev.css
684 684 } 685 685 686 686 .tagchecklist span a, 687 #bulk-titles div a { 687 #bulk-titles div a, 688 a#clear-search { 688 689 background: url(../images/xit.gif) no-repeat; 689 690 } 690 691 691 692 .tagchecklist span a:hover, 692 #bulk-titles div a:hover { 693 #bulk-titles div a:hover, 694 a#clear-search:hover { 693 695 background: url(../images/xit.gif) no-repeat -10px 0; 694 696 } 695 697 -
wp-admin/css/wp-admin.dev.css
284 284 margin: -5px 0 0; 285 285 } 286 286 287 a#clear-search { 288 display: inline-block; 289 cursor: pointer; 290 height: 10px; 291 margin: 3px 5px 0; 292 overflow: hidden; 293 text-indent: -9999px; 294 width: 10px; 295 } 287 296 288 297 /*------------------------------------------------------------------------------ 289 298 3.0 - Actions -
wp-admin/link-manager.php
58 58 <div class="wrap nosubsub"> 59 59 <?php screen_icon(); ?> 60 60 <h2><?php echo esc_html( $title ); ?> <a href="link-add.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'link'); ?></a> <?php 61 if ( !empty($_REQUEST['s']))62 printf( '<span class="subtitle">' . __( 'Search results for “%s”') . '</span>', esc_html( stripslashes($_REQUEST['s'])) ); ?>61 if ( isset($_REQUEST['s']) && $_REQUEST['s'] ) 62 printf( '<span class="subtitle">' . __( 'Search results for “%s”' ) . '<a id="clear-search" href="%s" class="ntdelbutton" title="' . __( 'Clear search results' ) . '">X</a></span>', esc_html( stripslashes($_REQUEST['s']) ), admin_url( 'link-manager.php' ) ); ?> 63 63 </h2> 64 64 65 65 <?php