diff options
-rw-r--r-- | public/css/style.css | 4 | ||||
-rw-r--r-- | public/js/common.js | 15 | ||||
-rw-r--r-- | views/layouts/main.tt | 18 | ||||
-rw-r--r-- | views/project/index.tt | 2 |
4 files changed, 18 insertions, 21 deletions
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("<pre>" + data.content + "<pre>").toggle(); + }); + return false; + }) +}) diff --git a/views/layouts/main.tt b/views/layouts/main.tt index 7a06684..8a4ed13 100644 --- a/views/layouts/main.tt +++ b/views/layouts/main.tt @@ -5,23 +5,7 @@ <link rel="stylesheet" href="/css/style.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <meta charset="UTF-8" /> - <script type="text/javascript"> - $(document).ready(function() { - $('.builds-day').click(function() { - var day = $(this).text(); - var class = "#commits-day-" + day; - console.log("on toggle " + class); - $(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; - })}) - </script> + <script src="<: $uri_base :>/js/common.js" type="text/javascript"></script> </head> <body> <: $content :> diff --git a/views/project/index.tt b/views/project/index.tt index 884f58d..d028d31 100644 --- a/views/project/index.tt +++ b/views/project/index.tt @@ -1,6 +1,6 @@ <div id="page"> <div id="content"> - <h2><a href="<: $project.url :>"><: $project.name :></a> / build history <a href="<: $base_uri :>/project/<: $project.name :>/feed"><img src="<: $uri_base :>/images/feed.png" /></a></h2> + <h2><a href="<: $project.url :>"><: $project.name :></a> / build history <a href="<: $uri_base :>/project/<: $project.name :>/feed"><img src="<: $uri_base :>/images/feed.png" /></a></h2> <div class="project_baseline"><strong>"<: $project.description :>"</strong></div> |