pari: trunk r87 - in /trunk/config: ./ scripts/ stylesheets/

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Sat Oct 21 15:24:28 MST 2006


Author: pari
Date: Sat Oct 21 17:24:27 2006
New Revision: 87

URL: http://svn.digium.com/view/asterisk-gui?rev=87&view=rev
Log:
Delete 'Recorded voicemenu' implemented using Local/tools

Modified:
    trunk/config/home.html
    trunk/config/homeapp.html
    trunk/config/record.html
    trunk/config/scripts/rico.js
    trunk/config/stylesheets/rico.css

Modified: trunk/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/home.html?rev=87&r1=86&r2=87&view=diff
==============================================================================
--- trunk/config/home.html (original)
+++ trunk/config/home.html Sat Oct 21 17:24:27 2006
@@ -38,6 +38,7 @@
 			$('secret').disabled = 0;
 			$('logoff').disabled = 1;
 			$('login').disabled = 0;
+			$('username').focus();
 		}
 	}
 	

Modified: trunk/config/homeapp.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/homeapp.html?rev=87&r1=86&r2=87&view=diff
==============================================================================
--- trunk/config/homeapp.html (original)
+++ trunk/config/homeapp.html Sat Oct 21 17:24:27 2006
@@ -44,6 +44,7 @@
 			$('factorydefault').disabled = 1;
 			$('saveconfig').disabled = 1;
 			$('login').disabled = 0;
+			$('username').focus();
 		}
 	}
 	

Modified: trunk/config/record.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/record.html?rev=87&r1=86&r2=87&view=diff
==============================================================================
--- trunk/config/record.html (original)
+++ trunk/config/record.html Sat Oct 21 17:24:27 2006
@@ -46,6 +46,49 @@
 		var tmp = new Ajax.Request("../../rawman", opt);
 }
 
