pari: branch asterisknow r1028 - in /branches/asterisknow: ./ config/ config/...

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Mon Jun 4 11:36:11 MST 2007


Author: pari
Date: Mon Jun  4 13:36:10 2007
New Revision: 1028

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1028
Log:
Merged revisions 985-988,990-1021 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-gui/trunk

........
r985 | pari | 2007-05-25 11:17:32 -0500 (Fri, 25 May 2007) | 1 line

 convert '\n' to <CR> in textarea when showing to user and convert back to '\n' before saving 
........
r986 | pari | 2007-05-25 11:36:57 -0500 (Fri, 25 May 2007) | 1 line

updating todo list
........
r987 | pari | 2007-05-25 12:38:50 -0500 (Fri, 25 May 2007) | 1 line

Forward incoming calls to RingGroups
........
r988 | pari | 2007-05-25 12:42:11 -0500 (Fri, 25 May 2007) | 1 line

todo update
........
r990 | pari | 2007-05-29 14:13:10 -0500 (Tue, 29 May 2007) | 1 line

updating todo
........
r991 | pari | 2007-05-29 15:33:07 -0500 (Tue, 29 May 2007) | 1 line

Adding standard funtions to manipulate select box options.
........
r992 | pari | 2007-05-29 16:29:43 -0500 (Tue, 29 May 2007) | 1 line

replacing   'try/catch','if(ie)'  crap with the new SelectBox functions
........
r993 | pari | 2007-05-29 16:47:42 -0500 (Tue, 29 May 2007) | 1 line

sometimes we might have to add an OptionNode to the select box element
........
r994 | pari | 2007-05-29 16:50:46 -0500 (Tue, 29 May 2007) | 1 line

sometimes we might have to add an OptionNode to the select box element(2)
........
r995 | pari | 2007-05-29 17:23:15 -0500 (Tue, 29 May 2007) | 1 line

updating astman.js with the select box functions - still needs some more fixing
........
r996 | pari | 2007-05-29 17:25:04 -0500 (Tue, 29 May 2007) | 1 line

couple of requests from killfill
........
r997 | pari | 2007-05-30 11:32:26 -0500 (Wed, 30 May 2007) | 1 line

global functions for parsing context lines
........
r998 | pari | 2007-05-30 11:47:03 -0500 (Wed, 30 May 2007) | 1 line

better getAction
........
r999 | pari | 2007-05-30 13:04:32 -0500 (Wed, 30 May 2007) | 1 line

Option to Assign an Extension to RingGroups
........
r1000 | pari | 2007-05-30 13:07:08 -0500 (Wed, 30 May 2007) | 1 line

Yay! 1000th commit, minor fixes to getExten and getPriority 
........
r1001 | pari | 2007-05-30 13:18:14 -0500 (Wed, 30 May 2007) | 1 line

updating todo
........
r1002 | pari | 2007-05-30 13:45:28 -0500 (Wed, 30 May 2007) | 1 line

option to redirect TimeRule to a ringGroup
........
r1003 | pari | 2007-05-30 14:05:17 -0500 (Wed, 30 May 2007) | 1 line

Option to redirect one timerule to another
........
r1004 | pari | 2007-05-30 14:06:28 -0500 (Wed, 30 May 2007) | 1 line

updating todo
........
r1005 | pari | 2007-05-30 19:18:36 -0500 (Wed, 30 May 2007) | 1 line

attempt for making the GUI free from the hardcoded 1024x768 resolution, more commits on this will follow soon
........
r1006 | pari | 2007-05-30 19:50:33 -0500 (Wed, 30 May 2007) | 1 line

OnWindowResize adjust to screen size
........
r1007 | pari | 2007-05-30 20:03:19 -0500 (Wed, 30 May 2007) | 1 line

moving some options into the main panel
........
r1008 | pari | 2007-05-30 20:26:48 -0500 (Wed, 30 May 2007) | 1 line

update cli to window resolution
........
r1009 | pari | 2007-05-30 20:32:00 -0500 (Wed, 30 May 2007) | 1 line

update syslog to window resolution
........
r1010 | pari | 2007-05-30 20:48:19 -0500 (Wed, 30 May 2007) | 1 line

update fileeditor to window resolution
........
r1011 | pari | 2007-05-30 21:38:28 -0500 (Wed, 30 May 2007) | 1 line

updating todo list
........
r1012 | pari | 2007-05-31 13:39:48 -0500 (Thu, 31 May 2007) | 1 line

removing duplicate entires for 'domain' field 
........
r1013 | pari | 2007-05-31 13:41:22 -0500 (Thu, 31 May 2007) | 1 line

cross browser function for window.innerHeight
........
r1014 | pari | 2007-05-31 17:11:08 -0500 (Thu, 31 May 2007) | 1 line

'event delegation' instead of 'event handling' for the main panel
........
r1015 | pari | 2007-05-31 18:05:28 -0500 (Thu, 31 May 2007) | 1 line

removing rico.css from all files
........
r1016 | pari | 2007-05-31 18:21:07 -0500 (Thu, 31 May 2007) | 1 line

moving get event target into astman.js
........
r1017 | pari | 2007-05-31 19:06:33 -0500 (Thu, 31 May 2007) | 1 line

tooltips with event delegation
........
r1018 | pari | 2007-05-31 20:14:00 -0500 (Thu, 31 May 2007) | 1 line

(more)tooltips with event delegation
........
r1019 | pari | 2007-06-01 13:43:37 -0500 (Fri, 01 Jun 2007) | 1 line

