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

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed Mar 21 15:57:35 MST 2007


Author: pari
Date: Wed Mar 21 17:57:33 2007
New Revision: 461

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=461
Log:
gui_feedback - gmail style feedback box in the header, some of the gui_alerts will be soon replaced by gui_feedback, helps making the GUI less irritating 

Modified:
    trunk/config/cfgadvanced.html
    trunk/config/cfgbasic.html
    trunk/config/home.html
    trunk/config/incoming.html
    trunk/config/localexts.html
    trunk/config/scripts/astman.js
    trunk/config/stylesheets/schwing.css

Modified: trunk/config/cfgadvanced.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgadvanced.html?view=diff&rev=461&r1=460&r2=461
==============================================================================
--- trunk/config/cfgadvanced.html (original)
+++ trunk/config/cfgadvanced.html Wed Mar 21 17:57:33 2007
@@ -88,17 +88,17 @@
 	new PanelDef("record", "Record a Menu", "accordion-icon.gif",
 		"Allows you to record custom voicemenus over a phone"),
 
-	new PanelDef("moh", "Music On Hold", "accordion-icon.gif", " Music on hold sometimes keeps people less angry while they wait for an answer"),
-
-	new PanelDef("sip", "SIP", "accordion-icon.gif", "SIP (Session Initiation Protocol) Configuration"),
-
-	new PanelDef("iax", "IAX", "accordion-icon.gif", "IAX (Inter-Asterisk eXchange Protocol) Configuration"),
-
-	new PanelDef("jabber", "Jabber", "accordion-icon.gif", "Jabber users configuration"),
-
-	new PanelDef("jingle", "Jingle", "accordion-icon.gif", "Jingle configuration lets users connect to google talk networks"),
-
-	new PanelDef("zapata", "Zap Channel", "accordion-icon.gif", "Zapata telephony interface configuration"),
+//	new PanelDef("moh", "Music On Hold", "accordion-icon.gif", " Music on hold sometimes keeps people less angry while they wait for an answer"),
+
+//	new PanelDef("sip", "SIP", "accordion-icon.gif", "SIP (Session Initiation Protocol) Configuration"),
+
+//	new PanelDef("iax", "IAX", "accordion-icon.gif", "IAX (Inter-Asterisk eXchange Protocol) Configuration"),
+
+//	new PanelDef("jabber", "Jabber", "accordion-icon.gif", "Jabber users configuration"),
+
+//	new PanelDef("jingle", "Jingle", "accordion-icon.gif", "Jingle configuration lets users connect to google talk networks"),
+
+//	new PanelDef("zapata", "Zap Channel", "accordion-icon.gif", "Zapata telephony interface configuration"),
 	
 	new PanelDef("status", "Active Channels", "accordion-icon.gif", "Monitor active channels."),
 
@@ -148,8 +148,6 @@
 	}
 }
 
-
-
 function fademainscreen(page, newpage) {
 	// Confirm Discard Changes goes here 
 	_$('tooltip').innerHTML = tooltip_default;
@@ -164,6 +162,10 @@
 
 function registerajax() {
 	Rico.Corner.round('tooltip_round', {compact:true});
+		// if you want google style feedback boxes :-)
+		// _$('feedback_round').style.backgroundColor = "#EFEFEF";		 
+		// Rico.Corner.round('feedback_round', {compact:true}); 
+		 
 	if( navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Konqueror") != -1 || navigator.userAgent.indexOf("Safari") != -1 ){
 		gui_alert(browser_alert);
 	}
@@ -212,10 +214,12 @@
 }
 
 function reloadConfig(){
+	_$('reloadconfig').style.display = 'none'; 
+	window.setTimeout( function(){ _$('reloadconfig').style.display=""; }, asterisk_guifbt );
 	var opt = { 
 		method: 'get', 
 		asynchronous: true, 
-		onSuccess: function(t) { gui_alert("Reloaded"); } ,
+		onSuccess: function(t) { gui_feedback("Restarted Asterisk !!",'blue'); } ,
 		onFailure: function(t) { gui_alert("Config Error: " + t.status + ": " + t.statusText); }
 	};
 	var uri = parent.build_action('renamecat', 0, "","", "", ""); 
@@ -231,7 +235,13 @@
 <table border="0" align="center" cellspacing="0" cellpadding="0" bgcolor="#dddddd" width=950 height=570>
 <tr height=47>
 	<td valign="bottom" align='right' bgcolor='white' height=47><img align='left' src="images/digiumlogo.gif" align="left"></td>
-	<td valign='bottom' align='right' bgcolor='white' colspan=2>
+	<td valign='middle' align='center' bgcolor='white'>
+		<div id="feedback_round" style="display:none;background-color: #FFFFFF; width:400px">
+			<div id='feedback' style="font-family: Arial, sans-serif, Helvetica, Trebuchet MS ;font-size: 13px;font-weight : bold;"></div>
+		</div>
+
+	</td>
+	<td valign='bottom' align='right' bgcolor='white'>
 		<!-- <a href="#" onclick=" system_link()">System Configuration</a>&nbsp;|&nbsp; -->
 		<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;

Modified: trunk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgbasic.html?view=diff&rev=461&r1=460&r2=461
==============================================================================
--- trunk/config/cfgbasic.html (original)
+++ trunk/config/cfgbasic.html Wed Mar 21 17:57:33 2007
@@ -148,8 +148,6 @@
 	}
 }
 
