aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl')
-rw-r--r--view/tpl/notifications_widget.tpl14
1 files changed, 10 insertions, 4 deletions
diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl
index 82b3665c3..7a4e909c7 100644
--- a/view/tpl/notifications_widget.tpl
+++ b/view/tpl/notifications_widget.tpl
@@ -306,12 +306,18 @@
if(typeof obj[type] === typeof undefined)
return true;
+ var count = Number(obj[type].count);
+
+
if(obj[type].count) {
$('.' + type + '-button').fadeIn();
- if(replace || followup)
- $('.' + type + '-update').html(Number(obj[type].count));
- else
- $('.' + type + '-update').html(Number(obj[type].count) + Number($('.' + type + '-update').html()));
+ if(replace || followup) {
+ $('.' + type + '-update').html(count >= 100 ? '99+' : count);
+ }
+ else {
+ count = count + Number($('.' + type + '-update').html().replace(/\++$/, ''));
+ $('.' + type + '-update').html(count >= 100 ? '99+' : count);
+ }
}
else {
$('.' + type + '-update').html('0');