Code cleanup(1) - Running all code through jslint and fixing any critical errors
........
r1020 | pari | 2007-06-01 14:06:56 -0500 (Fri, 01 Jun 2007) | 1 line

Code cleanup(2) - Running all code through jslint and fixing any critical errors
........
r1021 | pari | 2007-06-01 16:51:20 -0500 (Fri, 01 Jun 2007) | 1 line

blah
........

Removed:
    branches/asterisknow/config/stylesheets/rico.css
Modified:
    branches/asterisknow/   (props changed)
    branches/asterisknow/config/backup.html
    branches/asterisknow/config/cfgbasic.html
    branches/asterisknow/config/cli.html
    branches/asterisknow/config/emailsettings.html
    branches/asterisknow/config/feditor.html
    branches/asterisknow/config/graphs.html
    branches/asterisknow/config/home.html
    branches/asterisknow/config/iax.html
    branches/asterisknow/config/incoming.html
    branches/asterisknow/config/jabber.html
    branches/asterisknow/config/jingle.html
    branches/asterisknow/config/localexts.html
    branches/asterisknow/config/meetme.html
    branches/asterisknow/config/menus.html
    branches/asterisknow/config/moh.html
    branches/asterisknow/config/numberplan.html
    branches/asterisknow/config/options.html
    branches/asterisknow/config/queues.html
    branches/asterisknow/config/record.html
    branches/asterisknow/config/ringgroups.html
    branches/asterisknow/config/scripts/astman.js
    branches/asterisknow/config/scripts/tooltip.js
    branches/asterisknow/config/sip.html
    branches/asterisknow/config/status.html
    branches/asterisknow/config/stylesheets/schwing.css
    branches/asterisknow/config/sysinfo.html
    branches/asterisknow/config/syslog.html
    branches/asterisknow/config/timerules.html
    branches/asterisknow/config/trunks.html
    branches/asterisknow/config/users.html
    branches/asterisknow/config/voicemail.html
    branches/asterisknow/config/zapata.html
    branches/asterisknow/todo.txt

Propchange: branches/asterisknow/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jun  4 13:36:10 2007
@@ -1,1 +1,1 @@
-/trunk:1-449,489-540,542-557,559,561-577,580-586,588-983
+/trunk:1-449,489-540,542-557,559,561-577,580-586,588-1027

Modified: branches/asterisknow/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/backup.html?view=diff&rev=1028&r1=1027&r2=1028
==============================================================================
--- branches/asterisknow/config/backup.html (original)
+++ branches/asterisknow/config/backup.html Mon Jun  4 13:36:10 2007
@@ -21,7 +21,6 @@
 -->
 <script src="scripts/prototype.js"></script>
 <script src="scripts/astman.js"></script>
-<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 <script>
 
@@ -214,7 +213,7 @@
 </table>
 </div>
 <div id="newbkp_content" STYLE="display:none; position: absolute; left: 120; top: 144; width:350; height:125;  background-color:#F4EFE5;   border-width: 1px; border-color: #7E5538; border-style: solid; z-index:5">
-	<table width="100%" cellpadding=0 cellspacing=0  onmousedown="startDrag(event , 'newbkp_content');">
+	<table width="100%" cellpadding=0 cellspacing=0  onmousedown="ASTGUI.startDrag(event , 'newbkp_content');">
 	<TR bgcolor="#7E5538"  style="background-image:url('images/title_gradient.gif');">
 		<TD><font color="#FFFFFF">&nbsp;&nbsp;<B>Create New Backup</B></FONT></TD>
 		<TD Height="20" align="right" style="cursor: move">

Modified: branches/asterisknow/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/cfgbasic.html?view=diff&rev=1028&r1=1027&r2=1028
==============================================================================
--- branches/asterisknow/config/cfgbasic.html (original)
+++ branches/asterisknow/config/cfgbasic.html Mon Jun  4 13:36:10 2007
@@ -24,42 +24,64 @@
 </script>
 <script src="scripts/prototype.js"></script>
 <script src="scripts/astman.js"></script>
-<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 <script>
 var eventeater = new Object;
 var loggedon = -1;
 var accordion;
-var copyright = "Copyright &copy;2006-2007 Digium, Inc.  All Rights Reserved. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
 var tooltip_default = "Move the mouse over to a field to see tooltips";
 var asterisk_guitools_inextconf = 0;
 eventeater.pingstatus = false;
 var keepPinging;
 
