Skip to content

Commit

Permalink
Use ajax object link if available, got lost too.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Apr 14, 2014
1 parent e2acfdb commit 83e83bc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions framework/Core/js/hordecore.js
Expand Up @@ -425,6 +425,7 @@ var HordeCore = {
sticky: true
});
growl.store('alarm', alarm.id);
m.flags.growl = growl;

if (alarm.user) {
message.down('select').observe('change', function(e) {
Expand Down
24 changes: 24 additions & 0 deletions kronolith/js/kronolith.js
Expand Up @@ -4158,6 +4158,29 @@ KronolithCore = {
HordeTopbar.searchGhost.reset();
},

/**
* Event handler for HordeCore:showNotifications events.
*/
showNotification: function(e)
{
if (!e.memo.flags ||
!e.memo.flags.alarm ||
!e.memo.flags.growl ||
!e.memo.flags.alarm.params.notify.ajax) {
return;
}

var growl = e.memo.flags.growl, link = growl.down('A');

if (link) {
link.observe('click', function(ee) {
ee.stop();
HordeCore.Growler.ungrowl(growl);
this.go(e.memo.flags.alarm.params.notify.ajax);
}.bind(this));
}
},

/* Keydown event handler */
keydownHandler: function(e)
{
Expand Down Expand Up @@ -6935,6 +6958,7 @@ document.observe('DragDrop2:start', KronolithCore.onDragStart.bindAsEventListene
document.observe('Horde_Calendar:select', KronolithCore.datePickerHandler.bindAsEventListener(KronolithCore));
document.observe('FormGhost:reset', KronolithCore.searchReset.bindAsEventListener(KronolithCore));
document.observe('FormGhost:submit', KronolithCore.searchSubmit.bindAsEventListener(KronolithCore));
document.observe('HordeCore:showNotifications', KronolithCore.showNotification.bindAsEventListener(KronolithCore));
if (Prototype.Browser.IE) {
$('kronolithBody').observe('selectstart', Event.stop);
}
Expand Down

0 comments on commit 83e83bc

Please sign in to comment.