Skip to content

Commit 62ecee9

Browse files
committed
Add JS for conference radio-table toggle
- semantically re-name the inputs in the conference applet radio-table (they were copied from the dial applet and retained the names). - add JS to toggle between on/off states of the input table. A future update should make this code generic so that individual applets don't need to implement this feature.
1 parent 6385078 commit 62ecee9

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
jQuery(function($) {
2+
3+
// Highlights the region for radio-tables
4+
$(".flow-instance .conference-applet input.conference-record-selector-radio").live('click', function() {
5+
$(this).closest('tr').siblings('tr').each(function(i, elem) {
6+
$(elem).removeClass('on').addClass('off');
7+
})
8+
.end().addClass('on').removeClass('off');
9+
});
10+
11+
});

plugins/standard/applets/conference/ui.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
);
1818
$record = AppletInstance::getValue('record','do-not-record');
1919
?>
20-
<div class="vbx-applet">
20+
<div class="vbx-applet conference-applet">
2121
<h2>Moderator</h2>
2222
<p>If you set a moderator, callers are placed on hold until a moderator calls in from one of their configured devices.</p>
2323
<?php echo AppletUI::UserGroupPicker('moderator'); ?>
@@ -40,15 +40,15 @@
4040
<table>
4141
<tr class="radio-table-row first <?php echo ($record === 'record-from-start') ? 'on' : 'off' ?>">
4242
<td class="radio-cell">
43-
<input type="radio" class='dial-whom-selector-radio' name="record" value="record-from-start" <?php echo ($record === 'record-from-start') ? 'checked="checked"' : '' ?> />
43+
<input type="radio" class='conference-record-selector-radio' name="record" value="record-from-start" <?php echo ($record === 'record-from-start') ? 'checked="checked"' : '' ?> />
4444
</td>
4545
<td class="content-cell">
4646
<h4>Enable</h4>
4747
</td>
4848
</tr>
4949
<tr class="radio-table-row last <?php echo ($record === 'do-not-record') ? 'on' : 'off' ?>">
5050
<td class="radio-cell">
51-
<input type="radio" class='dial-whom-selector-radio' name="record" value="do-not-record" <?php echo ($record === 'do-not-record') ? 'checked="checked"' : '' ?> />
51+
<input type="radio" class='conference-record-selector-radio' name="record" value="do-not-record" <?php echo ($record === 'do-not-record') ? 'checked="checked"' : '' ?> />
5252
</td>
5353
<td class="content-cell">
5454
<h4>Disable</h4>

0 commit comments

Comments
 (0)