-
-
 function fademainscreen(page, newpage) {
 	// Confirm Discard Changes goes here 
 	_$('tooltip').innerHTML = tooltip_default;
@@ -164,6 +162,10 @@
 
 function registerajax() {
 	Rico.Corner.round('tooltip_round', {compact:true});
+		// if you want google style feedback boxes :-)
+		// _$('feedback_round').style.backgroundColor = "#EFEFEF";		 
+		// Rico.Corner.round('feedback_round', {compact:true}); 
+		 
 	if( navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Konqueror") != -1 || navigator.userAgent.indexOf("Safari") != -1 ){
 		gui_alert(browser_alert);
 	}
@@ -212,10 +214,12 @@
 }
 
 function reloadConfig(){
+	_$('reloadconfig').style.display = 'none'; 
+	window.setTimeout( function(){ _$('reloadconfig').style.display=""; }, asterisk_guifbt );
 	var opt = { 
 		method: 'get', 
 		asynchronous: true, 
-		onSuccess: function(t) { gui_alert("Reloaded"); } ,
+		onSuccess: function(t) { gui_feedback("Restarted Asterisk !!",'blue'); } ,
 		onFailure: function(t) { gui_alert("Config Error: " + t.status + ": " + t.statusText); }
 	};
 	var uri = parent.build_action('renamecat', 0, "","", "", ""); 
@@ -231,7 +235,13 @@
 <table border="0" align="center" cellspacing="0" cellpadding="0" bgcolor="#dddddd" width=950 height=570>
 <tr height=47>
 	<td valign="bottom" align='right' bgcolor='white' height=47><img align='left' src="images/digiumlogo.gif" align="left"></td>
-	<td valign='bottom' align='right' bgcolor='white' colspan=2>
+	<td valign='middle' align='center' bgcolor='white'>
+		<div id="feedback_round" style="display:none;background-color: #FFFFFF; width:400px">
+			<div id='feedback' style="font-family: Arial, sans-serif, Helvetica, Trebuchet MS ;font-size: 13px;font-weight : bold;"></div>
+		</div>
+
+	</td>
+	<td valign='bottom' align='right' bgcolor='white'>
 		<!-- <a href="#" onclick=" system_link()">System Configuration</a>&nbsp;|&nbsp; -->
 		<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;

Modified: trunk/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/home.html?view=diff&rev=461&r1=460&r2=461
==============================================================================
--- trunk/config/home.html (original)
+++ trunk/config/home.html Wed Mar 21 17:57:33 2007
@@ -118,13 +118,13 @@
 
 function doLogin() {
 	if( _$('username').value == "" ){
-		parent.gui_alert("Please enter a Username");
+		parent.gui_feedback("Please enter a Username");
 		_$('username').focus();
 		return true;			
 	}
 
 	if( _$('secret').value == "" ){
-		parent.gui_alert("Please enter a password");
+		parent.gui_feedback("Please enter a password");
 		_$('secret').focus();
 		return true;			
 	}

Modified: trunk/config/incoming.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/incoming.html?view=diff&rev=461&r1=460&r2=461
==============================================================================
--- trunk/config/incoming.html (original)
+++ trunk/config/incoming.html Wed Mar 21 17:57:33 2007
@@ -255,18 +255,18 @@
 	var te = _$('toextension') ;
 
 	if( ir == "frompattern" && fp.value == "" ){
-		gui_alert("Please define an incoming call pattern !");
+		gui_feedback("Please define an incoming call pattern !");
 		fp.focus();
 		fp.select();
 		return false;
 	}
 	if( fpv.selectedIndex == -1 ){
-		gui_alert("Please select a service provider !");
+		gui_feedback("Please select a service provider !");
 		fpv.focus();
 		return false;
 	}
 	if( te.selectedIndex == -1 ){
-		gui_alert("Please select an extension to which an incoming call should be routed to !");
+		gui_feedback("Please select an extension to which<BR> an incoming call should be routed to !");
 		te.focus();
 		return false;
 	}
@@ -295,7 +295,7 @@
 
 	// check whether there is an existing entry with this pattern 
 	if( typeof didtrunks[temp_provider][newpattern] != "undefined" ){
-		gui_alert("An incoming call rule is already defined \n on this trunk for the selcted pattern !! ");
+		gui_feedback("An incoming call rule is already defined <BR> on this trunk for the selcted pattern !! ");
 		return false;
 	}
 	
@@ -330,13 +330,13 @@
 	var te = _$('toextension') ;
  
 	if( ir == "frompattern" && fp.value == "" ){
-		gui_alert("Please define an incoming call pattern !");
+		gui_feedback("Please define an incoming call pattern !");
 		fp.focus();
 		fp.select();
 		return false;
 	}
 	if( te.selectedIndex == -1 ){
-		gui_alert("Please select an extension to which an incoming call should be routed to !");
+		gui_feedback("Please select an extension to which<BR> an incoming call should be routed to !");
 		te.focus();
 		return false;
 	}
@@ -369,7 +369,7 @@
 	}
 
 	if( typeof didtrunks[temp_provider][newpattern] != "undefined" && ( temp_provider != edit_DIDtrunk || newpattern != edit_pattern ) ){
-		gui_alert("An incoming call rule is already defined \n on this trunk for the selcted pattern !! ");
+		gui_feedback("An incoming call rule is already defined <BR> on this trunk for the selcted pattern !! ");
 		return false;
 	}
 

Modified: trunk/config/localexts.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/localexts.html?view=diff&rev=461&r1=460&r2=461
==============================================================================
--- trunk/config/localexts.html (original)
+++ trunk/config/localexts.html Wed Mar 21 17:57:33 2007
@@ -45,8 +45,8 @@
 }
 
 usercallbacks.beforeSaving= function(){
-	if(	_$('localextenlength').value !=0 && _$('localextenlength').value != _$('userbase').value.length ){
-		gui_alert("'length of Local Extensions' does not match \n the 'length of the Starting point of Allocation'");
+	if( _$('localextenlength').value != "0" && _$('localextenlength').value != _$('userbase').value.length ){
+		gui_feedback("'length of Local Extensions' does not match <BR> the length of 'First Extension number'");
 		return false;
 	}
 
@@ -146,7 +146,7 @@
 			<option value="0">Varying</option>
 			</select>&nbsp;</td>
 		</tr>
-		<tr><td class="field_text" align=left>Fist Extension Number : <input type=text id="userbase" size=5  class="input9"></td></tr>
+		<tr><td class="field_text" align=left>First Extension Number : <input type=text id="userbase" size=5  class="input9"></td></tr>
 		<tr><td class="field_text" align="left"><input type=checkbox id="allow_aliasextns">Allow analog phones to be assigned to multiple extensions</td></tr>
 		<tr><td class="field_text" align="left"><input type=checkbox id="allow_an_extns">Allow extensions to be AlphaNumeric (SIP/IAX users)</td></tr>
 		</table>
@@ -190,4 +190,4 @@
 <tr valign="top" height="18"><td></td></tr>
 </table>
 </div>
-</body>
+</body>

Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=461&r1=460&r2=461
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Wed Mar 21 17:57:33 2007
@@ -19,14 +19,35 @@
  *
  */
 
- var sc_displaytime = 1000;
- var asterisk_guiappname =  "Asterisk GUI (Beta)";
- var asterisk_guitools = "asterisk_guitools";
- var asterisk_guitoolsversion = "0.7";
- var asterisk_guiversion = "$Revision$";
+var sc_displaytime = 1000;
+var asterisk_guiappname =  "Asterisk GUI (Beta)";
+var asterisk_guitools = "asterisk_guitools";
+var asterisk_guitoolsversion = "0.7";
+var asterisk_guiversion = "$Revision$";
+var asterisk_guifbt = 3000; // Feedback msg time
 var sortbynames = false;
 var dragdata = new Object;
 var asterisk_guiTDPrefix = "DID_";
+
+function gui_feedback(a,b){
+	var d = "#DA2804"; // dark reddish brown
+	if(b=='blue'){ 
+		d = "#303BCA"; // dark blue
+	}else if(b=='green'){
+		d = "#448156"; // dark green
+	}
+	gui_feedbackmsg(a,d);
+}
+
+function gui_feedbackmsg(a,b,c){ // a is message, b is color, c is timeout
+	if(!c){c = asterisk_guifbt;}
+	var _f = top._$('feedback_round');
+	var _g = top._$('feedback');
+	_g.style.color = b;
+	_g.innerHTML = a ;
+	_f.style.display = '';
+	window.setTimeout( function(){top._$('feedback_round').style.display = "none"; }, c );
+}
 
 
 function  gui_alert(msg){

Modified: trunk/config/stylesheets/schwing.css
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/stylesheets/schwing.css?view=diff&rev=461&r1=460&r2=461
==============================================================================
--- trunk/config/stylesheets/schwing.css (original)
+++ trunk/config/stylesheets/schwing.css Wed Mar 21 17:57:33 2007
@@ -272,7 +272,7 @@
 
 div.tooltip_round {
 /*   background:#C0C081;*/
-   background:#90B6DC;
+   background:#BFBFBF;
    margin:6pt 5pt 0pt 6pt;
 }
 



More information about the asterisk-gui-commits mailing list