From: Mike Taylor Date: Fri, 21 Mar 2014 11:00:06 +0000 (+0000) Subject: Split onSelectDdChange into two separate functions, onSortChange and onPerpageChange. X-Git-Tag: 1.0.0~1290 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=212d3cd70d1379ba08272b97a8414ffaadbb4e72 Split onSelectDdChange into two separate functions, onSortChange and onPerpageChange. Prepares the way for pub/sub widgetising those controls. --- 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(); });