pari: trunk r226 - in /trunk/config: setup/7.html users.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed Jan 10 15:27:57 MST 2007


Author: pari
Date: Wed Jan 10 16:27:56 2007
New Revision: 226

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=226
Log:
Register sip/iax devices with asterisk - this might not be the best way of doing it. The proper way is to add two DOM elements registeriax, registersip and add them in the array fieldnames, but then the GET request is running out of length, so making a new request for these two fields

Modified:
    trunk/config/setup/7.html
    trunk/config/users.html

Modified: trunk/config/setup/7.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/setup/7.html?view=diff&rev=226&r1=225&r2=226
==============================================================================
--- trunk/config/setup/7.html (original)
+++ trunk/config/setup/7.html Wed Jan 10 16:27:56 2007
@@ -308,7 +308,7 @@
 							<TD><input size='20' id='email' pattern='^[0-9a-zA-Z\.\-\_\@]*$' class="input8"></TD>
 						</TR>
 						<TR>
-							<TD>Called Id:</TD>
+							<TD>Caller id:</TD>
 							<TD><input size='12' id='cid_number'  pattern='^[\d\-]*$' class="input8"></TD>
 							<TD>Analog Phone:</TD>
 							<TD><select size="1" id='zapchan' style='width:120px' class="input8"></select></TD>

Modified: trunk/config/users.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/users.html?view=diff&rev=226&r1=225&r2=226
==============================================================================
--- trunk/config/users.html (original)
+++ trunk/config/users.html Wed Jan 10 16:27:56 2007
@@ -153,6 +153,33 @@
 					return true;
 				}
 		}
+	}
+
+	callbacks.savechanges = function(){
+			var opt = {
+				method: 'get',
+				asynchronous: true,
+				onSuccess: function(t) { 									
+
+				},
+				onFailure: function(t) {
+					alert("Config Error: " + t.status + ": " + t.statusText);
+				}
+			};
+			var p =0;
+			var uri = "";
+			if(	$('hassip').checked	){
+				uri += build_action('update', p, $('devices').value ,"registersip", "yes" ); p++;
+			}else{
+				uri += build_action('update', p, $('devices').value ,"registersip", "no" ); p++;
+			}
+			if(	$('hasiax').checked	){
+				uri += build_action('update', p, $('devices').value ,"registeriax", "yes" ); p++;
+			}else{
+				uri += build_action('update', p, $('devices').value ,"registeriax", "no" ); p++;
+			}
+			opt.parameters="action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("users.conf") + "&dstfilename=" + encodeURIComponent("users.conf") + uri;
+			var tmp = new Ajax.Request("../../rawman", opt);
 	}
 
 	phonecallbacks.format = function(t) {



More information about the asterisk-gui-commits mailing list