Merge pull request #486 from cvogeley/master
Show notifications in title, ignore OSX .DS_Store files
This commit is contained in:
commit
69182360ef
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -21,4 +21,6 @@ report/
|
||||||
.buildpath
|
.buildpath
|
||||||
.externalToolBuilders
|
.externalToolBuilders
|
||||||
.settings
|
.settings
|
||||||
|
#ignore OSX .DS_Store files
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue