- var text = [];
- text.push("<p><b>Categories for " + realm + "</b></p>");
- text.push("<ul>");
- $(data).find('category').each(function() {
- var name = $(this).find('categoryName').text();
- var id = $(this).find('categoryId').text();
- text.push("<li>");
- text.push('<a href="#" onclick="mkws.setCategory(' + "'" + id + "'" + ')">' + name + '</a>');
- text.push("</li>");
- });
- text.push("</ul>");
- $(that.node).html(text.join(''));
- });
+ var text = [];
+ text.push("Select category: ");
+ text.push("<select name='mkwsCategory' " +
+ "onchange='mkws.limitCategory(\"" + that.team.name() + "\", this.value)'>");
+ text.push("<option value=''>[All]</option>");
+ $(data).find('category').each(function() {
+ var name = $(this).find('categoryName').text();
+ var id = $(this).find('categoryId').text();
+ text.push("<option value='", id, "'>", name, "</option>");
+ });
+ text.push("</select>");
+ that.node.html(text.join(''));