Browse files

Add favicon switching for success/fail state

  • Loading branch information...
1 parent 70c7665 commit 1c2ac525086e696bcc43b2da128971f61eb69f7e @agnoster committed Jun 21, 2011
View
BIN public/images/green.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/images/red.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
9 public/javascripts/client.js
@@ -34,6 +34,15 @@ $('.rerun').live('click', function() {
function update_active() {
+ var statusmark = ''
+ for (var path in projects) {
+ if (projects[path] && projects[path].status && projects[path].status == 'err')
+ statusmark = ''
+ }
+
+ $('#favicon').attr('href', '/images/' + (statusmark == '' ? 'green' : 'red') + '.png')
+ document.title = statusmark + ' nosey'
+
if (!active || !active.id || !projects[active.id]) return
var project = projects[active.id]
View
1 views/layout.jade
@@ -6,5 +6,6 @@ html(lang="en")
script(type="text/javascript", src="/javascripts/jquery.js")
script(type="text/javascript", src="/javascripts/client.js")
link(rel="stylesheet", href="/stylesheets/style.css")
+ link#favicon(rel="icon", type="image/x-icon")
body
#main!= body

0 comments on commit 1c2ac52

Please sign in to comment.