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/css/style.css | 4 +--- public/js/common.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 public/js/common.js (limited to 'public') diff --git a/public/css/style.css b/public/css/style.css index 89a35d5..fdd5d32 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -224,8 +224,6 @@ font-family:Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",m } .message pre{white-space:pre-wrap;word-wrap:break-word;width:40em;} -/* .commit .name{clear:left;margin-top:.75em;line-height:2em} */ -.commit .date{color:#888;line-height:1em;} .commit .builds span {font-size:110%;font-weight: bolder;} .commit .builds span.PASS{color:green} .commit .builds span.FAIL{color:red} @@ -237,7 +235,7 @@ font-family:Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",m .commit .name{float:left; width: 100%;} .commit .name .date{color:#888;font-size:90%;} -.commit .name .author{font-weight: bolder;} +.commit .name .author{font-weight: bolder;line-height:2em} .commit .gravatar{border:1px solid #d0d0d0;padding:2px;background-color:white;float:left;margin-right:.7em;} .columns .first{float:left;width:450px;} 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 1.4.1