pari: trunk r11 - in /trunk/config: meetme.html numberplan.html queues.html

asterisk-gui-commits at lists.digium.internal asterisk-gui-commits at lists.digium.internal
Tue Sep 5 14:18:16 CDT 2006


Author: pari
Date: Tue Sep  5 14:18:15 2006
New Revision: 11

URL: http://svn.digium.com/view/asterisk-gui?rev=11&view=rev
Log:
Some minor HTML fixes and an attempt to implement the combobox myself instead of the borrowed code

Modified:
    trunk/config/meetme.html
    trunk/config/numberplan.html
    trunk/config/queues.html

Modified: trunk/config/meetme.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/meetme.html?rev=11&r1=10&r2=11&view=diff
==============================================================================
--- trunk/config/meetme.html (original)
+++ trunk/config/meetme.html Tue Sep  5 14:18:15 2006
@@ -240,10 +240,10 @@
 				<div style="background-image:url(images/slice-v.png)" id='advancedw'>
 				<table id='advancedi' align='center'><tr><td>
 				<tr><td>Room Override:</td><td><input size='5' id='room'  onkeypress="return OnlyNumbers(event)"></td></tr>
-				<tr><td>Record conference</td><td><input type='checkbox' id='record'></select></td></tr>
-				<tr><td>Quiet Mode</td><td><input type='checkbox' id='quiet'></select></td></tr>
-				<tr><td>Wait for marked user</td><td><input type='checkbox' id='waitmarked'></select></td></tr>
-				<tr><td>Set marked user</td><td><input type='checkbox' id='setmarked'></select></td></tr>
+				<tr><td>Record conference</td><td><input type='checkbox' id='record'></td></tr>
+				<tr><td>Quiet Mode</td><td><input type='checkbox' id='quiet'></td></tr>
+				<tr><td>Wait for marked user</td><td><input type='checkbox' id='waitmarked'></td></tr>
+				<tr><td>Set marked user</td><td><input type='checkbox' id='setmarked'></td></tr>
 				</td></tr></table>
 				</div>
 			</td></tr>

Modified: trunk/config/numberplan.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/numberplan.html?rev=11&r1=10&r2=11&view=diff
==============================================================================
--- trunk/config/numberplan.html (original)
+++ trunk/config/numberplan.html Tue Sep  5 14:18:15 2006
@@ -36,8 +36,6 @@
 	var fieldnames = new Array(
 				'name', 'delete', 'status', 'new', 'newitem', 'priority', 'realpriority',
 				'save', 'cancel', 'comment', 'planident', 'trunk');
-	var fActiveMenu = false; // Combo Box related
-	var oOverMenu = false; // Combo Box related
 
 	function changed_extension() {
 		var app;
@@ -227,8 +225,6 @@
 		$('realpriority').disabled = true;
 	}
 
-	
-
 
 
 
@@ -263,9 +259,6 @@
 		$('newitem').disabled=true;
 		return false;
 	}
-
-
-
 
 
 	callbacks.loaded = function() {
@@ -328,65 +321,12 @@
 		} else
 			return t.name;
 	}
-
 	
 
 	usercallbacks.loaded = function() {
 		parent.astmanEngine.config2list("extensions.conf", $('extensions'), widgets, callbacks);
 	}
 
