Browse Source

Add notifications in title

pull/486/head
Christian Vogeley 9 years ago
parent
commit
318bc23e8a
  1. BIN
      .DS_Store
  2. BIN
      view/.DS_Store
  3. BIN
      view/theme/.DS_Store
  4. BIN
      view/theme/cleanzero/.DS_Store
  5. 12
      view/theme/cleanzero/nav.tpl

BIN
.DS_Store

BIN
view/.DS_Store

BIN
view/theme/.DS_Store

BIN
view/theme/cleanzero/.DS_Store

12
view/theme/cleanzero/nav.tpl

@ -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…
Cancel
Save