From 212d3cd70d1379ba08272b97a8414ffaadbb4e72 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Fri, 21 Mar 2014 11:00:06 +0000 Subject: [PATCH] Split onSelectDdChange into two separate functions, onSortChange and onPerpageChange. Prepares the way for pub/sub widgetising those controls. --- tools/htdocs/mkws.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index bcbb403..32be2c7 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -559,7 +559,17 @@ function team($, teamName) { } - function onSelectDdChange() + function onSortChange() + { + if (!m_submitted) return false; + resetPage(); + loadSelect(); + m_paz.show(0, m_perpage, m_sortOrder); + return false; + } + + + function onPerpageChange() { if (!m_submitted) return false; resetPage(); @@ -872,10 +882,10 @@ function team($, teamName) { node.submit(onFormSubmitEventHandler); node = findnode('.mkwsSort'); if (node.length) - node.change(onSelectDdChange); + node.change(onSortChange); node = findnode('.mkwsPerpage'); if (node.length) - node.change(onSelectDdChange); + node.change(onPerpageChange); // on first page, hide the termlist $(document).ready(function() { findnode(".mkwsTermlists").hide(); }); -- 1.7.10.4