Submit the form when setting items per page option so it's visible straight away
git-svn-id: http://svn.automattic.com/wordpress/trunk@10987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -116,34 +116,6 @@ columns = {
|
||||
|
||||
$(document).ready(function(){columns.init();});
|
||||
|
||||
screenOptions = {
|
||||
init : function() {
|
||||
$('.screen-per-page').change(function() {
|
||||
var option = this.id, value = parseInt($(this).val(), 10);
|
||||
if ( isNaN(value) ) {
|
||||
$(this).val('');
|
||||
return;
|
||||
}
|
||||
screenOptions.save_screen_option(option, value);
|
||||
}).parents('form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
},
|
||||
|
||||
save_screen_option : function (option, value) {
|
||||
$.post(ajaxurl, {
|
||||
action: 'set-screen-option',
|
||||
option: option,
|
||||
value: value,
|
||||
screenoptionnonce: $('#screenoptionnonce').val(),
|
||||
page: pagenow
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){screenOptions.init();});
|
||||
|
||||
})(jQuery);
|
||||
|
||||
// stub for doing better warnings
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user