From: Mike Taylor Date: Tue, 29 Apr 2014 12:28:16 +0000 (+0100) Subject: Add team.sortOrder access method. X-Git-Tag: 1.0.0~812 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=867fd75779d6a3565ad8b79ab8d1b40ef77c1f69;p=mkws-moved-to-github.git Add team.sortOrder access method. Remove all code to generate the mkwsSelect area. (Done by a new widget.) --- diff --git a/src/mkws-team.js b/src/mkws-team.js index 6010abb..63d50fa 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -36,6 +36,7 @@ function team($, teamName) { // Accessor methods for individual widgets: readers that.name = function() { return m_teamName; }; that.submitted = function() { return m_submitted; }; + that.sortOrder = function() { return m_sortOrder; }; that.perpage = function() { return m_perpage; }; that.totalRecordCount = function() { return m_totalRecordCount; }; that.currentPage = function() { return m_currentPage; }; @@ -356,16 +357,6 @@ function team($, teamName) { if (m_config.show_lang) mkwsHtmlLang(); - var ranking_data = '
'; - if (m_config.show_sort) { - ranking_data += M('Sort by') + ' ' + mkwsHtmlSort() + ' '; - } - if (m_config.show_perpage) { - ranking_data += M('and show') + ' ' + mkwsHtmlPerpage() + ' ' + M('per page') + '.'; - } - ranking_data += '
'; - findnode(".mkwsRanking").html(ranking_data); - var container = findnode(".mkwsMOTDContainer"); if (container.length) { // Move the MOTD from the provided element down into the container @@ -450,46 +441,6 @@ function team($, teamName) { } - function mkwsHtmlSort() { - log("HTML sort, m_sortOrder = '" + m_sortOrder + "'"); - var sort_html = ''; - - return sort_html; - } - - - function mkwsHtmlPerpage() { - log("HTML perpage, m_perpage = " + m_perpage); - var perpage_html = ''; - - return perpage_html; - } - - // Translation function. At present, this is properly a // global-level function (hence the assignment to mkws.M) but we // want to make it per-team so different teams can operate in