pari: trunk r819 - /trunk/config/
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Fri Apr 27 17:15:33 MST 2007
Author: pari
Date: Fri Apr 27 19:15:32 2007
New Revision: 819
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=819
Log:
part1 of --> cleanup of listing files, no need to store the files list in a DIV element
Modified:
trunk/config/backup.html
trunk/config/feditor.html
trunk/config/menus.html
trunk/config/record.html
Modified: trunk/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/backup.html?view=diff&rev=819&r1=818&r2=819
==============================================================================
--- trunk/config/backup.html (original)
+++ trunk/config/backup.html Fri Apr 27 19:15:32 2007
@@ -33,8 +33,7 @@
parent.astmanEngine.run_tool(asterisk_guiListFiles + " " + asterisk_ConfigBkpPath, callback = function() {
var opt = { method: 'get', asynchronous: true,
onComplete: function(originalRequest){
- _$('sysinfohtml').innerHTML = originalRequest.responseText;
- showlist_of_files();
+ showlist_of_files(originalRequest.responseText);
},
onFailure: function(t) { alert("Config Error: " + t.status + ": " + t.statusText); }
};
@@ -45,9 +44,8 @@
}
-function showlist_of_files(){
- var k = _$('list_files').innerHTML ;
- var bkpfiles = k.split("\n") ;
+function showlist_of_files(ors){
+ var bkpfiles = ors.split("\n") ;
clear_table();
for( var i =0 ; i < bkpfiles.length ; i++){
@@ -240,7 +238,6 @@
</tr>
</table>
</div>
-<div id="sysinfohtml" style="display:none"></div>
<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>
Modified: trunk/config/feditor.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/feditor.html?view=diff&rev=819&r1=818&r2=819
==============================================================================
--- trunk/config/feditor.html (original)
+++ trunk/config/feditor.html Fri Apr 27 19:15:32 2007
@@ -147,9 +147,7 @@
var opt = { method: 'get', asynchronous: true,
onComplete: function(originalRequest){
// Add config files to the list of files
- _$('sysinfohtml').innerHTML = originalRequest.responseText;
- var k = _$('list_files').innerHTML ;
- var recfiles = k.split("\n") ;
+ var recfiles = originalRequest.responseText.split("\n") ;
New_OPTION = document.createElement('option');
New_OPTION.text = "Config Files" ;
@@ -455,5 +453,4 @@
</tr>
</table>
</div>
-<div id="sysinfohtml" style="display:none"></div>
</body>
Modified: trunk/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/menus.html?view=diff&rev=819&r1=818&r2=819
==============================================================================
--- trunk/config/menus.html (original)
+++ trunk/config/menus.html Fri Apr 27 19:15:32 2007
@@ -970,10 +970,7 @@
parent.astmanEngine.run_tool(asterisk_guiListFiles + " " + asterisk_Sounds_path, callback = function() {
var opt = { method: 'get', asynchronous: true,
onComplete: function(originalRequest){
- _$('sysinfohtml').innerHTML = originalRequest.responseText;
- // Add Default sound files to the list of sound files
- var j = _$('list_files').innerHTML ;
- var sndfiles = j.split("\n") ;
+ var sndfiles = originalRequest.responseText.split("\n") ;
var New_OPTION = document.createElement('option');
New_OPTION.text = "Default Sounds" ;
New_OPTION.value = "" ;
@@ -1016,9 +1013,7 @@
var opt = { method: 'get', asynchronous: true,
onComplete: function(originalRequest){
// Add Recorded Voiemenus to the list of sound files
- _$('sysinfohtml').innerHTML = originalRequest.responseText;
- var k = _$('list_files').innerHTML ;
- var recfiles = k.split("\n") ;
+ var recfiles = originalRequest.responseText.split("\n") ;
New_OPTION = document.createElement('option');
New_OPTION.text = "Recorded Voicemenus" ;
New_OPTION.value = "" ;
@@ -1228,5 +1223,4 @@
</tr>
</table>
</div>
-<div id="sysinfohtml" style="display:none"></div>
</body>
Modified: trunk/config/record.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/record.html?view=diff&rev=819&r1=818&r2=819
==============================================================================
--- trunk/config/record.html (original)
+++ trunk/config/record.html Fri Apr 27 19:15:32 2007
@@ -36,9 +36,8 @@
parent.astmanEngine.config2list("users.conf", _$('newvmenu_ext'), new Array, callbacks);
}
-function showlist_of_files(){
- var k = _$('list_files').innerHTML ;
- var recfiles = k.split("\n") ;
+function showlist_of_files(ors){
+ var recfiles = ors.split("\n") ;
clear_table();
@@ -48,7 +47,7 @@
}
recfiles[i] = recfiles[i].replace(/^\s*|\s*$/g,'') ;
if( recfiles[i] == "" ){ continue; }
- addrow_totable( recfiles[i].stripTags(), i );
+ addrow_totable( recfiles[i].stripTags());
}
var _rft = _$('recfilesTable') ;
@@ -69,7 +68,7 @@
}
}
-function addrow_totable(filename, i){
+function addrow_totable(filename){
var newRow = _$('recfilesTable').insertRow(-1);
newRow.style.backgroundColor='#FFFFFF';
newRow.onmouseover= function(){ this.style.backgroundColor='#F9F0D1'; };
@@ -116,8 +115,7 @@
parent.astmanEngine.run_tool(asterisk_guiListFiles + " " + asterisk_menusRecord_path, callback = function() {
var opt = { method: 'get', asynchronous: true,
onComplete: function(originalRequest){
- _$('sysinfohtml').innerHTML = originalRequest.responseText;
- showlist_of_files();
+ showlist_of_files(originalRequest.responseText);
parent.loadscreen(this);
},
onFailure: function(t) { alert("Config Error: " + t.status + ": " + t.statusText); }
@@ -155,6 +153,13 @@
_nm_n.focus();
return true;
}
+ if ( _nm_n.value.search('^[a-zA-Z_0-9]*$') == -1){
+ gui_alert("spaces and special characters are not allowed in the filename.");
+ _nm_n.focus();
+ return true;
+ }
+
+
if ( _nm_e.value == ""){
gui_alert("Please Select an extension to record the VoiceMenu");
_nm_e.focus();
@@ -269,7 +274,6 @@
<tr> <td colspan=2 align=center height=10></td></tr>
</table>
</div>
-<div id="sysinfohtml" style="display:none"></div>
<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