Ticket #15580: spinner-search.diff
File spinner-search.diff, 3.6 KB (added by , 14 years ago) |
---|
-
wp-includes/script-loader.php
307 307 $scripts->add( 'list-table', "/wp-admin/js/list-table$suffix.js", array( 'jquery-query', 'jquery-serialize-object' ), '20101215' ); 308 308 $scripts->add_data( 'list-table', 'group', 1 ); 309 309 $scripts->localize( 'list-table', 'listTableL10n', array( 310 'loading' => __('Loading...'),311 310 'error' => __('An error has occurred while loading the items.'), 312 311 'search' => __('Search results for “%s”'), 313 312 'l10n_print_after' => 'try{convertEntities(listTableL10n);}catch(e){};' -
wp-admin/includes/class-wp-list-table.php
199 199 <input type="text" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" /> 200 200 <?php submit_button( $text, 'button', 'submit', false ); ?> 201 201 </p> 202 <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="list-ajax-loading" alt="" /> 202 203 <?php 203 204 } 204 205 … … 232 233 233 234 echo "<ul class='subsubsub'>\n"; 234 235 foreach ( $views as $class => $view ) { 235 236 $views[ $class ] = "\t<li class='$class'>$view"; 236 237 } 237 238 echo implode( " |</li>\n", $views ) . "</li>\n"; 238 239 echo "</ul>"; -
wp-admin/js/list-table.dev.js
14 14 this.set_total_pages(); 15 15 16 16 this.$tbody = $('#the-list, #the-comment-list'); 17 18 this.$overlay = $('<div id="loading-items">')19 .html(listTableL10n.loading)20 .hide()21 .prependTo($('body'));22 17 }, 23 18 24 19 // paging … … 53 48 if ( !different ) 54 49 return false; 55 50 56 this.s how_overlay();51 this.start_loading(); 57 52 58 53 if ( reset_paging ) 59 54 $.query.SET('paged', 1); … … 96 91 if ( 'object' != typeof response ) { 97 92 this.handle_error(); 98 93 } else { 99 this. hide_overlay();94 this.stop_loading(); 100 95 101 96 this.$tbody.html(response.rows); 102 97 … … 119 114 }, 120 115 121 116 handle_error: function() { 122 this. hide_overlay();117 this.stop_loading(); 123 118 124 119 $('h2').after('<div class="error ajax below-h2"><p>' + listTableL10n.error + '</p></div>'); 125 120 }, 126 121 127 s how_overlay: function() {122 start_loading: function() { 128 123 this.loading = true; 129 124 130 125 $('.error.ajax').remove(); 131 126 132 this.$overlay 133 .css({ 134 width: this.$tbody.width() + 'px', 135 height: this.$tbody.height() - 20 + 'px' 136 }) 137 .css(this.$tbody.offset()) 138 .show(); 127 $('#list-ajax-loading').css('visibility', 'visible'); 139 128 }, 140 129 141 hide_overlay: function() {130 stop_loading: function() { 142 131 this.loading = false; 143 this.$overlay.hide(); 132 133 $('#list-ajax-loading').css('visibility', 'hidden'); 144 134 } 145 135 } 146 136 -
wp-admin/css/wp-admin.dev.css
4192 4192 } 4193 4193 * html #template div {margin-right: 0;} 4194 4194 #save {width: 15em;} 4195 #loading-items { 4196 position: absolute; 4197 z-index: 9999; 4198 padding: 10px 0; 4199 background-color: #fff; 4200 font-weight: bold; 4201 text-align: center; 4202 opacity: 0.5; 4195 #list-ajax-loading { 4196 float: right; 4197 margin-right: 5px; 4198 margin-top: -1px; 4203 4199 } 4204 4200 #howto { 4205 4201 font-size: 11px;