mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Selectively reset list-table forms rather than all forms to avoid stompage. Props koopersmith. fixes #16098
git-svn-id: https://develop.svn.wordpress.org/trunk@17239 602fd350-edb4-49c9-b593-d223f7449a82
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