Changeset 16022
- Timestamp:
- 10/27/2010 08:17:00 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/js/list-table.dev.js
r15939 r16022 36 36 37 37 this.update_rows({'paged': paged}); 38 },39 40 // searching41 change_search: function(s) {42 this.update_rows({'s': s}, true, function() {43 $('h2 .subtitle').remove();44 45 if ( s )46 $('h2').eq(0).append($('<span class="subtitle">').html(listTableL10n.search.replace('%s', this.htmlencode(s))));47 });48 38 }, 49 39 … … 217 207 218 208 // searchbox 219 $('.search-box :submit').click(function() { 220 listTable.change_search($(this).parent('.search-box').find(':text').val()); 221 222 return false; 223 }); 224 225 $('.search-box :text').keypress(function(e) { 226 if ( 13 != e.keyCode ) 209 function change_search(ev) { 210 if ( 'keypress' == ev.type && 13 != e.keyCode ) 227 211 return; 228 212 229 listTable.change_search($(this).val()); 230 231 return false; 232 }); 213 ev.preventDefault(); 214 ev.stopImmediatePropagation(); 215 216 var data = $(this).parent('.search-box').find(':input').serializeObject(); 217 218 listTable.update_rows(data, true, function() { 219 $('h2 .subtitle').remove(); 220 221 if ( data.s ) 222 $('h2').append($('<span class="subtitle">').html( 223 listTableL10n.search.replace('%s', this.htmlencode(data.s)) 224 )); 225 }); 226 } 227 $('.search-box :submit').click(change_search); 228 $('.search-box :text').keypress(change_search); 233 229 234 230 // tablenav dropdowns -
trunk/wp-includes/script-loader.php
r16010 r16022 171 171 $scripts->add( 'jquery-query', "/wp-includes/js/jquery/jquery.query.js", array('jquery'), '2.1.7' ); 172 172 $scripts->add_data( 'jquery-query', 'group', 1 ); 173 174 $scripts->add( 'jquery-serialize-object', "/wp-includes/js/jquery/jquery.serialize-object.js", array('jquery'), '0.2' ); 175 $scripts->add_data( 'jquery-serialize-object', 'group', 1 ); 173 176 174 177 $scripts->add( 'jquery-hotkeys', "/wp-includes/js/jquery/jquery.hotkeys$suffix.js", array('jquery'), '0.0.2m' ); … … 355 358 $scripts->add_data( 'theme-preview', 'group', 1 ); 356 359 357 $scripts->add( 'list-table', "/wp-admin/js/list-table$suffix.js", array( 'jquery ', 'jquery-query' ), '20101023' );360 $scripts->add( 'list-table', "/wp-admin/js/list-table$suffix.js", array( 'jquery-query', 'jquery-serialize-object' ), '20101027' ); 358 361 $scripts->add_data( 'list-table', 'group', 1 ); 359 362 $scripts->localize( 'list-table', 'listTableL10n', array(
Note: See TracChangeset
for help on using the changeset viewer.