pari: branch aadk r736 - /branches/aadk/config/

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Mon Apr 23 17:05:23 MST 2007


Author: pari
Date: Mon Apr 23 19:05:23 2007
New Revision: 736

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=736
Log:
modify record.html, flashupdate.html and backup.html so that instead of checking compact flash everytime - they can now use parent.CFstatus

Modified:
    branches/aadk/config/backup.html
    branches/aadk/config/flashupdate.html
    branches/aadk/config/record.html

Modified: branches/aadk/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/backup.html?view=diff&rev=736&r1=735&r2=736
==============================================================================
--- branches/aadk/config/backup.html (original)
+++ branches/aadk/config/backup.html Mon Apr 23 19:05:23 2007
@@ -29,29 +29,15 @@
 function localajaxinit() {
 	setWindowTitle("Backup");
 	showdiv_statusmessage();
-	gui_sysinfo_mount();
-}
-
-function gui_sysinfo_mount(){
-	parent.astmanEngine.run_tool(asterisk_guiSysInfo, callback = function() {
-		var opt = { method: 'get', asynchronous: true,
-			onComplete: function(originalRequest){
-				_$('sysinfohtml').innerHTML = originalRequest.responseText;
-				aaaa();
-			},
-			onFailure: function(t) { alert("Config Error: " + t.status + ": " + t.statusText); }
-		};
-		opt.parameters="";
-		var tmp = new Ajax.Request(asterisk_guiSysInfo_output, opt);
-	});
+	aaaa();
 }
 
 function aaaa(){
 	parent.astmanEngine.run_tool(asterisk_guiListFiles + " " + asterisk_ConfigBkpPath, callback = function() { 
 		var opt = { method: 'get', asynchronous: true,
 			onComplete: function(originalRequest){
-				_$('sysinfohtml').innerHTML += originalRequest.responseText;
-				if( $('cf_status').innerHTML == "1"){
+				_$('sysinfohtml').innerHTML = originalRequest.responseText;
+				if( parent.CF_status ){
 					showlist_of_files();
 				}else{
 					gui_alert("You need a Compact Flash to use this feature");

Modified: branches/aadk/config/flashupdate.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/flashupdate.html?view=diff&rev=736&r1=735&r2=736
==============================================================================
--- branches/aadk/config/flashupdate.html (original)
+++ branches/aadk/config/flashupdate.html Mon Apr 23 19:05:23 2007
@@ -68,23 +68,12 @@
 		return;
 	}
 
-	parent.astmanEngine.run_tool( asterisk_guiSysInfo, callback = function() { // check it C.F is mounted
-		var opt = { method: 'get', asynchronous: true,
-			onComplete: function(originalRequest){
-				_$('sysinfohtml').innerHTML = originalRequest.responseText;
-				parent.loadscreen(this);
-				if( $('cf_status').innerHTML == "1"){ // if C.F is mounted, created an uploads folder
-					parent.astmanEngine.run_tool("mkdir -p " + uimage_uploadpath, callback = function() {}); 
-				}else{ // C.F not mounted 
-					_$('tdupload').style.display="none";
-				}
-			},
-			onFailure: function(t) { alert("Error: " + t.status + ": " + t.statusText); }
-		};
-		opt.parameters="";
-		var tmp = new Ajax.Request( asterisk_guiSysInfo_output, opt);
-	});
-
+	parent.loadscreen(this);
+	if( parent.CF_status){ // if C.F is mounted, created an uploads folder
+		parent.astmanEngine.run_tool("mkdir -p " + uimage_uploadpath, callback = function() {});
+	}else{ // C.F not mounted 
+		_$('tdupload').style.display="none";
+	}
 }
 
 

Modified: branches/aadk/config/record.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/record.html?view=diff&rev=736&r1=735&r2=736
==============================================================================
--- branches/aadk/config/record.html (original)
+++ branches/aadk/config/record.html Mon Apr 23 19:05:23 2007
@@ -33,24 +33,8 @@
 	showdiv_statusmessage();
 	setWindowTitle("Record a Menu");
 	_$('message_text').innerHTML = "Please wait while the system <BR> Calls the specified Extension ... ";
-	gui_sysinfo_mount();
-}
-
-
-function gui_sysinfo_mount(){
-	parent.astmanEngine.run_tool(asterisk_guiSysInfo, callback = function() {
-		var opt = { method: 'get', asynchronous: true,
-			onComplete: function(originalRequest){
-				_$('sysinfohtml').innerHTML = originalRequest.responseText;
-				parent.astmanEngine.config2list("users.conf", _$('newvmenu_ext'), new Array, callbacks);
-			},
-			onFailure: function(t) { alert("Config Error: " + t.status + ": " + t.statusText); }
-		};
-		opt.parameters="";
-		var tmp = new Ajax.Request(asterisk_guiSysInfo_output, opt);
-	});
-}
-
+	parent.astmanEngine.config2list("users.conf", _$('newvmenu_ext'), new Array, callbacks);
+}
 
 function showlist_of_files(){
 	var k = _$('list_files').innerHTML ;
@@ -133,7 +117,7 @@
 		var opt = { method: 'get', asynchronous: true,
 			onComplete: function(originalRequest){
 				_$('sysinfohtml').innerHTML += originalRequest.responseText;
-				if( $('cf_status').innerHTML == "1"){
+				if( parent.CF_status ){
 					showlist_of_files();
 					parent.loadscreen(this);
 				}else{



More information about the asterisk-gui-commits mailing list