pari: trunk r315 - /trunk/config/record.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Thu Feb 1 13:04:11 MST 2007


Author: pari
Date: Thu Feb  1 14:04:10 2007
New Revision: 315

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=315
Log:
tweak: in 'Record a Menu' panel, make the record a new voice menu as a modal window

Modified:
    trunk/config/record.html

Modified: trunk/config/record.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/record.html?view=diff&rev=315&r1=314&r2=315
==============================================================================
--- trunk/config/record.html (original)
+++ trunk/config/record.html Thu Feb  1 14:04:10 2007
@@ -68,6 +68,13 @@
 										 break;
 									}
 								}
+								if( $('table_recordefileslist'). rows.length == 0){
+										$('maintable').style.display = 'none';
+										$('no_rvmns').style.display = '';
+								}else{
+										$('no_rvmns').style.display = 'none';
+										$('maintable').style.display = '';
+								}
 							},
 							onFailure: function(t) {
 								$('status_message').style.display='none';
@@ -102,6 +109,13 @@
 					// newoption.text = filename_torecord ;
 					// newoption.value = filename_torecord ;
 					// $('recorded_files').options.add ( newoption );
+					if( $('table_recordefileslist'). rows.length == 0){
+							$('maintable').style.display = 'none';
+							$('no_rvmns').style.display = '';
+					}else{
+							$('no_rvmns').style.display = 'none';
+							$('maintable').style.display = '';
+					}
 			},
 			onFailure: function(t) {
 				alert("Config Error: " + t.status + ": " + t.statusText);
@@ -157,6 +171,7 @@
 
 	var filename_torecord = $('newvmenu_name').value + "." + $('format').value;
 	originate_recordrequest("YES", $('newvmenu_ext').value, filename_torecord);
+	hide_record();
 }
 
 function record_existing(filename){
@@ -209,6 +224,24 @@
 	for (var i=0; i < $('recorded_files').length; i++){
 		addrow_totable($('recorded_files').options[i].value);
 	}
+	if($('recorded_files').length == 0){
+		$('maintable').style.display = 'none';
+		$('no_rvmns').style.display = '';
+	}else{
+		$('no_rvmns').style.display = 'none';
+		$('maintable').style.display = '';
+	}
+}
+
+function show_record(){
+	$('bg_transparent').style.display = "";
+	$('recordnew_content').style.display = "";
+	$('newvmenu_name').focus();
+}
+
+function hide_record(){
+	$('bg_transparent').style.display = "none";
+	$('recordnew_content').style.display = "none";
 }
 
 function localajaxinit() {
@@ -216,6 +249,7 @@
 	parent.astmanEngine.config2list("users.conf", $('newvmenu_ext'), new Array, callbacks);
 	$('message_text').innerHTML = "Please wait while the system <BR> Calls the specified Extension ... ";
 }
+
 </script>
 <body id="foo" onload="localajaxinit()"  bgcolor="EFEFEF">
 <div class="mainscreenTitleBar">
@@ -226,7 +260,7 @@
 <table class="mainscreenTable" align="center">
 	<tr><td valign="top" align="center">
 			<BR>
-			<table cellpadding=3 cellspacing=0 border=0 width=400 style="border-width: 1px 1px 1px 1px; border-style: solid; border-color: #7E7E7E; ">
+			<table id="maintable" cellpadding=3 cellspacing=0 border=0 width=400 style="border-width: 1px 1px 1px 1px; border-style: solid; border-color: #7E7E7E; ">
 				<tr><td colspan=2 align=center class="field_text"><B>List of recorded voicemenus</B><select id='recorded_files' style="display:none"></select></td></tr>
 				<tr bgcolor="#FFFFFF"><td><font color="#2D4E93" width="300">File Name</font></td><td  color="#2D4E93" ></td></tr>
 				<tr><td colspan=2>
@@ -237,13 +271,36 @@
 				</tr>
 			</table>
 
-
-
+			<table width="500" cellspacing="1" cellpadding="2" border="0" align="center" id="no_rvmns" style="display: none"  bgcolor="#C2C2C2">
+				<tr>
+				<td align="center" bgcolor="#FFFFFF">
+				<br/>You do not have any <i>Recorded Voicemenus</i> <br/><br/>
+				Please click on the 'Record a new Voice Menu' button<br/> 
+				to record a new Voicemenu.<br/><br/>
+				</td>
+				</tr>
+			</table>
 			<BR><BR>
+			<div id="status"></div>
+			<BR><BR>
+			<input type="button" id="vvv" value="Record a new Voice Menu" onclick="show_record();">
+
+		<div id="recordnew_content" STYLE="display:none; position: absolute; left: 20; top: 125; width:475; height:150;  background-color:#F4EFE5;   border-width: 1px; border-color: #7E5538; border-style: solid;z-index:5">
+			<table width="100%" cellpadding=0 cellspacing=0 onmousedown="startDrag(event , 'recordnew_content');">
+			<TR bgcolor="#7E5538"  style="background-image:url('images/title_gradient.gif');">
+					<TD Height="20" align="center" style="cursor: move">
+					<font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">Record a new Voicemenu</font>
+					</TD>
+				   <TD Height="20" align="right" style="cursor: move">
+						<A href="#" onclick="hide_record();"><font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">X</font></A>
+					</TD>
+					<TD width=4></TD>
+			</TR>
+			</table>
 			<table cellpadding=2 cellspacing=2 border=0>
-				<tr>	<td colspan=2 height=40 valign=middle align=center class="field_text"><B>Record a new voicemenu</B> </td>	</tr>
+				<tr>	<td colspan=2 height=15 valign=middle align=center class="field_text"></td></tr>
 				<tr><td class="field_text">File Name:</td>
-						<td><input id='newvmenu_name' size=16 class="input8">
+						<td><input id='newvmenu_name' size=24 class="input8">
 								<input type="hidden" id="format" value="gsm">
 						</td>
 				</tr>
@@ -265,12 +322,17 @@
 						<td><select id='newvmenu_ext' class="input8"></select></td>
 				</tr>
 				<tr>	<td colspan=2 align=center height=10></td></tr>
-				<tr>	<td colspan=2 align=center><input type="button" id='record' Value="Record" onclick="record_new()" class="buttonbold"></td></tr>
-				<tr>	<td colspan=2 align=center height=10><div id="status"></div></td></tr>
+				<tr>	<td colspan=2 align=center>
+						<input type="button" Value="Cancel" onclick="hide_record();" class="buttonbold">&nbsp;&nbsp;&nbsp;
+						<input type="button" id='record' Value="Record" onclick="record_new()" class="buttonbold"></td></tr>
+				<tr>	<td colspan=2 align=center height=10></td></tr>
 			</table>
+		</div>
 	</td>
 	</tr>
 </table>
+</div>
+<div id="bg_transparent" STYLE="display:none; position: absolute; left: 0; top: 24; width:100%; height:100%;  background-color:#FFFFFF; filter:alpha(opacity=50); -moz-opacity:.50;opacity:.50; border-width: 1px; border-color: #7E5538; border-style: solid; z-index:4">
 </div>
 <SCRIPT LANGUAGE="JavaScript">
 <!--



More information about the asterisk-gui-commits mailing list