Merge pull request #486 from cvogeley/master

Show notifications in title, ignore OSX .DS_Store files
This commit is contained in:
Thomas Willingham 2012-09-17 14:44:17 -07:00
commit 69182360ef
2 changed files with 14 additions and 0 deletions

2
.gitignore vendored
View file

@ -21,4 +21,6 @@ report/
.buildpath .buildpath
.externalToolBuilders .externalToolBuilders
.settings .settings
#ignore OSX .DS_Store files
.DS_Store

View file

@ -71,3 +71,15 @@
<ul id="nav-notifications-template" style="display:none;" rel="template"> <ul id="nav-notifications-template" style="display:none;" rel="template">
<li class="{4}"><a href="{0}"><img src="{1}" height="24" width="24" alt="" />{2} <span class="notif-when">{3}</span></a></li> <li class="{4}"><a href="{0}"><img src="{1}" height="24" width="24" alt="" />{2} <span class="notif-when">{3}</span></a></li>
</ul> </ul>
<script>
var pagetitle = null;
$("nav").bind('nav-update', function(e,data){
if (pagetitle==null) pagetitle = document.title;
var count = $(data).find('notif').attr('count');
if (count>0) {
document.title = "("+count+") "+pagetitle;
} else {
document.title = pagetitle;
}
});
</script>