projects
/
mkws-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Categories widget invokes mkws.limitCategory
[mkws-moved-to-github.git]
/
src
/
mkws-widget-categories.js
diff --git
a/src/mkws-widget-categories.js
b/src/mkws-widget-categories.js
index
afb3875
..
c80bc0c
100644
(file)
--- a/
src/mkws-widget-categories.js
+++ b/
src/mkws-widget-categories.js
@@
-19,16
+19,15
@@
mkws.registerWidgetType('Categories', function() {
that.log("got categories: " + data);
var text = [];
that.log("got categories: " + data);
var text = [];
- text.push("<p><b>Categories for " + realm + "</b></p>");
- text.push("<ul>");
+ text.push("Select category: ");
+ text.push("<select name='mkwsCategory' " +
+ "onchange='mkws.limitCategory(\"" + that.team.name() + "\", this.value)'>");
$(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();
- text.push("<li>");
- text.push('<a href="#" onclick="mkws.setCategory(' + "'" + id + "'" + ')">' + name + '</a>');
- text.push("</li>");
+ text.push("<option value='", id, "'>", name, "</option>");
});
});
- text.push("</ul>");
+ text.push("</select>");
$(that.node).html(text.join(''));
});
});
$(that.node).html(text.join(''));
});
});