first take
[ReadingsJQM.git] / js / app / Controller.coffee
diff --git a/js/app/Controller.coffee b/js/app/Controller.coffee
new file mode 100644 (file)
index 0000000..b5db24c
--- /dev/null
@@ -0,0 +1,7 @@
+# main controller
+
+Readings.category_list = (list) ->
+  list.empty()
+  for cat, labelname of Readings.config.get 'categories'
+    list.append "<li><a href=\"#page-tags?category=#{cat}\">#{labelname}</a></li>"
+  list.listview 'refresh'
\ No newline at end of file