about summary refs log tree commit diff
path: root/public/js
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-10-03 20:49:32 +0200
committerfranck cuny <franck@lumberjaph.net>2010-10-03 20:49:32 +0200
commit08a7e009d47d9e54a7f9da0be03fe8f2a153f9ad (patch)
tree0eb6a27bd8d4b5f4f3499572a23162043f09939b /public/js
parentfix feed (diff)
downloadjitterbug-08a7e009d47d9e54a7f9da0be03fe8f2a153f9ad.tar.gz
move js to a file
Diffstat (limited to 'public/js')
-rw-r--r--public/js/common.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/public/js/common.js b/public/js/common.js
new file mode 100644
index 0000000..646f80e
--- /dev/null
+++ b/public/js/common.js
@@ -0,0 +1,15 @@
+$(document).ready(function() {
+    $('.builds-day').click(function() {
+        var day = $(this).text();
+        var class = "#commits-day-" + day;
+        $(class).toggle();
+    });
+    $('.builds a').click(function() {
+        var url = $(this).attr("href");
+        var id = $(this).parents('.commit').attr('id');
+        $.getJSON(url, null, function(data) {
+            $("#result-" + id).html("<pre>" + data.content + "<pre>").toggle();
+        });
+        return false;
+    })
+})