From f47585073974339b607f93b70391c09c35da6947 Mon Sep 17 00:00:00 2001 From: tomtom84 Date: Sun, 8 Jul 2012 21:50:17 +0200 Subject: [PATCH] diabook: add notification in website-title, whenever new notifications arrive --- view/theme/diabook/bottom.tpl | 12 ++++++++++++ view/theme/diabook/nav.tpl | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/view/theme/diabook/bottom.tpl b/view/theme/diabook/bottom.tpl index 50a15788d..0ab7de78e 100644 --- a/view/theme/diabook/bottom.tpl +++ b/view/theme/diabook/bottom.tpl @@ -42,6 +42,7 @@ $(document).ready(function() { }); + function tautogrow(id){ $("textarea#comment-edit-text-" +id).autogrow(); }; @@ -128,6 +129,17 @@ $(document).ready(function() { function cmtBbClose(id) { $(".comment-edit-bb-" + id).hide(); } + + $(document).ready(function(){ + var doctitle = document.title; + function checkNotify() { + if(document.getElementById("notify-update").innerHTML != "") + document.title = "("+document.getElementById("notify-update").innerHTML+") " + doctitle; + else + document.title = doctitle; + }; + setInterval(function () {checkNotify();}, 10 * 1000); + }) diff --git a/view/theme/diabook/nav.tpl b/view/theme/diabook/nav.tpl index 4165656bd..1424c0e39 100644 --- a/view/theme/diabook/nav.tpl +++ b/view/theme/diabook/nav.tpl @@ -137,7 +137,7 @@ -
$langselector
+
$langselector