+
+function fit_toScreen(){
+	var t = ASTGUI.displayHeight();
+	var c =_$('configpanel'); 
+	c.WIH = t;
+	_$('mainscreen').style.height = (t - 70);
+	_$('TOP_MAINTABLE').rows[1].cells[0].height = (t - 70) ;
+	var pnameheight = 22;
+	c.pnameheight = pnameheight;
+	var panels = returnpanels();
+	var pheight = (( t - 70)  - (pnameheight*panels.length) ) ;
+	if(pheight > 0){
+		c.pheight = pheight;
+	}else{
+		pheight = 0;
+		c.pheight = 0 ;
+	}
+
+	if( c.childNodes.length ){
+		var s;
+		for( var r=0; r < panels.length; r++ ){
+			s = panels[r].page.split(".html")[0];
+			if( _$(s+"_U").style.display == "" ){
+				_$(s+"_U").style.height = pheight;
+			}
+		}
+	}
+}
+
 function createpanels(){
 	var t,u,v;
 	var a = _$('configpanel');
-	var pnameheight = 22;
-	var panels = returnpanels();
-	var pheight = (503  - (pnameheight*panels.length) ) ;
-	a.pheight = pheight;
+
+//	ASTGUI.events.add(a, 'mouseover', my_tooltip);
+//	ASTGUI.events.add(a, 'mouseout', default_tooltip);
+	ASTGUI.events.add(a, 'click', fghjhhs);
+
+	var panels = returnpanels();
 	var this_id ;
 	for( var r=0; r < panels.length; r++ ){
 		this_id = panels[r].page.split(".html")[0];
 
 		t = document.createElement("div");
 		t.className = "accordionTabTitleBar";
-		t.style.backgroundColor = "#6B79A5";
-		t.style.color = "#CED7EF";
-		t.style.fontWeight = "normal";
 		t.style.display = "none";
 		t.setAttribute('id', this_id );
-		t.height = pnameheight;
+		t.height = a.pnameheight;
 		t.innerHTML = "<nobr><img style='vertical-align: middle;' src='images/accordion-icon.gif'><span style='margin-left: 0px; font-weight: bold;'>&nbsp;" + panels[r].caption + "</span></nobr>";
-
-		add_event(t, 'click', fghjhhs);
-		add_event(t, 'mouseover', my_tooltip);
-		add_event(t, 'mouseout', default_tooltip);
 
 		u = document.createElement("div");
 		u.className = "accordionTabContentBox";
@@ -81,16 +103,11 @@
 
 	_$( "home" ).style.display = "";
 	_$( "home_U" ).style.display = "";
-	_$( "home_U" ).style.height = a.pheight +"px";
+	_$( "home_U" ).style.height = a.pheight;
 }
 
 function my_tooltip(event){
 	var s = (event.srcElement)?event.srcElement:this;
-
-	_$(s.id).style.backgroundColor="#63699C";
-	_$(s.id).style.color="#FFFFFF";
-	_$(s.id).style.fontWeight="bold";
-
 	show_Acctooltip(_$(s.id+"_U").innerHTML );
 }
 
@@ -105,18 +122,22 @@
 }
 
 function fghjhhs(event){
-	var s = (event.srcElement)?event.srcElement:this;
-	if(event.srcElement && s.id==""){s = event.srcElement.parentNode.parentNode;}
-
+	var f = ASTGUI.events.getTarget(event);
+	var s = f;
+	if (f.nodeName.toLowerCase() == 'img' || f.nodeName.toLowerCase() == 'span' ){
+		s = f.parentNode.parentNode;
+	}
+	if ( s.className != 'accordionTabTitleBar' )return;
 	if( $('mainscreen').currentpage == s.id + ".html")return;
 	var t;
+
 	var panels = returnpanels();
 	for( var r=0; r < panels.length; r++ ){
 		t = panels[r].page.split(".html")[0];
 		_$( t + "_U" ).style.height = "1px";
 		_$( t + "_U" ).style.display = "none";
 	}
-	_$( s.id + "_U" ).style.height = _$('configpanel').pheight + "px";
+	_$( s.id + "_U" ).style.height = _$('configpanel').pheight;
 	_$( s.id + "_U" ).style.display = "";
 
 	_$('AdvancedOptionsSelect').selectedIndex=-1;
@@ -145,13 +166,17 @@
 	newpanel( ["Calling Rules", "numberplan.html", "The Calling Rules define dialing permissions and least cost routing rules."]);
 	newpanel( ["Incoming Calls", "incoming.html", "Define how your incoming calls should be handled & configure DID (Direct inward Dialing)"]);
 	newpanel( ["Voice Menus", "menus.html", "Menus allow for more efficient routing of calls from incoming callers. Also known as IVR (Interactive Voice Response) menus or Digital Receptionist"]);
+	newpanel( ["Time Based Rules", "timerules.html", "define call routing rules based on date and time"]);
+	newpanel( ["Ring Groups", "ringgroups.html", "define RingGroups to dial more than one extension"]);
 	newpanel( ["Record a Menu", "record.html", "Allows you to record custom voicemenus over a phone"]);
 	newpanel( ["Active Channels", "status.html", "Monitor active channels."]);
 	newpanel( ["Graphs", "graphs.html", "View Graphs of your System Information."]);
 	newpanel( ["System Info", "sysinfo.html", "System Information."]);
+	newpanel( ["Asterisk Logs", "syslog.html", "Asterisk Log messages."]);
+	newpanel( ["File Editor", "feditor.html", "Edit Asterisk Config Files"]);
+	newpanel( ["Asterisk CLI", "cli.html", "Asterisk Command Line Interface"]);
 	newpanel( ["Backup", "backup.html", "Backup Management."]);
 	newpanel( ["Options", "localexts.html", "Admin Settings"]);
-
 	return panels;
 }
 
@@ -174,8 +199,6 @@
 	if(!onoff){return;}
 	loggedon = 1;
 	var panels = returnpanels();
-	var pnameheight = 22;
-	var pheight = (503  - (pnameheight*panels.length) ) ;
 	for( var r=0; r < panels.length; r++ ){
 		t = panels[r].page.split(".html")[0];
 		_$( t + "_U" ).style.height = "1px";
@@ -183,15 +206,13 @@
 		_$( t ).style.display = "";
 	}
 	_$("home").style.display = "";
-	_$("home_U").style.height = _$('configpanel').pheight + "px";
+	_$("home_U").style.height = _$('configpanel').pheight;
 	_$("home_U").style.display = "";
 }
 
 function loadscreen(srcbody) {
 	_$('mainscreen').style.display = '';
 }
