Add notifications in title
This commit is contained in:
parent
e34b8e6d46
commit
318bc23e8a
BIN
view/.DS_Store
vendored
Normal file
BIN
view/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
view/theme/.DS_Store
vendored
Normal file
BIN
view/theme/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
view/theme/cleanzero/.DS_Store
vendored
Normal file
BIN
view/theme/cleanzero/.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -71,3 +71,15 @@
|
|||
<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>
|
||||
</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