+function delete_sounds(filename){
+	var ans = confirm("Delete recorded file "+ filename +" ?");
+	if (ans){
+			var opt = {
+				method: 'get',
+				asynchronous: true,
+				onSuccess: function(t) { 
+						$('status').innerHTML = " <I> Delete Request Successfull ! </I>";
+						// remove file name from stored config file
+						var opt2 = {
+							method: 'get',
+							asynchronous: true,
+							onSuccess: function() { 
+								// Remove this TR
+								var delete_id = "delete_" + filename;
+								var tableRow = $(delete_id).parentNode.parentNode; //gets TR object
+								for( var i=0; i <  $('table_recordefileslist'). rows.length; i++){
+									if  ( $('table_recordefileslist'). rows[i].id == tableRow.id){
+										 $('table_recordefileslist').deleteRow(i);
+										 break;
+									}
+								}
+							},
+							onFailure: function(t) {
+								$('status_message').style.display='none';
+								alert("Config Error: " + t.status + ": " + t.statusText);
+							}
+						};	
+						var uri = build_action('delcat', 0, filename,"", ""); 
+						opt2.parameters = "action=updateconfig&srcfilename=" + encodeURIComponent("customvoicemenus.conf") + "&dstfilename=" + encodeURIComponent("customvoicemenus.conf") + uri;
+						var tmp2 = new Ajax.Request('../../rawman', opt2);
+				},
+				onFailure: function(t) {
+					alert("Config Error: " + t.status + ": " + t.statusText);
+				}
+			};
+			opt.parameters="action=originate&channel=" + encodeURIComponent("Local/removefile at tools") + "&Variable=var1%3d"+ encodeURIComponent( filename )+"&application=noop&timeout=60000";
+			var tmp = new Ajax.Request("../../rawman", opt);
+	}
+	else{
+		//
+	}
+}
 
 
 function save_recordedvmenuname( filename_torecord ){
@@ -120,7 +163,8 @@
 		newCell2 .innerHTML = "<input "+ "type=\"button\"" + " id=\"recordover_" + filename +"\""+ " value='Record Again'"+  " onclick='record_existing(\"" + filename + "\")'>" 
 		+ "&nbsp;"+ "<input type=button id=\"play_"+filename+"\""+ " value='Play'" + " onclick='play_existing(\"" + filename.substr(0,(filename.length - 4) )+ "\")'>" ; // remove the extension for play back
 		var newCell3 = newRow.insertCell(2);
-		newCell3 .innerHTML = "<input type=\"checkbox\" id='selected_files' value=\""+ filename +"\">" ;
+		newCell3 .innerHTML = "<input type=\"button\" id='delete_" + filename + "' onclick='delete_sounds(\""+ filename + "\")'  value=\"Delete\">" ;
+
 }
 
 callbacks.format = function(t) {
@@ -163,18 +207,14 @@
 	<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; ">
-				<tr><td colspan=3 align=center><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><td  color="#2D4E93" ></td></tr>
-				<tr><td colspan=3>
+				<tr><td colspan=2 align=center><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>
 						<div style="height:125px;width=400px; overflow :auto;">
 						<table id="table_recordefileslist"  cellpadding=3 cellspacing=0 border=0 width="100%"></table>
 						</div>
 						</td>
 				</tr>
-				<tr><td width=300></td>
-						<td></td>
-						<td><input type=button id='delete' value="delete"></td>
-				</tr>
 			</table>
 
 
@@ -184,7 +224,7 @@
 				<tr>	<td colspan=2 height=40 valign=middle align=center><B>Record a new voicemenu</B> </td>	</tr>
 				<tr><td>File Name:</td>
 						<td><input id='newvmenu_name' size=16>
-								<input type="hidden" name="format" value="gsm">
+								<input type="hidden" id="format" value="gsm">
 						</td>
 				</tr>
 <!-- 				<tr><td>Format:</td>

Modified: trunk/config/scripts/rico.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/rico.js?rev=87&r1=86&r2=87&view=diff
==============================================================================
--- trunk/config/scripts/rico.js (original)
+++ trunk/config/scripts/rico.js Sat Oct 21 17:24:27 2006
@@ -188,7 +188,7 @@
          collapsedFontWeight : 'normal',
          hoverTextColor      : '#ffffff',
          borderColor         : '#1f669b',
-         panelHeight         : 200,
+         panelHeight         : 160,
          onHideTab           : null,
          onShowTab           : null,
          onLoadShowTab       : 0
@@ -224,7 +224,7 @@
                                    accordionTab.content,
                                    1,
                                    this.options.panelHeight,
-                                   100, 10,
+                                   100, 14,
                                    { complete: function() {accordion.showTabDone(lastExpandedTab)} } );
          this.lastExpandedTab = accordionTab;
       }
@@ -1785,7 +1785,7 @@
       this.pageSize  = pageSize;
       this.totalRows = totalRows;
       this.setOptions(options);
-      this.ArrowHeight = 16;
+      this.ArrowHeight = 20;
       this.columnCount = columnCount;
    },
 

Modified: trunk/config/stylesheets/rico.css
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/stylesheets/rico.css?rev=87&r1=86&r2=87&view=diff
==============================================================================
--- trunk/config/stylesheets/rico.css (original)
+++ trunk/config/stylesheets/rico.css Sat Oct 21 17:24:27 2006
@@ -37,7 +37,7 @@
 
 .accordionTabTitleBar {
    font-size           : 12px;
-	padding             : 2px 2px 2px 2px;
+	padding             : 2px 4px 2px 4px;
    border-style        : solid none solid none;
 	border-top-color    : #BDC7E7;
 	border-bottom-color : #182052;
@@ -51,10 +51,10 @@
 }
 
 .accordionTabContentBox {
-   font-size        : 11px;
+   font-size        : 12px;
    border           : 1px solid #1f669b;
    border-top-width : 0px;
-   padding          : 0px 8px 0px 8px;
+   padding          : 0px 11px 0px 11px;
 }
 
 #accordionExample {



More information about the asterisk-gui-commits mailing list