-
-function setstatus(status) {	_$('status').innerHTML = copyright + status;	}
 
 
 function show_Acctooltip(tip){
@@ -201,6 +222,8 @@
 }
 
 function registerajax() {
+	fit_toScreen();
+	ASTGUI.events.add( window , 'resize', fit_toScreen );
 	pao();
 	astmanEngine = new Astman();
 	astmanEngine.setURL(asterisk_rawmanPath );
@@ -266,7 +289,7 @@
 		_$( t + "_U" ).style.height = "1px";
 		_$( t + "_U" ).style.display = "none";
 	}
-	_$( "localexts_U" ).style.height = _$('configpanel').pheight + "px";
+	_$( "localexts_U" ).style.height = _$('configpanel').pheight;
 	_$( "localexts_U" ).style.display = "";
 
 	_$('mainscreen').src = _$('AdvancedOptionsSelect').value ;
@@ -277,7 +300,7 @@
 	<link rel="shortcut icon" href="images/favicon.ico" />
 </head>
 <body onload="registerajax()" topmargin=1>
-<table align="center" bgcolor="#dddddd" border="0" cellpadding="0" cellspacing="0" height="570" width="950">
+<table align="center" bgcolor="#dddddd" border="0" cellpadding="0" cellspacing="0" width="950" id="TOP_MAINTABLE">
 <tbody>
 	<tr height="47">
 		<td align="right" bgcolor="white" height="47" valign="bottom" id="dimg"><img src="images/digiumlogo.gif" align="left"></td>
@@ -295,17 +318,17 @@
 		<input id="login_name" type="hidden">
 	</td>
 </tr>
-<tr>	<td height="505">
-		<div id="configpanel" style="border-bottom: 1px solid rgb(31, 102, 155); width: 150px; height: 505px;"></div>
-	</td>
-	<td id="screenholder" bgcolor="#efefef" height="505" valign="top" width="550">
+<tr>	<td valign=top>
+		<div id="configpanel" style="border-bottom: 1px solid rgb(31, 102, 155); width: 150px;"></div>
+	</td>
+	<td id="screenholder" bgcolor="#efefef" valign="top" width="550">
 		<div id="titlebar" class="mainscreenTitleBar" style="position: absolute; top: 48px;">
 			<span style="margin-left: 4px; font-weight: bold;">Loading Screen&nbsp;<img src="images/dots.gif"></span>
 		</div>
 		<div id="borderbox" class="mainscreenBorderBox" height="100%"></div>
-		<iframe border="0" marginheight="0" marginwidth="0" id="mainscreen" style="position: absolute; top: 48px;" frameborder="0" height="505" scrolling="no" width="540"></iframe>
-	</td>
-	<td height="505" valign="top" width="250">
+		<iframe border="0" marginheight="0" marginwidth="0" id="mainscreen" style="position: absolute; top: 48px;" frameborder="0" scrolling="no" width="540"></iframe>
+	</td>
+	<td valign="top" width="250">
 		<div class="mainscreenTooltipBar" align="right">
 			<span id="reloadconfig" style="display:none">Activate Changes</span>&nbsp;&nbsp;&nbsp;<span id="logoutlink" style="display:none">Logout</span>&nbsp;
 		</div>
@@ -325,18 +348,13 @@
 		<tr>	<td align=right>Goto:&nbsp;</td>
 			<td align="center">
 			<select id="AdvancedOptionsSelect" class="input9" onchange="goto_advancedoption()">
-				<option value="feditor.html">File Editor</option>
-				<option value="cli.html">Asterisk CLI</option>
 				<option value="moh.html">Music on Hold</option>
-				<option value="timerules.html">Time Based Rules</option>
-				<option value="ringgroups.html">Ring Groups</option>
 				<option value="emailsettings.html">VM Email settings</option>
 				<option value="sip.html">Global SIP Settings</option>
 				<option value="iax.html">Global IAX Settings</option>
 			<!--	<option value="jabber.html">Jabber</option>
 				<option value="jingle.html">Jingle</option>
 				<option value="zapata.html">Zap Channel</option>	-->
-				<option value="syslog.html">Asterisk Logs</option>
 				<option value="options.html">Change Password</option>
 				<option value="TOSETUP">Setup Wizard</option>
 			</select>

Modified: branches/asterisknow/config/cli.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/cli.html?view=diff&rev=1028&r1=1027&r2=1028
==============================================================================
--- branches/asterisknow/config/cli.html (original)
+++ branches/asterisknow/config/cli.html Mon Jun  4 13:36:10 2007
@@ -20,15 +20,20 @@
 -->
 <script src="scripts/prototype.js"></script>
 <script src="scripts/astman.js"></script>
-<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 <script>
 var CLI_HSTY = []; // cli history of previous commands 
 var CLI_INDEX = 0; // index for navigating through command history
 var COMMAND;
 
