Selectively reset list-table forms rather than all forms to avoid stompage. Props koopersmith. fixes #16098
git-svn-id: http://svn.automattic.com/wordpress/trunk@17239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -5,9 +5,7 @@ window.listTable = {
|
||||
init: function() {
|
||||
this.loading = false;
|
||||
|
||||
$('form').each(function() {
|
||||
this.reset();
|
||||
});
|
||||
this.reset( '.tablenav, .search-box, .wp-list-table' );
|
||||
|
||||
if ( '' == $.query.GET('paged') )
|
||||
$.query.SET('paged', 1);
|
||||
@@ -16,6 +14,20 @@ window.listTable = {
|
||||
this.$tbody = $('#the-list, #the-comment-list');
|
||||
},
|
||||
|
||||
reset: function( context ) {
|
||||
context = $( context );
|
||||
$('input', context).each( function(){
|
||||
this.value = this.defaultValue;
|
||||
this.checked = this.defaultChecked;
|
||||
});
|
||||
$('option', context).each( function(){
|
||||
this.selected = this.defaultSelected;
|
||||
});
|
||||
$('textarea', context).each( function(){
|
||||
this.value = this.defaultValue;
|
||||
});
|
||||
},
|
||||
|
||||
// paging
|
||||
set_total_pages: function(num) {
|
||||
var last_page_url = $('.last-page').attr('href');
|
||||
|
||||
Reference in New Issue
Block a user