Add special ctaegory "[All]" to dropdown.
authorMike Taylor <mike@indexdata.com>
Tue, 22 Apr 2014 13:12:54 +0000 (14:12 +0100)
committerMike Taylor <mike@indexdata.com>
Tue, 22 Apr 2014 13:12:54 +0000 (14:12 +0100)
src/mkws-widget-categories.js

index c80bc0c..6ce09fe 100644 (file)
@@ -22,6 +22,7 @@ mkws.registerWidgetType('Categories', function() {
             text.push("Select category: ");
             text.push("<select name='mkwsCategory' " +
                      "onchange='mkws.limitCategory(\"" + that.team.name() + "\", this.value)'>");
             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();
             $(data).find('category').each(function() {
                 var name = $(this).find('categoryName').text();
                 var id = $(this).find('categoryId').text();