+
 function localajaxinit() {
+	var adjust_toScreen = function(){
+		var i = ASTGUI.displayHeight();
+		_$('cli_output').style.height = (i -60);
+	}
 	top._$('mainscreen').width= 798;
+	ASTGUI.events.add( window , 'resize', adjust_toScreen);
 	setWindowTitle("Asterisk CLI Emulator");
 	parent.loadscreen(this);
 	_$('cli_cmd').value = "core show version";

Modified: branches/asterisknow/config/emailsettings.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/emailsettings.html?view=diff&rev=1028&r1=1027&r2=1028
==============================================================================
--- branches/asterisknow/config/emailsettings.html (original)
+++ branches/asterisknow/config/emailsettings.html Mon Jun  4 13:36:10 2007
@@ -21,12 +21,24 @@
 <script src="scripts/prototype.js"></script>
 <script src="scripts/astman.js"></script>
 <script src="scripts/tooltip.js"></script>
-<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 <script>
 var vmfields = ['serveremail','emailsubject','emailbody','save','cancel'];
 var vmwidgets = {};
 var voicemailcallbacks = {};
+
+voicemailcallbacks.savechanges = function(){
+	var t =	_$('emailbody').value ;
+	var r = t.split('\\n');
+	_$('emailbody').value = r.join('\r\n');	
+}
+
+voicemailcallbacks.beforeSaving = function() {
+	var r = _$('emailbody').value.split('\n');
+	var s = r.join('\\n');
+	_$('emailbody').value = s;
+	return true;
+}
 
 voicemailcallbacks.format = function(t) {
 	if (t.name != 'general')
@@ -36,6 +48,9 @@
 
 voicemailcallbacks.loaded = function() {
 	_$('hiddenvoicemail').selectitem(0) ;
+	var t =	_$('emailbody').value ;
+	var r = t.split('\\n');
+	_$('emailbody').value = r.join('\r\n');
 	parent.loadscreen(this);
 }
 
@@ -81,6 +96,9 @@
 <BR>
 <table align="center" cellpadding=2 cellspacing=1 border=0>
 <TR>	<TD valign=top align=center style="font-size:10px;"><B>Template Variables:</B></TD>
+	<TD style="font-size : 11px;">\t : TAB</TD>
+</TR>
+<TR>	<TD></TD>
 	<TD style="font-size : 11px;">{VM_NAME} : Recipient's firstname and lastname</TD>
 </TR>
 <TR>	<TD></TD>

Modified: branches/asterisknow/config/feditor.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/feditor.html?view=diff&rev=1028&r1=1027&r2=1028
==============================================================================
--- branches/asterisknow/config/feditor.html (original)
+++ branches/asterisknow/config/feditor.html Mon Jun  4 13:36:10 2007
@@ -20,7 +20,6 @@
 -->
 <script src="scripts/prototype.js"></script>
 <script src="scripts/astman.js"></script>
-<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 <script>
 var global_contextBeingEdited = ""; 
@@ -56,14 +55,7 @@
 	parent.astmanEngine.run_tool( "touch " + asterisk_configfolder + fn, callback = function() {
 		cancel_file();
 		gui_feedback("Created file: '" + fn + "'",'blue');
-		New_OPTION = document.createElement('option');
-		New_OPTION.text =  fn ;
-		New_OPTION.value = fn ;
-		try {
-			_$('filenames').add(New_OPTION, null); // W3C way
-		}catch(ex) {
-			_$('filenames').add(New_OPTION); // IE way
-		}
+		ASTGUI.selectbox.append(_$('filenames'),fn, fn);
 		_$('filenames').selectedIndex = _$('filenames').options.length -1 ;
 		loadfile();
 	});
@@ -113,10 +105,15 @@
 }
 
 function localajaxinit() {
+	var adjust_toScreen = function(){
+		var i = ASTGUI.displayHeight(); 
+		_$('file_output').style.height = (i -75); 
+	}
+	ASTGUI.events.add( window , 'resize', adjust_toScreen);
 	top._$('mainscreen').width= 798;
 	setWindowTitle("File Editor");
 	load_recordedfiles();
-	add_event( _$('filenames') , 'change' , loadfile ) ;
+	ASTGUI.events.add( _$('filenames') , 'change' , loadfile ) ;
 	parent.loadscreen(this);
 }
 
@@ -126,17 +123,8 @@
 		onComplete: function(originalRequest){
 			// Add config files to the list of files
 			var recfiles = originalRequest.responseText.split("\n") ;
-
-			New_OPTION = document.createElement('option');
-			New_OPTION.text = "Config Files"  ;
-			New_OPTION.value = ""  ;
-			New_OPTION.style.fontWeight = "bold";
-			try {
-				_$('filenames').add(New_OPTION, null); // W3C way
-			}catch(ex) {
-				_$('filenames').add(New_OPTION); // IE way
-			}
-
+			ASTGUI.selectbox.append(_$('filenames'),"Config Files", "");
+			_$('filenames').options[0].style.fontWeight = "bold";
 			var file_name;
 			for( var i =0 ; i < recfiles.length ; i++){
 				if( typeof recfiles[i] == "undefined"  || recfiles[i] == "" ){
@@ -146,14 +134,7 @@
 				if( recfiles[i] == "" ){ continue; }
 				if( recfiles[i].substr( (recfiles[i].length - 5), recfiles[i].length) != ".conf") { continue; }
 				file_name = recfiles[i].stripTags() ;
-				New_OPTION = document.createElement('option');
-				New_OPTION.text =  file_name  ;
-				New_OPTION.value = file_name ;
-				try {
-					_$('filenames').add(New_OPTION, null); // W3C way
-				}catch(ex) {
-					_$('filenames').add(New_OPTION); // IE way
-				}
+				ASTGUI.selectbox.append(_$('filenames'),file_name, file_name);
 			}
 		},
 		onFailure: function(t) { alert("Config Error: " + t.status + ": " + t.statusText); }
@@ -281,7 +262,7 @@
 			h.innerHTML = "&nbsp;&nbsp;[" + d + "]";
 			zz.appendChild(h);
 			//Rico.Corner.round(h_id, {compact:true});
-			add_event( _$(h_id) , 'click', showeditcontext );
+			ASTGUI.events.add( _$(h_id) , 'click', showeditcontext );
 
 			var i = document.createElement("div");
 			var i_id = "contextContent_" + d;
@@ -309,15 +290,10 @@
 			i.CONTEXTCONTENT_ROWS = rows ;
 			zz.appendChild(i);
 			//Rico.Corner.round("contextContent_" + d, {compact:true});
-			add_event( _$(i_id) , 'click', showeditcontextContent );
+			ASTGUI.events.add( _$(i_id) , 'click', showeditcontextContent );
 
 		}
 	}