-
-		// Combo box related
-		function mouseSelect(e) {
-			if (fActiveMenu) {
-				if (oOverMenu == false) {
-					oOverMenu = false;
-					document.getElementById(fActiveMenu).style.display = "none";
-					fActiveMenu = false;
-					return false;
-				}
-				return false;
-			}
-			return true;
-		}
-
-
-		function menuActivate(idEdit, idMenu, idSel) {
-			if (fActiveMenu) return mouseSelect(0);
-			oMenu = document.getElementById(idMenu);
-			oEdit = document.getElementById(idEdit);
-			nTop = oEdit.offsetTop + oEdit.offsetHeight;
-			nLeft = oEdit.offsetLeft;
-			while (oEdit.offsetParent != document.body){
-				oEdit = oEdit.offsetParent;
-				nTop += oEdit.offsetTop;
-				nLeft += oEdit.offsetLeft;
-			}
-			oMenu.style.left = nLeft;
-			oMenu.style.top = nTop;
-			oMenu.style.display = "";
-			fActiveMenu = idMenu;
-			document.getElementById(idSel).focus();
-			return false;
-		}
-
-		function textSet(idEdit, text){
-			document.getElementById(idEdit).value = text;
-			oOverMenu = false;
-			mouseSelect(0);
-			document.getElementById(idEdit).focus();
-		}
-
-		function comboKey(idEdit, idSel){
-			if (window.event.keyCode == 13 || window.event.keyCode == 32)
-				textSet(idEdit,idSel.value);
-			else if (window.event.keyCode == 27){
-				mouseSelect(0);
-				document.getElementById(idEdit).focus();
-			}
-		}
-		document.onmousedown = mouseSelect;
-		// End of 'Combo box related'
 
 
 	function togglefeatures() {
@@ -399,7 +339,6 @@
 			new Rico.Effect.Size('advancedw', null, 200, 120, 8 );
 		}
 	}
-
 
 	
 	function localajaxinit() {
@@ -416,8 +355,9 @@
 		}
 		
 		parent.astmanEngine.config2list("users.conf", $('trunk'), new Array(), usercallbacks);
-	}
-
+		document.getElementById('combosel').style.display = "none";
+
+	}
 
 
 
@@ -485,6 +425,38 @@
 				select_item($('extensions'));
 
 		}
+
+
+		// Experimenting	with the combo box as Mark originally wanted it		- Pari
+		function combo_action(){
+			$('name').value = $('combosel').value;
+			document.getElementById('combosel').style.display = "none";
+			document.getElementById('name').style.display = "";
+		}
+
+		function combo_activate(){
+				tmp_left = $('name').offsetLeft;
+				tmp_top = $('name').offsetTop;
+				tmp_parent = $('name').offsetParent;
+
+				while(tmp_parent.offsetParent != document.body){
+						tmp_parent = tmp_parent.offsetParent;
+						tmp_left += tmp_parent.offsetLeft;
+						tmp_top += tmp_parent.offsetTop;
+				}
+
+				$('combosel').style.left = tmp_left;
+				$('combosel').style.top = tmp_top ;
+
+				document.getElementById('name').style.display = "none";
+				document.getElementById('combosel').style.display = "";
+
+				$('combosel').focus();
+				return false;
+
+		}
+		// End of Experiment with combo box
+
 </script>
 <body id="foo" onload="localajaxinit()">
 <div class="mainscreenTitleBar">
@@ -523,18 +495,13 @@
 						<tr><td><b>.</b></td><td>Any number of additional digits</td></tr>
 					</table>
 				</td></tr>
-				<tr><td>Pattern:</td><td><input size='20' id='name'><input type="button" hidefocus="1" value="&#9660;" style="height:21; width:17; font-size: 7px; font-family: helvetica;"
-    onclick="JavaScript:menuActivate('name', 'combodiv', 'combosel')">
-						<div id="combodiv" style="position:absolute; display:none; top:0px; left:0px;z-index:10000" onmouseover="javascript:oOverMenu='combodiv';" onmouseout="javascript:oOverMenu=false;">
-						  <select size="10" id="combosel" style="width: 220; border-style: none"
-							onclick="JavaScript:textSet('name',this.value); if(!$('name').disabled){$('save').disabled = false;$('cancel').disabled = false;}"
-							onkeypress="JavaScript:comboKey('name', this);">
+				<tr><td>Pattern:</td><td><input size='18' id='name' onclick="combo_activate();">
+						  <select id="combosel" onclick="combo_action();" style="top:1px;left:1px; font-family: Verdana, Arial, Helvetica, Sans-Serif;font-size: 11px; ">
 							<option value="_9NXXXXXX">_9NXXXXXX (Seven Digit Dial)</option>
 							<option value="_9NXXNXXXXXX">_9NXXNXXXXXX (Ten Digit Dial)</option>
 							<option value='_91NXXNXXXXXX'>_91NXXNXXXXXX (1+ Dial)</option>
 							<option value='_9011.'>_9011. (International Dial)</option>
 						  </select>
