From: Ben Klang Date: Sat, 9 Jan 2010 18:21:31 +0000 (-0500) Subject: Shout: Update summary icons when changing destinations X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=2f0bf2311a95849dc1e3d645d374f53dd804e2ec;p=horde.git Shout: Update summary icons when changing destinations --- diff --git a/shout/extensions.php b/shout/extensions.php index d8472e720..36e00aa55 100644 --- a/shout/extensions.php +++ b/shout/extensions.php @@ -104,6 +104,7 @@ $extensions = $shout->extensions->getExtensions($context); Horde::addScriptFile('stripe.js', 'horde'); Horde::addScriptFile('prototype.js', 'horde'); + require SHOUT_TEMPLATES . '/common-header.inc'; require SHOUT_TEMPLATES . '/menu.inc'; diff --git a/shout/templates/extensions/list.inc b/shout/templates/extensions/list.inc index 91c87d6fd..fbcf012fc 100644 --- a/shout/templates/extensions/list.inc +++ b/shout/templates/extensions/list.inc @@ -37,6 +37,7 @@ $attrs = array('onclick' => 'javascript:destinfo("' . $extension . '");', 'id' => 'destX' . $extension . 'toggle'); echo Horde::img('tree/plusonly.png', _("Destinations"), $attrs, @@ -44,16 +45,7 @@ echo Horde::link($editurl); echo $info['name']; ?> - - - +
@@ -90,6 +82,10 @@ function _resetExtenDest(exten) $('destX'+exten+'info').removeChild(e); } + while ((e = $('destX'+exten+'summary').childNodes[0]) != null) { + $('destX'+exten+'summary').removeChild(e); + } + dest = destinations.get(exten); if (dest['devices'] == null) { @@ -101,6 +97,7 @@ function _resetExtenDest(exten) } dest['devices'].each(function(s) { + // Fill in detail block img = document.createElement('img'); img.src = "getImageDir() . '/shout.png'; ?>"; text = document.createTextNode(" "+s+" "); @@ -114,10 +111,17 @@ function _resetExtenDest(exten) $('destX'+exten+'info').appendChild(text); $('destX'+exten+'info').appendChild(del); $('destX'+exten+'info').appendChild(br); + + // Create summary icons + img = document.createElement('img'); + img.src = "getImageDir() . '/shout.png'; ?>"; + $('destX'+exten+'summary').appendChild(img); + }); dest['numbers'].each(function(s) { + // Fill in detail block img = document.createElement('img'); img.src = "getImageDir() . '/telephone-pole.png'; ?>"; text = document.createTextNode(" "+s+" "); @@ -131,6 +135,11 @@ function _resetExtenDest(exten) $('destX'+exten+'info').appendChild(text); $('destX'+exten+'info').appendChild(del); $('destX'+exten+'info').appendChild(br); + + // Create summary icons + img = document.createElement('img'); + img.src = "getImageDir() . '/telephone-pole.png'; ?>"; + $('destX'+exten+'summary').appendChild(img); }); form = document.createElement('form');