From: Ben Klang Date: Tue, 26 Jan 2010 22:21:08 +0000 (-0500) Subject: Shout: Continue fixes from conversion to new H_R#appInit() X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7080e7ce1baa9b108fba10489cda8716d76a2053;p=horde.git Shout: Continue fixes from conversion to new H_R#appInit() --- diff --git a/shout/lib/Ajax/Application.php b/shout/lib/Ajax/Application.php index 5c3e5e49c..f8b93d5b9 100644 --- a/shout/lib/Ajax/Application.php +++ b/shout/lib/Ajax/Application.php @@ -21,7 +21,9 @@ class Shout_Ajax_Application extends Horde_Ajax_Application_Base */ public function notificationHandler() { - return $GLOBALS['kronolith_notify']; + // FIXME: Create Shout notification handler + //return $GLOBALS['kronolith_notify']; + return null; } /** @@ -29,6 +31,7 @@ class Shout_Ajax_Application extends Horde_Ajax_Application_Base */ public function addDestination($vars) { + $shout = Horde_Registry::appInit('shout'); $context = $_SESSION['shout']['context']; try { // FIXME: Use Form? @@ -48,6 +51,7 @@ class Shout_Ajax_Application extends Horde_Ajax_Application_Base */ public function deleteDestination($vars) { + $shout = Horde_Registry::appInit('shout'); $context = $_SESSION['shout']['context']; try { // FIXME: Use Form? @@ -67,6 +71,8 @@ class Shout_Ajax_Application extends Horde_Ajax_Application_Base */ public function getDestinations($vars) { + $shout = Horde_Registry::appInit('shout'); + Horde::logMessage(print_r($vars, true), __FILE__, __LINE__, PEAR_LOG_ERR); $context = $_SESSION['shout']['context']; try { return $shout->extensions->getExtensions($context); diff --git a/shout/templates/extensions/list.inc b/shout/templates/extensions/list.inc index b3488c618..cf35bd9b1 100644 --- a/shout/templates/extensions/list.inc +++ b/shout/templates/extensions/list.inc @@ -84,6 +84,14 @@ function resetExtenDest(exten) dest.numbers = []; } + if (dest.devices.size() == 0 && dest.numbers.size() == 0) { + var span = document.createElement('span'); + span.className = 'informational'; + var text = document.createTextNode("No destinations configured"); + span.appendChild(text); + $('destX' + exten + 'summary').appendChild(span); + } + dest.devices.each(function (s) { // Fill in detail block var img = document.createElement('img'); diff --git a/shout/themes/screen.css b/shout/themes/screen.css index b9678176d..c93634893 100644 --- a/shout/themes/screen.css +++ b/shout/themes/screen.css @@ -64,4 +64,8 @@ ul { float: left; } +.informational { + font-style: italic; +} +