about summary refs log tree commit diff
path: root/public/js/common.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;
+    })
+})