</td>
<td style="width: 35%;">
<?php
+ // FIXME: Convert to <a href=javascript>
$attrs = array('onclick' => 'javascript:destinfo("' . $extension . '");',
'id' => 'destX' . $extension . 'toggle');
echo Horde::img('tree/plusonly.png', _("Destinations"), $attrs,
echo Horde::link($editurl);
echo $info['name']; ?>
</a>
- <span id="destX<?php echo $extension; ?>summary">
- <?php
- foreach ($info['devices'] as $device) {
- echo Horde::img('shout.png');
- }
- foreach ($info['numbers'] as $number) {
- echo Horde::img('telephone-pole.png');
- }
- ?>
- </span>
+ <span id="destX<?php echo $extension; ?>summary"></span>
<div class="extensionDestinations" id="destX<?php echo $extension; ?>info">
</div>
</td>
$('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) {
}
dest['devices'].each(function(s) {
+ // Fill in detail block
img = document.createElement('img');
img.src = "<?php echo $registry->getImageDir() . '/shout.png'; ?>";
text = document.createTextNode(" "+s+" ");
$('destX'+exten+'info').appendChild(text);
$('destX'+exten+'info').appendChild(del);
$('destX'+exten+'info').appendChild(br);
+
+ // Create summary icons
+ img = document.createElement('img');
+ img.src = "<?php echo $registry->getImageDir() . '/shout.png'; ?>";
+ $('destX'+exten+'summary').appendChild(img);
+
});
dest['numbers'].each(function(s) {
+ // Fill in detail block
img = document.createElement('img');
img.src = "<?php echo $registry->getImageDir() . '/telephone-pole.png'; ?>";
text = document.createTextNode(" "+s+" ");
$('destX'+exten+'info').appendChild(text);
$('destX'+exten+'info').appendChild(del);
$('destX'+exten+'info').appendChild(br);
+
+ // Create summary icons
+ img = document.createElement('img');
+ img.src = "<?php echo $registry->getImageDir() . '/telephone-pole.png'; ?>";
+ $('destX'+exten+'summary').appendChild(img);
});
form = document.createElement('form');