rbrindley: branch rbrindley/features_revamp r4741 - /team/rbrindley/features_...
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Thu Apr 16 14:17:32 CDT 2009
Author: rbrindley
Date: Thu Apr 16 14:17:29 2009
New Revision: 4741
URL: http://svn.digium.com/svn-view/asterisk-gui?view=rev&rev=4741
Log:
- added css for amap buttons width, .update class, errors, templates and hidden
- added values for dial option checkboxes
- added amap save button
- added event handlers for amaps
Modified:
team/rbrindley/features_revamp/config/features2.html
Modified: team/rbrindley/features_revamp/config/features2.html
URL: http://svn.digium.com/svn-view/asterisk-gui/team/rbrindley/features_revamp/config/features2.html?view=diff&rev=4741&r1=4740&r2=4741
==============================================================================
--- team/rbrindley/features_revamp/config/features2.html (original)
+++ team/rbrindley/features_revamp/config/features2.html Thu Apr 16 14:17:29 2009
@@ -108,6 +108,27 @@
#dial_options {
height: 305px;
+ }
+
+ td.buttons, th.buttons {
+ width: 100px;
+ }
+
+ .update {
+ background-color: #ffc58a;
+ border: 1px dotted #e8440c;
+ display: none;
+ padding: 2px;
+ padding-left: 4px;
+ padding-right: 4px;
+ }
+
+ .error {
+ background-color: #ffaeae;
+ }
+
+ .hidden {
+ display: none;
}
.template {
@@ -124,32 +145,32 @@
<div id="dial_options" class="section">
<span class="title"><img class="title_img" src="images/asterisk_red.gif"/>Dial Options</span>
<div class="feature disabled">
- <input type="checkbox" id="dial_t" />
+ <input type="checkbox" id="dial_t" value="t" />
<label for="dial_t"> <b>t</b> - Allow the called party to transfer the calling party by sending the 'Blind Transfer' or 'Attended Transfer' feature maps.</label>
<span class="update"></span>
</div>
<div class="feature disabled">
- <input type="checkbox" id="dial_T" />
+ <input type="checkbox" id="dial_T" value="T" />
<label for="dial_T"> <b>T</b> - Allow the calling party to transfer the called party by sending the 'Blind Transfer' or 'Attended Transfer' feature maps.</label>
<span class="update"></span>
</div>
<div class="feature disabled">
- <input type="checkbox" id="dial_h" />
+ <input type="checkbox" id="dial_h" value="h" />
<label for="dial_h"> <b>h</b> - Allow the called party to hang up by sending the 'Disconnect' feature map.</label>
<span class="update"></span>
</div>
<div class="feature disabled">
- <input type="checkbox" id="dial_H" />
+ <input type="checkbox" id="dial_H" value="H" />
<label for="dial_H"> <b>H</b> - Allow the calling party to hang up by sending the 'Disconnect' feature map.</label>
<span class="update"></span>
</div>
<div class="feature disabled">
- <input type="checkbox" id="dial_k" />
+ <input type="checkbox" id="dial_k" value="k" />
<label for="dial_k"> <b>k</b> - Allow the called party to enable parking of the call by sending the 'Call Parking' feature map.</label>
<span class="update"></span>
</div>
<div class="feature disabled">
- <input type="checkbox" id="dial_K" />
+ <input type="checkbox" id="dial_K" value="K" />
<label for="dial_K"> <b>K</b> - Allow the calling party to enable parking of the call by sending the 'Call Parking' feature map.</label>
<span class="update"></span>
</div>
@@ -219,7 +240,7 @@
<th>ActiveOn/By</th>
<th>App Name</th>
<th>Arguments</th>
- <th></th>
+ <th class="buttons"></th>
</tr>
</thead>
<tbody>
@@ -252,7 +273,8 @@
<input type="text" size="10" />
</td>
<td class="buttons">
- <span class="guiButton">Delete</span>
+ <span class="guiButton save hidden">Save</span>
+ <span class="guiButton delete">Delete</span>
</td>
</tr>
</tbody>
@@ -282,8 +304,30 @@
$('#application_map .guiButtonNew').click(function() {
newAmap();
});
- $('#application_map_list').delegate('click', 'span.guiButton', function() {
- $(this).parents('tr').remove();
+ $('#application_map_list')
+ .delegate('click', 'span.delete', function() {
+ removeAmap($(this));
+ }).delegate('click', 'span.save', function() {
+ editAmap($(this));
+ }).delegate('change', 'input, select', function() {
+ if ($(this).parents('td').hasClass('enabled')) {
+ if ($(this).attr('checked') === true) {
+ enableAmap();
+ } else {
+ disableAmap();
+ }
+ } else {
+ var obj = $(this).parents('tr');
+ var name = obj.find('.name > :text').val();
+ var digits = obj.find('.digits > :text').val();
+ var app_name = obj.find('.app_name :text').val();
+
+ if (validateAmap(obj, name, digits, app_name)) {
+ $(this).parents('td').siblings('.buttons').children('.save').show();
+ } else {
+ $(this).parents('td').siblings('.buttons').children('.save').hide();
+ }
+ }
});
$('#feature_map, #call_parking, #feature_options, #dial_options')
.delegate('click', ':text', function() {
More information about the asterisk-gui-commits
mailing list