rbrindley: branch rbrindley/features_revamp r4732 - /team/rbrindley/features_...

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Thu Apr 9 12:35:32 CDT 2009


Author: rbrindley
Date: Thu Apr  9 12:35:29 2009
New Revision: 4732

URL: http://svn.digium.com/svn-view/asterisk-gui?view=rev&rev=4732
Log:

- generalized feature's handlers to work for all sections
- all sections now match feature's html format


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=4732&r1=4731&r2=4732
==============================================================================
--- team/rbrindley/features_revamp/config/features2.html (original)
+++ team/rbrindley/features_revamp/config/features2.html Thu Apr  9 12:35:29 2009
@@ -61,11 +61,11 @@
 			margin: 4px;
 		}
 
-		#feature_map .enabled {
+		.section .enabled {
 			color: #000000;
 		}
 
-		#feature_map .disabled {
+		.section .disabled {
 			color: #777777;
 		}
 
@@ -82,49 +82,85 @@
 	<div id="right_container" class="container">
 		<div id="dial_options" class="section">
 			<span class="title"><img class="title_img" src="images/asterisk_red.gif"/>Dial Options</span>
-			<div><input type="checkbox" id="dial_t" /> (t-Option) Allow the called party to transfer the calling party by sending the 'Blind Transfer' or 'Attended Transfer' feature maps.</div>
-			<div><input type="checkbox" id="dial_T" /> (T-Option) Allow the calling party to transfer the called party by sending the 'Blind Transfer' or 'Attended Transfer' feature maps.</div>
-			<div><input type="checkbox" id="dial_h" /> (h-Option) Allow the called party to hang up by sending the 'Disconnect' feature map.</div>
-			<div><input type="checkbox" id="dial_H" /> (H-Option) Allow the calling party to hang up by sending the 'Disconnect' feature map.</div>
-			<div><input type="checkbox" id="dial_k" /> (k-Option) Allow the called party to enable parking of the call by sending the 'Call Parking' feature map.</div>
-			<div><input type="checkbox" id="dial_K" /> (K-Option) Allow the calling party to enable parking of the call by sending the 'Call Parking' feature map.</div>
+			<div class="feature disabled">
+				<input type="checkbox" id="dial_t" />
+				<label for="dial_t"> (t-Option) 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" />
+				<label for="dial_T"> (T-Option) 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" />
+				<label for="dial_h"> (h-Option) 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" />
+				<label for="dial_H"> (H-Option) 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" />
+				<label for="dial_k"> (k-Option) 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" />
+				<label for="dial_K"> (K-Option) Allow the calling party to enable parking of the call by sending the 'Call Parking' feature map.</label>
+				<span class="update"></span>
+			</div>
 		</div>
 	</div>
 	<div id="left_container" class="container">
 		<div id="feature_options" class="section">
 			<span class="title"><img class="title_img" src="images/asterisk_red.gif"/>Feature Options</span>
-			<div> Feature Digit Timeout: <input type="text" id="feature_digittimeout" size="4" /></div>
+			<div class="feature disabled">
+				<label for="feature_digittimeout">Feature Digit Timeout:</label>
+				<input type="text" id="feature_digittimeout" size="4" />
+				<span class="update"></span>
+			</div>
 		</div>
 		<div id="call_parking" class="section">
 			<span class="title"><img class="title_img" src="images/asterisk_red.gif"/>Call Parking</span>
-			<div>Extension to Dial to Park a Call: <input type="text" id="park_exten" size="4"/></div>
-			<div>Extensions for Parked Calls: <input type="text" id="park_pos" size="10" /> (Ex: '701-720')</div>
-			<div>Parked Call Timeout (in secs): <input type="text" id="park_time" size="2" /><br /></div>
+			<div class="feature disabled">
+				<label for="park_exten">Extension to Dial to Park a Call:</label>
+				<input type="text" id="park_exten" size="4"/>
+				<span class="update"></span>
+			</div>
+			<div class="feature disabled">
+				<label for="park_pos">Extensions for Parked Calls:</label>
+				<input type="text" id="park_pos" size="10" /> (Ex: '701-720')
+				<span class="update"></span>
+			</div>
+			<div class="feature disabled">
+				<label for="park_time">Parked Call Timeout (in secs):</label>
+				<input type="text" id="park_time" size="2" />
+				<span class="update"></span>
+			</div>
 		</div>
 		<div id="feature_map" class="section">
 			<span class="title"><img class="title_img" src="images/asterisk_red.gif"/>Feature Map</span>
 			<div class="feature disabled">