-
-
-	var space = document.createElement("div");
-	space.style.height = '50px';
-	zz.appendChild(space);
 
 }
 

Modified: branches/asterisknow/config/graphs.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/graphs.html?view=diff&rev=1028&r1=1027&r2=1028
==============================================================================
--- branches/asterisknow/config/graphs.html (original)
+++ branches/asterisknow/config/graphs.html Mon Jun  4 13:36:10 2007
@@ -21,7 +21,6 @@
 <script src="scripts/prototype.js"></script>
 <script src="scripts/astman.js"></script>
 <script src="scripts/tooltip.js"></script>
-<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 
 <script>
@@ -115,6 +114,7 @@
 
 
 function localajaxinit(){
+	ASTGUI.events.add(document, 'mouseover', show_tooltip);
 	setWindowTitle("Resource and Monitoring Graphs");
 	var date = new Date() ; 
 	parent.loadscreen(this);
@@ -139,7 +139,7 @@
 	<tr valign="top" height="18">	
 			<td align="left">
 
-				<a href="#" class="tab" onclick="return show_window(1);" id="tab1"  onmouseover="show_tooltip('en', 'graph', 0);">CPU</a>&nbsp;&nbsp;
+				<a href="#" class="tab" onclick="return show_window(1);" id="tab1" tip="en,graph,0">CPU</a>&nbsp;&nbsp;
 				<div id="graphshtml" style="display:none"></div>
 
 				<div id="information" style=" border: solid 0px black; background: transparent; padding: 4px; height:440px; width:95%;">

Modified: branches/asterisknow/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/home.html?view=diff&rev=1028&r1=1027&r2=1028
==============================================================================
--- branches/asterisknow/config/home.html (original)
+++ branches/asterisknow/config/home.html Mon Jun  4 13:36:10 2007
@@ -20,7 +20,6 @@
  *
 -->
 <script src="scripts/prototype.js"></script>
-<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 <script>
 var localloggedon = -1;

Modified: branches/asterisknow/config/iax.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/iax.html?view=diff&rev=1028&r1=1027&r2=1028
==============================================================================
--- branches/asterisknow/config/iax.html (original)
+++ branches/asterisknow/config/iax.html Mon Jun  4 13:36:10 2007
@@ -22,7 +22,6 @@
 <script src="scripts/prototype.js"></script>
 <script src="scripts/astman.js"></script>
 <script src="scripts/tooltip.js"></script>
-<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 <script>
 var phonecallbacks = new Object;
@@ -83,15 +82,7 @@
 	}
 
 	function addtosel(a,b,c){ // a is text, b is value, c is the select box id
-	  var newoption = document.createElement('option');
-	  newoption.text = a ;
-	  newoption.value = b ;
-	  var selectbox = document.getElementById( c );
-	  try {
-		selectbox.add(newoption, null); // standards compliant; doesn't work in IE
-	  }catch(ex) {
-		selectbox.add(newoption); // IE only
-	  }
+          ASTGUI.selectbox.append(_$(c),a, b);
 	}
 }
 function 	selectbox_remove(selectbox_id,codec){
@@ -356,7 +347,7 @@
 </div>
 <div style='visibility:hidden;overflow:hidden;width:0px;height:0px'><select  size="5" id="hiddenfield" style="width:220px"></select></div>
 <div  id="div_setordercodecs" style="position:absolute; display:none; left: 120; top: 70; width:350; background-color:#F4EFE5; border-width: 1px; border-color: #7E5538; border-style: solid; z-index:5">
-	<table width="100%" cellpadding=0 cellspacing=0 onmousedown="startDrag(event , 'div_setordercodecs');">
+	<table width="100%" cellpadding=0 cellspacing=0 onmousedown="ASTGUI.startDrag(event , 'div_setordercodecs');">
 	<TR bgcolor="#7E5538"  style="background-image:url('images/title_gradient.gif');">
 		<TD Height="20" align="center" style="cursor: move"><font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">Codec Preferences</font></TD>
 		<TD Height="20" align="right" style="cursor: move"><A href="#" onclick="cancel_ordercodecs();"><font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">X</font></A></TD>

Modified: branches/asterisknow/config/incoming.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/incoming.html?view=diff&rev=1028&r1=1027&r2=1028
==============================================================================
--- branches/asterisknow/config/incoming.html (original)
+++ branches/asterisknow/config/incoming.html Mon Jun  4 13:36:10 2007
@@ -22,7 +22,6 @@
 <script src="scripts/prototype.js"></script>
 <script src="scripts/astman.js"></script>
 <script src="scripts/tooltip.js"></script>
-<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 <script>
 var numplan_callbacks = new Object;
@@ -32,14 +31,7 @@
 var editstatus , edit_pattern, edit_DIDtrunk, edit_action, edit_priority ;
 
 function add_toext(a,b){ // a is value, b is text
-	var New_OPTION = document.createElement('option');
-	New_OPTION.text = b ;
-	New_OPTION.value = a ;
-	try {
-		_$('toextension').add(New_OPTION, null); // W3C way
-	}catch(ex) {
-		_$('toextension').add(New_OPTION); // IE way
-	}
+	ASTGUI.selectbox.append(_$('toextension'),b,a);
 }
 
 user_callbacks.format = function(t, x) {
@@ -79,11 +71,18 @@
 	}
 	if ( ( t.name.substring(0,asterisk_guiTDPrefix.length) == asterisk_guiTDPrefix ) && t.names[x]=='exten' ){
 		//get pattern & action
-		var temp = t.fields[x].split(',');
-		if( temp[0] == "s" ){return false;}
-		didtrunks[t.name][temp[0]] = new Object();
-		didtrunks[t.name][temp[0]].priority = temp[1];
-		didtrunks[t.name][temp[0]].action = temp[2];
+		var f = ASTGUI.parseContextLine.getExten(t.fields[x]);
+		if( f == "s" ){return false;}
+		didtrunks[t.name][f] = new Object();
+		didtrunks[t.name][f].priority = ASTGUI.parseContextLine.getPriority(t.fields[x]);
+		didtrunks[t.name][f].action = ASTGUI.parseContextLine.getAction(t.fields[x])
+	}
+
+	if( t.name.match('ringroups-custom-') && (x == undefined) ){
+		var k = t.fieldbyname['gui_ring_groupname'];
+		var l = (k)?k:t.name;
+		add_toext( 'Goto('+t.name+',s,1)', l + ' -- RingGroup' );
+		return false;
 	}
 
 	if( (t.name == TIMERULES_CATEGORY && x != undefined )) {
@@ -104,20 +103,9 @@
 numplan_callbacks.loaded = function() {
 	// load list of trunks to 'fromprovider'
 	var t ;
-	for ( t in didtrunks){
-	if(  didtrunks.hasOwnProperty(t) ){
-		  var a = document.createElement('option');
-		  a.text = didtrunks[t].trunkname ;
-		  a.value = t ;
-		  var b = document.getElementById('fromprovider');
-		  try {
-			b.add(a, null); 
-		  }
-		  catch(ex) {
-			b.add(a); 
-		  }
-	  }
-	}
+	for (t in didtrunks){	if(  didtrunks.hasOwnProperty(t) ){
+		ASTGUI.selectbox.append(_$('fromprovider'),didtrunks[t].trunkname, t);
+	}}
 	// load the object didtrunks into the table callingRulesTable
 	refreshtable();
 	parent.loadscreen(this);
@@ -437,6 +425,7 @@
 
 
 function localajaxinit() {
+	ASTGUI.events.add(document, 'mouseover', show_tooltip);
 	showdiv_statusmessage();
 	setWindowTitle("Incoming Calls");
 
@@ -470,9 +459,9 @@
 	<div id="callingRulesTable_div" style="height:250px;width=100%; overflow :auto; padding : 0px 0px 0px 0px;">
 		<table id="callingRulesTable" cellpadding=2 cellspacing=1 border=0 align=center width=500></table>
 	</div>
-	<center><input type="button" id="adddid" value="Add a Incoming Rule" onclick="add_incomingrule();" onmouseover="show_tooltip('en', 'incoming',0);"></center>
+	<center><input type="button" id="adddid" value="Add a Incoming Rule" onclick="add_incomingrule();" tip="en,incoming,0"></center>
 	<div id="userscontent" STYLE="display:none; position: absolute; left: 20; top: 40; width:475; height:190; background-color:#F4EFE5; border-width: 1px; border-color: #7E5538; border-style: solid;z-index:5">
-	<table width="100%" cellpadding=0 cellspacing=0 onmousedown="startDrag(event , 'userscontent');">
+	<table width="100%" cellpadding=0 cellspacing=0 onmousedown="ASTGUI.startDrag(event , 'userscontent');">
 		<TR bgcolor="#7E5538"  style="background-image:url('images/title_gradient.gif');">
 			<TD Height="20" align="right" style="cursor: move">
 				<A href="#" onclick="$('cancel_a').click();"><font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">X</font></A>
@@ -487,7 +476,7 @@
 				<option value="allunmatched">All Unmatched incoming calls</option>
 				<option value="frompattern">incoming calls that match </option>
 				</select>
-				<span id="thatmatch" onmouseover="show_tooltip('en', 'incoming', 1);">pattern 
+				<span id="thatmatch" tip="en,incoming,1">pattern 
 				<input type="text" id="frompattern" size=12  onchange="enablesave();"  onkeyup="enablesave();"  class="input9">
 				</span>
 			</NOBR>
@@ -511,4 +500,4 @@
 </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>
+</body>

Modified: branches/asterisknow/config/jabber.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/jabber.html?view=diff&rev=1028&r1=1027&r2=1028
==============================================================================
--- branches/asterisknow/config/jabber.html (original)
+++ branches/asterisknow/config/jabber.html Mon Jun  4 13:36:10 2007
@@ -21,7 +21,6 @@
 -->
 <script src="scripts/prototype.js"></script>
 <script src="scripts/astman.js"></script>
-<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 
 <script>

Modified: branches/asterisknow/config/jingle.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/jingle.html?view=diff&rev=1028&r1=1027&r2=1028
==============================================================================
--- branches/asterisknow/config/jingle.html (original)
+++ branches/asterisknow/config/jingle.html Mon Jun  4 13:36:10 2007
@@ -21,7 +21,6 @@
 -->
 <script src="scripts/prototype.js"></script>
 <script src="scripts/astman.js"></script>
-<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 
 <script>

Modified: branches/asterisknow/config/localexts.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/localexts.html?view=diff&rev=1028&r1=1027&r2=1028
==============================================================================
--- branches/asterisknow/config/localexts.html (original)
+++ branches/asterisknow/config/localexts.html Mon Jun  4 13:36:10 2007
@@ -22,7 +22,6 @@
 <script src="scripts/prototype.js"></script>
 <script src="scripts/astman.js"></script>
 <script src="scripts/tooltip.js"></script>
-<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 <script>
 var usercallbacks = new Object;
@@ -35,11 +34,8 @@
 	if(t.name == "general" ){ return t.name; }
 
 	if( !t.fieldbyname['trunkstyle'] ){ // all entries from users.conf other than trunks
-		var ie = (document.attachEvent)? 1:0;
-		h = document.createElement('option');
-		h.text = (t.fieldbyname['fullname'])? unescape(t.fieldbyname['fullname'])+" ("+t.name+")" : "Local Extension ("+t.name+")";
-		h.value = t.name;
-		if(ie){ _$('operatorExtension').add(h);} else{ _$('operatorExtension').add(h,null);}
+		var ht = (t.fieldbyname['fullname'])? unescape(t.fieldbyname['fullname'])+" ("+t.name+")" : "Local Extension ("+t.name+")";
+		ASTGUI.selectbox.append(_$('operatorExtension'),ht, t.name);
 	}
 
 	return null;
@@ -114,6 +110,7 @@
 
 
 function localajaxinit(){
+	ASTGUI.events.add(document, 'mouseover', show_tooltip);
 	if (top._$('AdvancedOptions').style.display == "none"){
 		_$('advbasic').innerHTML = '(Show Advanced Options)';
 	}else{
@@ -126,7 +123,7 @@
 		widgets[fieldnames[x]].disabled = true;
 	}
 
-	add_event( _$('localextenlength') , 'change' , update_spae ) ;
+	ASTGUI.events.add( _$('localextenlength') , 'change' , update_spae ) ;
 	parent.astmanEngine.config2list("users.conf", _$('devices'),widgets, usercallbacks);
 }
 
@@ -211,10 +208,10 @@
 	<fieldset  style="width: 420px">
 		<legend>&nbsp;Agent Login Settings:&nbsp;</legend>
 		<table align='center' cellpadding=2 cellspacing=1>
-			<tr>	<td onmouseover="show_tooltip('en', 'users', 18);" class="field_text" align=right>Agent Login Extension : </td>
+			<tr>	<td tip="en,users,18" class="field_text" align=right>Agent Login Extension : </td>
 				<td><input type=text id="login_exten" size=5  class="input9"></td>
 			</tr>
-			<tr>	<td onmouseover="show_tooltip('en', 'users', 19);" class="field_text" align=right>Agent Callback Login Extension : </td>
+			<tr>	<td tip="en,users,19" class="field_text" align=right>Agent Callback Login Extension : </td>
 				<td><input type=text id="login_callback_exten" size=5  class="input9"></td>
 			</tr>
 		</table>
@@ -222,28 +219,28 @@
 	<fieldset style="width: 420px">
 		<legend>&nbsp;Default Settings for a New User:&nbsp;</legend>
 		<table align='center' cellpadding=2 cellspacing=1>
-		<tr>	<td onmouseover="show_tooltip('en', 'users', 15);" class="field_text" align="right"><input type='checkbox' id='hasagent'></td>
-			<td onmouseover="show_tooltip('en', 'users', 15);" class="field_text" >Is Agent</td>
-			<td onmouseover="show_tooltip('en', 'users', 8);" align=right><input type='checkbox' id='hasvoicemail'></td>
-			<td onmouseover="show_tooltip('en', 'users', 8);" class="field_text" align="left">Voicemail</td>
-		</tr>
-		<tr>	<td onmouseover="show_tooltip('en', 'users', 9);" class="field_text" align="right"><input type='checkbox' id='hasdirectory'></td>
-			<td onmouseover="show_tooltip('en', 'users', 9);" class="field_text" >In Directory</td>
-			<td onmouseover="show_tooltip('en', 'users', 12);" align=right><input type='checkbox' id='hasmanager'></td>
-			<td onmouseover="show_tooltip('en', 'users', 12);" class="field_text" align="left">CTI</td>
-		</tr>
-		<tr>	<td onmouseover="show_tooltip('en', 'users', 10);" class="field_text" align="right"><input type='checkbox' id='hassip'></td>
-			<td onmouseover="show_tooltip('en', 'users', 10);"  class="field_text" >SIP</td>
-			<td onmouseover="show_tooltip('en', 'users', 11);" align=right><input type='checkbox' id='hasiax'></td>
-			<td onmouseover="show_tooltip('en', 'users', 11);" class="field_text" align="left">IAX</td>
-		</tr>
-		<tr>	<td onmouseover="show_tooltip('en', 'users', 13);" class="field_text" align="right"><input type='checkbox' id='callwaiting'></td>
-			<td onmouseover="show_tooltip('en', 'users', 13);" class="field_text" >Call Waiting</td>
-			<td onmouseover="show_tooltip('en', 'users', 14);" align=right><input type='checkbox' id='threewaycalling'></td>

[... 2870 lines stripped ...]


More information about the asterisk-gui-commits mailing list