pari: trunk r1288 - /trunk/config/menus.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Thu Aug 2 10:43:37 CDT 2007


Author: pari
Date: Thu Aug  2 10:43:37 2007
New Revision: 1288

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1288
Log:
Trying some layout changes to the Voicemenus page.

 - Allow more room for listing of the sequence of steps in the voice menu
 - Allow more room for keypress actions
 - Move 'Add new Step' options into a new popup window


This should solve problems related to 
http://bugs.digium.com/view.php?id=10339




Modified:
    trunk/config/menus.html

Modified: trunk/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/menus.html?view=diff&rev=1288&r1=1287&r2=1288
==============================================================================
--- trunk/config/menus.html (original)
+++ trunk/config/menus.html Thu Aug  2 10:43:37 2007
@@ -23,6 +23,25 @@
 <script src="scripts/astman.js"></script>
 <script src="scripts/tooltip.js"></script>
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
+<style type="text/css">
+	.page_header {
+		font-size : 12px;
+		padding : 4px 6px 4px 6px;
+		border-style : solid none solid none;
+		border-top-color : #BDC7E7;
+		border-bottom-color : #182052;
+		border-width : 1px 0px 1px 0px;
+		background-color : #ef8700;
+		margin-bottom: 10px;
+		color : #ffffff;
+	}
+
+	.VoiceMenuMainTable{
+		border : 0;
+		width	: 750px; 
+		font-size: 11px;
+	}
+</style>
 <script>
 var widgets = {};
 var adstatus;
