From c7c942c272851202d40a9cc44bdd526d3862ad40 Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Thu, 20 Jan 2011 17:07:25 +0100 Subject: [PATCH] Remove redundant 'show' when query is submitted. --- mkdru.client.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mkdru.client.js b/mkdru.client.js index ebd713f..fff8247 100644 --- a/mkdru.client.js +++ b/mkdru.client.js @@ -214,7 +214,6 @@ mkdru.pollDropDowns = function () { if (!mkdru.submitted) return false; mkdru.resetPage(); mkdru.hashFromState(); - mkdru.pz2.show(0, mkdru.state.perpage, mkdru.state.sort); return false; }; @@ -283,8 +282,14 @@ $(document).ready(function () { $(window).bind( 'hashchange', mkdru.hashChange); $('.mkdru-search').bind('submit', mkdru.submitQuery); $('.mkdru-search input:text').attr('value', ''); - $('.mkdru-perpage').bind('change', function () { mkdru.pollDropDowns() }); - $('.mkdru-sort').bind('change', function () { mkdru.pollDropDowns() }); + $('.mkdu-perpage').bind('change', function () { + mkdru.pollDropDowns(); + mkdru.pz2.show(0, mkdru.state.perpage, mkdru.state.sort); + }); + $('.mkdru-sort').bind('change', function () { + mkdru.pollDropDowns(); + mkdru.pz2.show(0, mkdru.state.perpage, mkdru.state.sort); + }); mkdru.pz2 = new pz2( { "onshow": mkdru.pz2Show, "showtime": 500, //each timer (show, stat, term, bytarget) can be specified this way -- 1.7.10.4