first take
[ReadingsJQM.git] / js / app / Controller.js
diff --git a/js/app/Controller.js b/js/app/Controller.js
new file mode 100644 (file)
index 0000000..9222b13
--- /dev/null
@@ -0,0 +1,14 @@
+(function() {
+
+  Readings.category_list = function(list) {
+    var cat, labelname, _ref;
+    list.empty();
+    _ref = Readings.config.get('categories');
+    for (cat in _ref) {
+      labelname = _ref[cat];
+      list.append("<li><a href=\"#page-tags?category=" + cat + "\">" + labelname + "</a></li>");
+    }
+    return list.listview('refresh');
+  };
+
+}).call(this);