From 08a7e009d47d9e54a7f9da0be03fe8f2a153f9ad Mon Sep 17 00:00:00 2001 From: franck cuny Date: Sun, 3 Oct 2010 20:49:32 +0200 Subject: move js to a file --- public/js/common.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 public/js/common.js (limited to 'public/js/common.js') 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("
" + data.content + "
").toggle();
+        });
+        return false;
+    })
+})
-- 
cgit v1.2.3