rbrindley: branch 2.0 r4709 - in /branches/2.0/config: js/users.js users.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Mon Apr 6 10:58:11 CDT 2009


Author: rbrindley
Date: Mon Apr  6 10:58:07 2009
New Revision: 4709

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

- 3way calling and call waiting or now disabled and grayed when analog stations == 'None'


Modified:
    branches/2.0/config/js/users.js
    branches/2.0/config/users.html

Modified: branches/2.0/config/js/users.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/users.js?view=diff&rev=4709&r1=4708&r2=4709
==============================================================================
--- branches/2.0/config/js/users.js (original)
+++ branches/2.0/config/js/users.js Mon Apr  6 10:58:07 2009
@@ -289,6 +289,7 @@
 	_$('edit_userExtension_div_title').innerHTML = 'Create New User';
 	ASTGUI.feedback( { msg: 'Create New User !', showfor: 2 , color: 'green', bgcolor: '#FFFFFF' } );
 	RESET_USER_FORM_FIELDS();
+	$('#edit_fxs').change(); /* disable/enabled 3-way/callwaiting based on analog */
 	$('#edit_userExtension_div').showWithBg();
 	$('#User_AdvancedEditButton').hide();
 };
@@ -300,6 +301,7 @@
 	ASTGUI.feedback( { msg: 'Edit User Extension !', showfor: 2 , color: 'green', bgcolor: '#FFFFFF' } );
 	_$('edit_userExtension_div_title').innerHTML = 'Edit User Extension - ' + a ;
 	RESET_USER_FORM_FIELDS();
+	$('#edit_fxs').change(); /* disable/enabled 3-way/callwaiting based on analog */
 	$('#edit_userExtension_div').showWithBg();
 	try{_$('edit_userExtension_div').scrollIntoView(true);}catch(err){}
 };

Modified: branches/2.0/config/users.html
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/users.html?view=diff&rev=4709&r1=4708&r2=4709
==============================================================================
--- branches/2.0/config/users.html (original)
+++ branches/2.0/config/users.html Mon Apr  6 10:58:07 2009
@@ -505,7 +505,13 @@
 			$('.top_buttons').hide();
 			return;
 		}
+
+		/* lets init everything */
+		$('#whereToBuy_button').tooltip({ delay: 0.9, showURL: false, top: 15, left: -300});
+		load_users_table();
+		initialize_formFields();
 		
+		/* lets add some event handlers/delegators */
 		$('#new_ext')
 			.keyup(function() {
 				$('#edit_callerid_span').html(this.value);
@@ -536,12 +542,21 @@
 		$('#User_AdvancedEditButton').click(function() {
 			show_User_Edit_Advanced();
 		});
-
-		load_users_table();
-
-		$('#whereToBuy_button').tooltip({ delay: 0.9, showURL: false, top: 15, left: -300});
-
-		initialize_formFields();
+		$('#edit_fxs').change(function() {
+			/* lets disable all the inputs that are analog only if
+			 * there is no analog stations */
+			if ($('#edit_fxs option:selected').text() === 'None') {
+				$('#edit_3wayCalling').attr('disabled', 'disabled');
+				$('label[for=edit_3wayCalling]').css('color', '#555555');
+				$('#edit_callWaiting').attr('disabled', 'disabled');
+				$('label[for=edit_callWaiting]').css('color', '#555555');
+			} else {
+				$('#edit_3wayCalling').removeAttr('disabled');
+				$('label[for=edit_3wayCalling]').css('color', 'inherit');
+				$('#edit_callWaiting').removeAttr('disabled');
+				$('label[for=edit_callWaiting]').css('color', 'inherit');
+			}
+		}).change();
 	});
 </script>
 </body>




More information about the asterisk-gui-commits mailing list