return true;
case 'horde.error':
+ case 'horde.warning':
+ //case 'horde.alarm':
case 'horde.message':
case 'horde.success':
- case 'horde.warning':
this.Growler.growl(m.message, {
className: m.type.replace('.', '-'),
life: 8,
log: true,
sticky: m.type == 'horde.error'
});
- $('kronolithNotifications').update(Kronolith.text.alerts.interpolate({ 'count': ++this.growls }));
- $('kronolithNotifications').up().show();
+ var notify = $('kronolithNotifications'),
+ className = m.type.replace(/\./, '-'),
+ order = 'horde-error,horde-warning,horde-alarm,horde-message,horde-success';
+ if (!notify.className ||
+ order.indexOf(notify.className) > order.indexOf(className)) {
+ notify.className = className;
+ }
+ notify.update(Kronolith.text.alerts.interpolate({ 'count': ++this.growls }));
+ notify.up().show();
}
}, this);
},
case 'kronolithNotifications':
if (this.Growler.toggleLog()) {
elt.update(Kronolith.text.hidelog);
- this.growls = 0;
} else {
- elt.up().hide();
+ $('kronolithNotifications').update(Kronolith.text.alerts.interpolate({ 'count': this.growls }));
}
break;
}
<!-- begin services -->
<div id="kronolithServices">
- <span style="display:none"><a href="#" id="kronolithNotifications" title="<?php echo _("These items need your attention") ?>">2 notifications</a> <span class="kronolithSeparator">·</span></span>
+ <span style="display:none"><a href="#" id="kronolithNotifications" title="<?php echo _("These items need your attention") ?>"></a> <span class="kronolithSeparator">·</span></span>
<a href="#" id="kronolithOptions"><?php echo _("Options") ?></a><?php if ($help_link) echo ' <span class="kronolithSeparator">·</span> ' . $help_link; if ($logout_link) echo ' <span class="kronolithSeparator">|</span> ' . $logout_link ?>
</div>
<!-- end services -->