From: Mike Taylor Date: Fri, 21 Mar 2014 17:08:40 +0000 (+0000) Subject: Invert submitted() login in Sort and Perpage widgets. X-Git-Tag: 1.0.0~1276 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=c5c7c61750ae3f164f8ee04c009b01283fbda269;p=mkws-moved-to-github.git Invert submitted() login in Sort and Perpage widgets. Just to simplify the code. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 057b8ff..e15f9ea 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -404,9 +404,10 @@ function widget($, team, type, node) { // than consuming them. $(node).change(function () { team.set_sortOrder($(node).val()); - if (!team.submitted()) return false; - team.resetPage(); - team.reShow(); + if (team.submitted()) { + team.resetPage(); + team.reShow(); + } return false; }); } @@ -415,9 +416,10 @@ function widget($, team, type, node) { function promotePerpage() { $(node).change(function() { team.set_perpage($(node).val()); - if (!team.submitted()) return false; - team.resetPage(); - team.reShow(); + if (team.submitted()) { + team.resetPage(); + team.reShow(); + } return false; }); }