]> git.mxchange.org Git - friendica.git/commitdiff
Add notifications in title
authorChristian Vogeley <christian.vogeley@hotmail.de>
Mon, 17 Sep 2012 18:39:34 +0000 (20:39 +0200)
committerChristian Vogeley <christian.vogeley@hotmail.de>
Mon, 17 Sep 2012 18:39:34 +0000 (20:39 +0200)
.DS_Store [new file with mode: 0644]
view/.DS_Store [new file with mode: 0644]
view/theme/.DS_Store [new file with mode: 0644]
view/theme/cleanzero/.DS_Store [new file with mode: 0644]
view/theme/cleanzero/nav.tpl

diff --git a/.DS_Store b/.DS_Store
new file mode 100644 (file)
index 0000000..c33db8c
Binary files /dev/null and b/.DS_Store differ
diff --git a/view/.DS_Store b/view/.DS_Store
new file mode 100644 (file)
index 0000000..64268c4
Binary files /dev/null and b/view/.DS_Store differ
diff --git a/view/theme/.DS_Store b/view/theme/.DS_Store
new file mode 100644 (file)
index 0000000..1fd4830
Binary files /dev/null and b/view/theme/.DS_Store differ
diff --git a/view/theme/cleanzero/.DS_Store b/view/theme/cleanzero/.DS_Store
new file mode 100644 (file)
index 0000000..1fd4830
Binary files /dev/null and b/view/theme/cleanzero/.DS_Store differ
index 9fe5ac0fe543d96b395ba6924b30f4daf4d4695a..65f01859199f6913daf534939f774c8c9dcd35d4 100644 (file)
 <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>