-				<input type="hidden" id="fmap_blindxfer" />
 				<label for="fmap_blindxfer">Blind Transfer:</label>
-				<input type="text" id="fmap_blindxfer_val" size="2" />  (default is #)
-				<span class="update"></span>
-			</div>
-			<div class="feature disabled">
-				<input type="hidden" id="fmap_disconnect" />
+				<input type="text" id="fmap_blindxfer" size="2" />  (default is #)
+				<span class="update"></span>
+			</div>
+			<div class="feature disabled">
 				<label for="fmap_disconnect">Disconnect:</label>
-				<input type="text" id="fmap_disconnect_val" size="2" />  (default is *)
-				<span class="update"></span>
-			</div>
-			<div class="feature disabled">
-				<input type="hidden" id="fmap_atxfer" />
+				<input type="text" id="fmap_disconnect" size="2" />  (default is *)
+				<span class="update"></span>
+			</div>
+			<div class="feature disabled">
 				<label for="fmap_atxfer">Attended Transfer:</label>
-				<input type="text" id="fmap_atxfer_val" size="2" />
-				<span class="update"></span>
-			</div>
-			<div class="feature disabled">
-				<input type="hidden" id="fmap_parkcall" />
+				<input type="text" id="fmap_atxfer" size="2" />
+				<span class="update"></span>
+			</div>
+			<div class="feature disabled">
 				<label for="fmap_parkcall">Call Parking:</label>
-				<input type="text" id="fmap_parkcall_val" size="2" />
+				<input type="text" id="fmap_parkcall" size="2" />
 				<span class="update"></span>
 			</div>
 		</div>
@@ -151,35 +187,27 @@
 		$('.refresh_icon').click( function() {
 			window.location.reload();
 		});
-		$('#feature_map')
-			.delegate('click', ':hidden', function() {
-				$(this).parents(".feature").toggleClass('disabled');
-				if (!$(this).parents('.feature').hasClass('disabled')) {
-					$('#'+$(this).attr('id')+'_val').focus();
-				} else {
-					/* send action to remove feature */
-					fmap.remove($(this));
+		$('#feature_map, #call_parking, #feature_options, #dial_options')
+			.delegate('click', 'label', function() {
+					$(this).siblings('input').click();
+			}).delegate('click', 'input', function() {
+				if ($(this).attr('type') !== 'checkbox') {
+					$(this).parents('.feature').removeClass('disabled');
 				}
-			}).delegate('click', ':text', function() {
-				$(this).parents('.feature').removeClass('disabled');
-				$(this).siblings(':hidden').attr('checked', 'checked');
-			}).delegate('change', ':text', function() {
-				if ($(this).val() === '') {
+			}).delegate('change', 'input', function() {
+				if ($(this).val() === '' || ($(this).attr('type') === 'checkbox' && $(this).attr('checked') === false)) {
 					$(this).parents('.feature').addClass('disabled');
-					$(this).siblings(':hidden').removeAttr('checked');
 					/* send action to remove feature */
 					fmap.remove($(this));
 				} else {
 					$(this).parents('.feature').removeClass('disabled');
-					$(this).siblings(':hidden').attr('checked', 'checked');
 					/* send action to update */
 					fmap.edit($(this));
 				}
 		});
-		$('#feature_map :text').blur(function() {
+		$('#feature_map :text, #call_parking :text, #feature_options :text').blur(function() {
 				if ($(this).val() === '') {
 					$(this).parents('.feature').addClass('disabled');
-					$(this).siblings(':hidden').removeAttr('checked');
 					/* send action to remove feature */
 					fmap.remove($(this));
 				} else {




More information about the asterisk-gui-commits mailing list