@@ -388,6 +407,7 @@
 	makerequest('u','extensions.conf', uri,
 		function(t){
 			setTimeout(function(){ _$('status_message').style.display = 'none'; },sc_displaytime);
+			hide_addStep();
 			// if request successfull then add this to the steps select box
 			var newoption = document.createElement("option"); 
 			newoption.text = format_step(action_string ); 
@@ -724,7 +744,7 @@
 
         }else if( _nsa.value== "Background"  || _nsa.value== "Playback" ){
                 _nsv.style.display = "";
-                _nsv.size= 12;
+                _nsv.size=24;
         }else if( _nsa.value== "Authenticate"  || _nsa.value== "DigitTimeout"  || _nsa.value== "ResponseTimeout" ||  _nsa.value== "Wait"  ||  _nsa.value== "WaitExten"  || _nsa.value== "DISA"){
                 _$('newstep_var_digit').style.display= "" ;
         }else if(_nsa.value== "GotoMenu"  ){
@@ -789,6 +809,7 @@
 	}
 
 	_steps.disabled = false;
+	_$('b_ShowAddStep').disabled = false;
 	_$('addstep').disabled = false;
 	_$('allowexten').disabled = false;
 	_$('comment').disabled = false;
@@ -921,6 +942,7 @@
 	_$('newstep_action').disabled = true;
 	_$('newstep_var').disabled = true;
 	_$('addstep').disabled = true;
+	_$('b_ShowAddStep').disabled = true;
 	_$('steps').disabled = true;
 	_$('stepUp').disabled = true;
 	_$('stepDown').disabled = true;
@@ -966,6 +988,7 @@
 	_$('newstep_action').disabled = true;
 	_$('newstep_var').disabled = true;
 	_$('addstep').disabled = true;
+	_$('b_ShowAddStep').disabled = true;
 	_steps.disabled = true;
 	//  4. Reset Comment
 	_$('keypressoptions').style.display = "";
@@ -978,6 +1001,7 @@
 
 
 function localajaxinit() {
+	parent._$('mainscreen').width= 798;
 	ASTGUI.events.add(document, 'mouseover', show_tooltip);
 	showdiv_statusmessage();
 	setWindowTitle("Voice Menus");
@@ -1168,6 +1192,7 @@
 }
 
 function free_mem(){
+	parent._$('mainscreen').width= 540;
 	if( navigator.userAgent.indexOf("MSIE") == -1 ){ return true; }
 	try{
 		widgets['save'].hostselectbox = null ;
@@ -1177,22 +1202,30 @@
 		purge( document.body );
 	} catch(e){ }
 }
+
+function show_addStep(){
+	_$('bg_transparent').style.display="" ;
+	_$('NewStep_Content').style.display="" ;
+}
+
+function hide_addStep(){
+	_$('bg_transparent').style.display="none" ;
+	_$('combodiv_sounds').style.display="none" ;
+	_$('NewStep_Content').style.display="none" ;
+}
 </script>
 <body id="foo" onload="localajaxinit()"  bgcolor="EFEFEF" onunload="free_mem()">
-<div class="mainscreenTitleBar">
+<div class="page_header">
 	<span style="margin-left: 4px;font-weight:bold;">Voice Menus Configuration</span>
 	<span style="cursor: pointer; cursor: hand;" onclick="window.location.href=window.location.href;" >&nbsp;<img src="images/refresh.png" title=" Refresh " border=0 >&nbsp;</span>
 </div>
 <div class="mainscreenContentBox" id="userscontent">
-<table class="mainscreenTable" align="center">
-	<tr valign="top">
-		<td colspan='2'> Voice Menus: </td>
-	</tr>
+<table class="VoiceMenuMainTable" align="left">
 	<tr valign="top">
 		<td>	<select size="25" id="vmenus" style="width:180px;" class="input10"><option>Loading...</option></select>	</td>
-		<td valign=top align="right" width=346 height=415>
+		<td valign=top align="right" width=560 height=415>
 			<select id='extensions' style='display:none;width:0px;height:0px'></select><select id='users' style='display:none;width:0px;height:0px'></select><select id='recorded_files' style='display:none;width:0px;height:0px'></select>
-			<table align="center" width="346">
+			<table align="center" width="560">
 			<tr>
 				<td width="50" align=left class="field_text" tip="en,menus,0">Name:</td>
 				<td align=left class="field_text">
@@ -1200,72 +1233,36 @@
 					<span tip="en,menus,5">
 					Extension: <input id="alias_exten"  onKeyUp="enable_savecancel()"  size=4 disabled class="input8" tip="en,menus,5">
 					</span>
+					&nbsp;&nbsp;&nbsp;&nbsp;
+					<label FOR="allowexten"  tip="en,menus,3">
+					<input type=checkbox id=allowexten disabled onclick="enable_savecancel()"> Allow Dialing other Extensions?
+					</label>
 				</td>
 			</tr>
 			<tr>	<td class="field_text"  tip="en,menus,1">Steps:<BR>
 					<input  style='width:45'  type="button" id="stepUp" value="Up" disabled onClick="step_up()" class="buttonbold"><BR><BR>
 					<input  style='width:45' type="button" id="stepDown" value="Down" disabled onClick="step_down()" class="buttonbold">
 				</td>
-				<td rowspan=2><select id='steps' size=5  style="width:280px;" onClick="step_onselect()" disabled class="input8"></select></td>
+				<td><select id='steps' size=8  style="width:550px;" onClick="step_onselect()" disabled class="input8"></select></td>
 			</tr>
-			<tr><td colspan=2 class="field_text" height=4  tip="en,menus,2"></td></tr>
-			<tr><td colspan=2 class="field_text"  tip="en,menus,2">Add a new Step:</td></tr>
+
+			<tr>	<td> </td>
+				<td class="field_text">
+				<input type=button style='width:105' id='b_ShowAddStep' onclick="show_addStep()"  value="Add new Step" disabled  class="buttonbold">
+				&nbsp;<input type=button style='width:140' id='deletestep' onclick="delete_step()"  value="Delete selected Step" disabled  class="buttonbold">
+				</td>
+			</tr>
+			<tr>	<td colspan=2 height=25></td></tr>
 			<tr><td colspan=2>
-
-				<NOBR>
-				<select id='newstep_action' disabled onChange="update_newstep_var()" class="input8">
-					<option value=""> -- Select --</option>
-					<option value="Answer">Answer</option>
-					<option value="Authenticate">Authenticate</option>
-					<option value="Background">Background</option>
-					<option value="Busy">Busy Tone</option>
-					<option value="Congestion">Congestion</option>
-					<!-- <option value="SetMusicOnHold">SetMusicOnHold</option> -->
-					<option value="DigitTimeout">DigitTimeout</option>
-					<option value="DISA">DISA</option>
-					<option value="ResponseTimeout">ResponseTimeout</option>
-					<option value="Playback">Playback</option>
-					<option value="Wait">Wait</option>
-					<option value="WaitExten">WaitExten</option>
-					<option value="GotoMenu">Goto Menu</option>
-					<option value="GotoDirecotry">Goto Directory</option>
-					<option value="GotoExtension">Goto Extension</option>
-					<!--<option value="GotoTimeBasedRule">Goto TimeBasedRule</option>-->
-					<option value="DialRingGroup">Dial RingGroup</option>
-					<option value="Hangup">Hangup</option>
-				</select>&nbsp;
-				<input type=text id="newstep_var" style="display:none" size=4 disabled class="input8">
-				<select id='add_newstep_extensions' style="display:none"   onChange=" $('newstep_var').value = $('add_newstep_extensions').value;"   class="input8"></select>
-				<select id='add_newstep_menus' style="display:none"    onChange=" $('newstep_var').value = $('add_newstep_menus').value;"   class="input8"></select>
-				<div id="combodiv_sounds">
-					<select size=5 id="combosel_sounds" style="font-family: Verdana, Arial, Helvetica, Sans-Serif;font-size: 11px;" class="input8"></select>
-				</div>
-				<select style="display:none" id="tbr" class="input8" onChange=" $('newstep_var').value = $('tbr').value;"></select>
-				<select style="display:none" id="rgrp" class="input8" onChange=" $('newstep_var').value = $('rgrp').value;"></select>
-				<input type=text id="newstep_var_digit" size=3 style="display:none;" onChange=" $('newstep_var').value = $('newstep_var_digit').value;"  pattern='^\d*$' class="input8">&nbsp;
-				<SCRIPT LANGUAGE="JavaScript">combo_box('newstep_var', "combodiv_sounds","combosel_sounds"); </SCRIPT>
-				<input type=button style='width:45' id='addstep' onclick="add_newstep()"  value="Add" disabled  class="buttonbold">
-				&nbsp;<input type=button style='width:50' id='deletestep' onclick="delete_step()"  value="Delete" disabled  class="buttonbold">
-				</NOBR>
-			</td>
-			</tr>
-			<tr>
-				<td colspan=2 class="field_text" tip="en,menus,3">
-				<label FOR="allowexten"  tip="en,menus,3">
-					&nbsp;<input type=checkbox id=allowexten disabled onclick="enable_savecancel()"> Dial other Extensions?
-				</label>&nbsp;</td>
-			</tr>
-			<tr>	<td colspan=2 height=6></td></tr>
-			<tr>	<td colspan=2 class="field_text"  tip="en,menus,4">'Keypress' Events</td>	</tr>
-			<tr><td colspan=2>
-				<div  style="width=340px;">
+				<div>
 					<table cellpadding=3 cellspacing=0 width="100%">
 					<TR bgcolor='#B8B8B8'>
 						<TD width=35 class="field_text">Key</TD><TD class="field_text">Action</TD>
+						<TD width=440 class="field_text" tip="en,menus,4" align=center><B>'Keypress' Events</B></TD>
 					</TR>
 					</table>
 				</div>
-				<div id="keypressoptions" style="height:155px;width=340px; overflow :auto;display :none;">
+				<div id="keypressoptions" style="height:190px;overflow :auto;display :none;">
 					<table cellpadding=3 cellspacing=0 width="100%">
 					<script>
 					for (var k=0; k< keys.length; k++){
@@ -1302,4 +1299,58 @@
 	</tr>
 </table>
 </div>
+<div id="NewStep_Content" STYLE="display:none; position: absolute; left: 40; top: 64; width:580; height:60;  background-color:#F4EFE5;   border-width: 1px; border-color: #7E5538; border-style: solid; z-index:100">
+	<table width="100%" cellpadding=0 cellspacing=0  onmousedown="ASTGUI.startDrag(event , 'NewStep_Content');">
+	<TR bgcolor="#7E5538"  style="background-image:url('images/title_gradient.gif');">
+		<TD tip="en,menus,2"><font color="#FFFFFF">&nbsp;&nbsp;<B>Add a new Step:</B></FONT></TD>
+		<TD Height="20" align="right" style="cursor: move">
+			<A href="#" onclick="hide_addStep();" style="color:#FFFFFF; font-size: 12px; font-weight:bold;">X</A>
+		</TD>
+		<TD width=4></TD>
+	</TR>
+	</table>
+	<table cellpadding=2 cellspacing=2 border=0 width="100%" align="center">
+	<tr>	<td colspan=2 class="field_text" align=center height=40 valign=middle>
+		<NOBR>
+		Add new Step: 
+		<select id='newstep_action' disabled onChange="update_newstep_var()" class="input8">
+			<option value=""> -- Select --</option>
+			<option value="Answer">Answer</option>
+			<option value="Authenticate">Authenticate</option>
+			<option value="Background">Background</option>
+			<option value="Busy">Busy Tone</option>
+			<option value="Congestion">Congestion</option>
+			<!-- <option value="SetMusicOnHold">SetMusicOnHold</option> -->
+			<option value="DigitTimeout">DigitTimeout</option>
+			<option value="DISA">DISA</option>
+			<option value="ResponseTimeout">ResponseTimeout</option>
+			<option value="Playback">Playback</option>
+			<option value="Wait">Wait</option>
+			<option value="WaitExten">WaitExten</option>
+			<option value="GotoMenu">Goto Menu</option>
+			<option value="GotoDirecotry">Goto Directory</option>
+			<option value="GotoExtension">Goto Extension</option>
+			<!--<option value="GotoTimeBasedRule">Goto TimeBasedRule</option>-->
+			<option value="DialRingGroup">Dial RingGroup</option>
+			<option value="Hangup">Hangup</option>
+		</select>&nbsp;
+		<input type=text id="newstep_var" style="display:none" size=4 disabled class="input8">
+		<select id='add_newstep_extensions' style="display:none" onChange=" $('newstep_var').value = $('add_newstep_extensions').value;"   class="input8"></select>
+		<select id='add_newstep_menus' style="display:none" onChange=" $('newstep_var').value = $('add_newstep_menus').value;"   class="input8"></select>
+		<select style="display:none" id="tbr" class="input8" onChange=" $('newstep_var').value = $('tbr').value;"></select>
+		<select style="display:none" id="rgrp" class="input8" onChange=" $('newstep_var').value = $('rgrp').value;"></select>
+		<input type=text id="newstep_var_digit" size=3 style="display:none;" onChange=" $('newstep_var').value = $('newstep_var_digit').value;"  pattern='^\d*$' class="input8">&nbsp;
+		<input type=button style='width:45' id='addstep' onclick="add_newstep()"  value="Add" disabled  class="buttonbold">
+		<input type=button style='width:55' onclick="hide_addStep()"  value="Cancel" class="buttonbold">
+		</NOBR>
+		</td>
+	</tr>
+	</table>
+</div>
+<div id="combodiv_sounds" STYLE="display:none;z-index:101">
+	<select size=10 id="combosel_sounds" style="font-family: Verdana, Arial, Helvetica, Sans-Serif;font-size: 11px;" class="input8"></select>
+</div>
+<SCRIPT LANGUAGE="JavaScript">combo_box('newstep_var', "combodiv_sounds","combosel_sounds"); </SCRIPT>
+<div id="bg_transparent" STYLE="display:none; position: absolute; left: 0; top: 24; width:100%; height:100%;  background-color:#EFEFEF; -moz-opacity:.50;opacity:.50; border-width: 1px; border-color: #EFEFEF; border-style: solid; z-index:4">
+</div>
 </body>




More information about the asterisk-gui-commits mailing list