From: Jan Schneider Date: Mon, 30 Nov 2009 17:02:51 +0000 (+0100) Subject: Store ajax location in a separate field. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d69409438fde86840c8af11681df9b06f8913b3d;p=horde.git Store ajax location in a separate field. --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index bde32bee9..3080d2a53 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -127,7 +127,11 @@ KronolithCore = { break; } message = m.alarm.title.escapeHTML(); - if (!Object.isUndefined(m.alarm.url)) { + if (!Object.isUndefined(m.alarm.ajax)) { + message = new Element('a') + .insert(message) + .observe('click', function() { this.go(m.alarm.ajax); }.bind(this)); + } else if (!Object.isUndefined(m.alarm.url)) { message = new Element('a', { 'href': m.alarm.url }) .insert(message); } diff --git a/nag/lib/Task.php b/nag/lib/Task.php index 65f7dc40e..fd067ca92 100644 --- a/nag/lib/Task.php +++ b/nag/lib/Task.php @@ -746,8 +746,8 @@ class Nag_Task { $methods['notify']['show'] = array( '__app' => $GLOBALS['registry']->getApp(), 'task' => $this->id, - 'tasklist' => $this->tasklist, - 'ajax' => 'task:' . $this->tasklist . ':' . $this->id); + 'tasklist' => $this->tasklist); + $methods['notify']['ajax'] = 'task:' . $this->tasklist . ':' . $this->id; if (!empty($methods['notify']['sound'])) { if ($methods['notify']['sound'] == 'on') { // Handle boolean sound preferences;