-						</div>
 				</td></tr>
 				<tr><td>Trunk:</td><td><select id='trunk'></select></td></tr>
 				<tr><td>Priority:</td><td><input size='4' id='priority'></td></tr>

Modified: trunk/config/queues.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/queues.html?rev=11&r1=10&r2=11&view=diff
==============================================================================
--- trunk/config/queues.html (original)
+++ trunk/config/queues.html Tue Sep  5 14:18:15 2006
@@ -209,7 +209,7 @@
 <table class="mainscreenTable" align="center">
 	<tr valign="top">
 		<td colspan='2'>
-		Extensions:
+		Call Queues:
 		</td>
 	</tr>
 	<tr valign="top">
@@ -224,11 +224,11 @@
 			<tr valign="top"><td>
 				<table>
 				<tr><td>Extension:</td><td><input size='5' id='name'  onkeypress="return OnlyNumbers(event)"></td></tr>
-				<tr><td>PIN Code:</td><td><input size='5' id='pin'  onkeypress="return OnlyNumbers(event)"></select></td></tr>
-				<tr><td>Administrator PIN Code:</td><td><input size='5' id='pinadmin'  onkeypress="return OnlyNumbers(event)"></select></td></tr>
-				<tr><td>Play hold music for first caller</td><td><input type='checkbox' id='music'></select></td></tr>
-				<tr><td>Enable caller menu</td><td><input type='checkbox' id='menu'></select></td></tr>
-				<tr><td>Announce callers</td><td><input type='checkbox' id='announce'></select></td></tr>
+				<tr><td>PIN Code:</td><td><input size='5' id='pin'  onkeypress="return OnlyNumbers(event)"></td></tr>
+				<tr><td>Administrator PIN Code:</td><td><input size='5' id='pinadmin'  onkeypress="return OnlyNumbers(event)"></td></tr>
+				<tr><td>Play hold music for first caller</td><td><input type='checkbox' id='music'></td></tr>
+				<tr><td>Enable caller menu</td><td><input type='checkbox' id='menu'></td></tr>
+				<tr><td>Announce callers</td><td><input type='checkbox' id='announce'></td></tr>
 				<tr><td colspan='2' align='center'><div style="height:15px" id='status'></div></td></tr>
 				<tr><td colspan='2'></td></tr>
 				</table>
@@ -239,10 +239,10 @@
 				<div style="background-image:url(images/slice-v.png)" id='advancedw'>
 				<table id='advancedi' align='center'><tr><td>
 				<tr><td>Room Override:</td><td><input size='5' id='room'  onkeypress="return OnlyNumbers(event)"></td></tr>
-				<tr><td>Record conference</td><td><input type='checkbox' id='record'></select></td></tr>
-				<tr><td>Quiet Mode</td><td><input type='checkbox' id='quiet'></select></td></tr>
-				<tr><td>Wait for marked user</td><td><input type='checkbox' id='waitmarked'></select></td></tr>
-				<tr><td>Set marked user</td><td><input type='checkbox' id='setmarked'></select></td></tr>
+				<tr><td>Record conference</td><td><input type='checkbox' id='record'></td></tr>
+				<tr><td>Quiet Mode</td><td><input type='checkbox' id='quiet'></td></tr>
+				<tr><td>Wait for marked user</td><td><input type='checkbox' id='waitmarked'></td></tr>
+				<tr><td>Set marked user</td><td><input type='checkbox' id='setmarked'></td></tr>
 				</td></tr></table>
 				</div>
 			</td></tr>



More information about the asterisk-gui-commits mailing list