pari: branch asterisknow r491 - /branches/asterisknow/config/

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Mon Mar 26 16:47:11 MST 2007


Author: pari
Date: Mon Mar 26 18:47:11 2007
New Revision: 491

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=491
Log:
finishing rest of the AsteriskNOW merging

Modified:
    branches/asterisknow/config/cfgbasic.html
    branches/asterisknow/config/users.html

Modified: branches/asterisknow/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/cfgbasic.html?view=diff&rev=491&r1=490&r2=491
==============================================================================
--- branches/asterisknow/config/cfgbasic.html (original)
+++ branches/asterisknow/config/cfgbasic.html Mon Mar 26 18:47:11 2007
@@ -216,7 +216,7 @@
 
 function system_link(){
 	var newwindow_href = location.protocol + '//' + location.hostname + ':8003';
-	window.open(newwindow_href ,'mainwindow','width=1024,height=768,resizable=no, scrollbars=no, toolbar=no, location=no,status=yes, menubar=no')
+	window.open(newwindow_href ,'mainwindow','width=1024,height=768,resizable=no, scrollbars=yes, toolbar=no, location=no,status=yes, menubar=no')
 }
 
 function reloadConfig(){
@@ -248,7 +248,7 @@
 
 	</td>
 	<td valign='bottom' align='right' bgcolor='white'>
-		<!-- <a href="#" onclick=" system_link()">System Configuration</a>&nbsp;|&nbsp; -->
+		<a href="#" onclick=" system_link()">System Configuration</a><BR>
 		<a target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a>&nbsp;|&nbsp;
 		<a target='_extern' href="http://www.asterisknow.org/bugs">Report a Bug</a>&nbsp;|&nbsp;
 		<a target='_extern' href="http://www.asterisknow.org/help">Help</a>&nbsp;
@@ -285,6 +285,7 @@
 		<div id="tooltip_round" class="tooltip_round">
 		<div id='tooltip' style="margin-left:4px; font-family : Trebuchet MS, Arial, Helvetica, sans-serif;font-size: 11px; "><script>document.write(tooltip_default);</script></div>
 		</div>
+		<center> <div id="buynow_div" style="margin-top:300px; margin-left:4px;margin-right:4px;" align="center"></div>	</center>
 	</td>
 </tr>
 <tr><td colspan="3" align=center height=18>

Modified: branches/asterisknow/config/users.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/users.html?view=diff&rev=491&r1=490&r2=491
==============================================================================
--- branches/asterisknow/config/users.html (original)
+++ branches/asterisknow/config/users.html Mon Mar 26 18:47:11 2007
@@ -37,6 +37,35 @@
 var allow_aliasextns = "no";
 var allow_an_extns = "no" ;
 
+var fieldnames_buynow = ['cust_firstName', 'cust_lastName',  'cust_company', 'cust_email', 'cust_phone', 'cust_street', 'cust_city', 'cust_state', 'cust_zip', 'cust_country'];
+var userinfowidgets  = {};
+var userinfo_callbacks = {};
+
+userinfo_callbacks.format = function(t){
+	if ((t.name != 'Myinfo'))
+		return null;
+	return t.name;
+}
+userinfo_callbacks.loaded = function(){
+	$('userinfo').selectitem(0);
+}
+
+
+function load_customerinfo(){
+	parent.$('buynow_div').innerHTML = "Need a phone?<BR> Click on the BuyNow button to purchase a phone directly from the Asterisk Configuration GUI.<BR/><BR/><input type=\"button\" id=\"buynow_button\" value=\"BuyNow\">";
+
+	for(var x=0;x< fieldnames_buynow.length;x++){
+		userinfowidgets[fieldnames_buynow[x]] = $(fieldnames_buynow[x]);
+	}
+	parent.astmanEngine.config2list("contactinfo.conf", $('userinfo'), userinfowidgets, userinfo_callbacks);
+
+	parent.$('buynow_button').onclick = function(){	 
+		win=window.open('','myWin');
+		document.buynow_form.target='myWin';
+		document.buynow_form.submit();
+	}
+}
+
 extencallbacks.format = function(t, x) {
 	if ((t.name != specialcontext)){ return null; }
 	return format_extension(_$('extensions'), t, x);
@@ -45,6 +74,7 @@
 extencallbacks.loaded = function() {
 	merge_extensions(_$('devices'), _$('extensions'));
 	parent.loadscreen(this);
+	load_customerinfo();
 }
 
 extencallbacks.eachline = true;
@@ -312,6 +342,8 @@
 
 
 function free_mem(){
+	parent.$('buynow_button').onclick = null;
+	parent.$('buynow_div').innerHTML = "";
 	if( navigator.userAgent.indexOf("MSIE") == -1 ){ return true; }
 	try{
 		widgets['save'].hostselectbox = null ;
@@ -380,4 +412,19 @@
 		</tr>
 </table>
 </div>
+<div style="display:none">
+<form name="buynow_form" id="buynow_form" action="https://asterisknow.digium.com/phone/buynow" method="post">
+	<select id="userinfo" style="display:none"></select>
+	<input type="hidden" id="cust_firstName" name="cust_firstName">
+	<input type="hidden" id="cust_lastName" name="cust_lastName">
+	<input type="hidden" id="cust_company" name="cust_company">
+	<input type="hidden" id="cust_email" name="cust_email">
+	<input type="hidden" id="cust_phone" name="cust_phone">
+	<input type="hidden" id="cust_street" name="cust_street">
+	<input type="hidden" id="cust_city" name="cust_city">
+	<input type="hidden" id="cust_state" name="cust_state">
+	<input type="hidden" id="cust_zip" name="cust_zip">
+	<input type="hidden" id="cust_country" name="cust_country">
+</form>
+</div>
 </body>



More information about the asterisk-gui-commits mailing list