From: Mike Taylor Date: Mon, 3 Mar 2014 17:18:17 +0000 (+0000) Subject: Move utility function findnode() to near the end. X-Git-Tag: 1.0.0~1353 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=3707ef8981a7bb11586f4f35b4166aa41a29bb71;p=mkws-moved-to-github.git Move utility function findnode() to near the end. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 5c40cb3..abee7d2 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -256,21 +256,6 @@ function team($, teamName) { }); - // Finds the node of the specified class within the current team - // Multiple OR-clauses separated by commas are handled - // More complex cases may not work - // - function findnode(selector, teamName) { - teamName = teamName || m_teamName; - - selector = selector.split(',').map(function(s) { - return s + '.mkwsTeam_' + teamName; - }).join(','); - - return $(selector); - } - - // // pz2.js event handlers: // @@ -1180,6 +1165,21 @@ function team($, teamName) { mkws.M = M; // so the Handlebars helper can use it + // Finds the node of the specified class within the current team + // Multiple OR-clauses separated by commas are handled + // More complex cases may not work + // + function findnode(selector, teamName) { + teamName = teamName || m_teamName; + + selector = selector.split(',').map(function(s) { + return s + '.mkwsTeam_' + teamName; + }).join(','); + + return $(selector); + } + + // main (function() { try {