pari: branch aadk r971 - in /branches/aadk: ./ config/
config/scripts/ config...
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Wed May 23 10:01:51 MST 2007
Author: pari
Date: Wed May 23 12:01:50 2007
New Revision: 971
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=971
Log:
revert the merge in 961
Removed:
branches/aadk/config/emailsettings.html
branches/aadk/config/syslog.html
branches/aadk/config/timerules.html
branches/aadk/todo.txt
Modified:
branches/aadk/ (props changed)
branches/aadk/config/backup.html
branches/aadk/config/cfgbasic.html
branches/aadk/config/cli.html
branches/aadk/config/feditor.html
branches/aadk/config/graphs.html
branches/aadk/config/home.html
branches/aadk/config/iax.html
branches/aadk/config/incoming.html
branches/aadk/config/jabber.html
branches/aadk/config/jingle.html
branches/aadk/config/localexts.html
branches/aadk/config/meetme.html
branches/aadk/config/menus.html
branches/aadk/config/moh.html
branches/aadk/config/numberplan.html
branches/aadk/config/options.html
branches/aadk/config/queues.html
branches/aadk/config/record.html
branches/aadk/config/scripts/astman.js
branches/aadk/config/scripts/tooltip.js
branches/aadk/config/setup/5.html
branches/aadk/config/sip.html
branches/aadk/config/status.html
branches/aadk/config/trunks.html
branches/aadk/config/users.html
branches/aadk/config/voicemail.html
branches/aadk/config/zapata.html
Propchange: branches/aadk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed May 23 12:01:50 2007
@@ -1,1 +1,1 @@
-/trunk:1-430,433-449,489-501,505-506,508-510,512-540,542-557,559,561-577,580-586,588-616,618-767,769-961
+/trunk:1-430,433-449,489-501,505-506,508-510,512-540,542-557,559,561-577,580-586,588-616,618-767,769-900,905
Modified: branches/aadk/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/backup.html?view=diff&rev=971&r1=970&r2=971
==============================================================================
--- branches/aadk/config/backup.html (original)
+++ branches/aadk/config/backup.html Wed May 23 12:01:50 2007
@@ -20,6 +20,7 @@
*
-->
<script src="scripts/prototype.js"></script>
+<script src="scripts/rico.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" />
Modified: branches/aadk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/cfgbasic.html?view=diff&rev=971&r1=970&r2=971
==============================================================================
--- branches/aadk/config/cfgbasic.html (original)
+++ branches/aadk/config/cfgbasic.html Wed May 23 12:01:50 2007
@@ -23,12 +23,24 @@
var browser_alert = "You owe it to yourself to try it out !<BR><A href='http://www.getfirefox.com' style='font-size: 13px; font-family:arial,sans-serif,Helvetica,Trebuchet MS; color : #6C74A3;' target='_blank'>Get Firefox</A>";
</script>
<script src="scripts/prototype.js"></script>
+<script src="scripts/rico.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>
+PanelDef = Class.create();
+PanelDef.prototype = {
+ initialize: function(name, label, icon, content) {
+ this.name = name;
+ this.label = label;
+ this.icon = icon;
+ this.content = content;
+ }
+}
+var panels = new Array;
var eventeater = new Object;
var loggedon = -1;
+var started = 0;
var accordion;
var copyright = "Copyright ©2006-2007 Digium, Inc. All Rights Reserved. ";
var tooltip_default = "Move the mouse over to a field to see tooltips";
@@ -37,133 +49,24 @@
eventeater.pingstatus = false;
var keepPinging;
-function createpanels(){
- var t,u,v;
- var a = _$('configpanel');
- var pnameheight = 22;
- var panels = returnpanels();
- var pheight = (503 - (pnameheight*panels.length) ) ;
- a.pheight = pheight;
- 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.innerHTML = "<nobr><img style='vertical-align: middle;' src='images/accordion-icon.gif'><span style='margin-left: 0px; font-weight: bold;'> " + 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";
-
- u.style.borderStyle = "solid";
- u.style.borderColor = "#1F669B";
- u.style.borderWidth = "0px 1px";
- u.style.margin = "0px";
- u.style.overflow = "hidden";
- u.style.backgroundImage = "url(images/panel.png)";
- u.style.height = "1px";
- u.style.display = "none";
- u.setAttribute('id', this_id+"_U" );
- u.innerHTML =panels[r].desc;
-
- a.appendChild(t);
- a.appendChild(u);
- }
-
- _$( "home" ).style.display = "";
- _$( "home_U" ).style.display = "";
- _$( "home_U" ).style.height = a.pheight +"px";
-}
-
-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 );
-}
-
-function default_tooltip(event){
- var s = (event.srcElement)?event.srcElement:this;
-
- _$(s.id).style.backgroundColor="#6B79A5";
- _$(s.id).style.color="#CED7EF";
- _$(s.id).style.fontWeight="normal";
-
- show_Acctooltip("Move the mouse over to a field to see tooltips");
-}
-
-function fghjhhs(event){
- var s = (event.srcElement)?event.srcElement:this;
- if(event.srcElement && s.id==""){s = event.srcElement.parentNode.parentNode;}
- 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.display = "";
-
- _$('AdvancedOptionsSelect').selectedIndex=-1;
- _$('mainscreen').style.display = "none";
- _$('mainscreen').src = s.id + ".html";
- _$('mainscreen').currentpage = s.id + ".html";
-}
-
-function returnpanels(){
- var panels = [];
-
- var newpanel = function(s){
- var r = {};
- r.caption = s[0];
- r.page = s[1];
- r.desc = s[2];
- panels.push(r);
- }
-
- newpanel( ["Home", "home.html", "Asterisk Configuration Panel - Please click on a panel to manage related features"]);
- newpanel( ["Users", "users.html", "Users is a short cut for quickly adding and removing all the necessary configuration components for any new phone."]);
- newpanel( ["Conferencing", "meetme.html", "MeetMe conference bridging allow quick, ad-hoc conferences with or without security."]);
- newpanel( ["Voicemail", "voicemail.html", "General settings for voicemail"]);
- newpanel( ["Call Queues", "queues.html", "Call queues allow calls to be sequenced to one or more agents."]);
- newpanel( ["Service Providers", "trunks.html", "Service Providers are outbound lines used to allow the system to make calls to the real world. Trunks can be VoIP lines or traditional telephony lines."]);
- 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( ["Record a Menu", "record.html", "Allows you to record custom voicemenus over a phone"]);
- newpanel( ["Networking", "networking.html", "Configures networking parameters."]);
- 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( ["Backup", "backup.html", "Backup Management."]);
- newpanel( ["Update", "flashupdate.html", "Update Firmware installed on the appliance."]);
- newpanel( ["Options", "localexts.html", "Admin Settings"]);
-
- return panels;
-}
-
-
function pingevery(a){
keepPinging = setInterval( makeping, a*250 );
}
function makeping(){
- makerequest("","","action=ping", function(t){ if( t.match(asterisk_guipingerror) ){ window.location.href=window.location.href;} } );
+ var tmp;
+ var opt = {
+ method: 'get',
+ parameters: "action=ping",
+ asynchronous: true,
+ onComplete: function(t){
+ if( t.responseText.match(asterisk_guipingerror) ){
+ window.location.href=window.location.href;
+ }
+
+ }
+ };
+ tmp = new Ajax.Request( asterisk_rawmanPath, opt);
}
eventeater.eventcb = function(msgs) {
@@ -172,47 +75,163 @@
}
}
+
+panels.push(
+
+ new PanelDef("home", "Home", "home.png",
+ "Asterisk Configuration Panel - Please click on a panel to manage related features"),
+
+ new PanelDef("users", "Users", "accordion-icon.gif",
+ "Users is a short cut for quickly adding and removing all the necessary " +
+ "configuration components for any new phone."),
+
+ new PanelDef("meetme", "Conferencing", "accordion-icon.gif",
+ "MeetMe conference bridging allow quick, ad-hoc conferences with or without " +
+ "security."),
+
+ new PanelDef("voicemail", "Voicemail", "accordion-icon.gif",
+ "General settings for voicemail"),
+
+ new PanelDef("queues", "Call Queues", "accordion-icon.gif",
+ "Call queues allow calls to be sequenced to one or more agents."),
+
+ new PanelDef("trunks", "Service Providers", "accordion-icon.gif",
+ "Service Providers are outbound lines used to allow the system to make calls to the " +
+ "real world. Trunks can be VoIP lines or traditional telephony lines."),
+
+ new PanelDef("numberplan", "Calling Rules", "accordion-icon.gif",
+ "The Calling Rules define dialing permissions and least cost routing rules."),
+
+ new PanelDef("incoming", "Incoming Calls", "accordion-icon.gif",
+ "Define how your incoming calls should be handled & configure DID (Direct inward Dialing)"),
+
+ new PanelDef("networking", "Networking", "accordion-icon.gif",
+ "Configures networking parameters"),
+
+ new PanelDef("menus", "Voice Menus", "accordion-icon.gif",
+ "Menus allow for more efficient routing of calls from incoming callers. Also known as IVR (Interactive Voice Response) menus or Digital Receptionist"),
+
+ new PanelDef("record", "Record a Menu", "accordion-icon.gif",
+ "Allows you to record custom voicemenus over a phone"),
+
+ new PanelDef("status", "Active Channels", "accordion-icon.gif", "Monitor active channels."),
+
+ new PanelDef("graphs", "Graphs", "accordion-icon.gif", "View Graphs of your System Information."),
+
+ new PanelDef("sysinfo", "System Info", "accordion-icon.gif", "System Information."),
+
+ new PanelDef("backup", "Backup", "accordion-icon.gif", "Backup Management."),
+
+ new PanelDef("flashupdate", "Update", "accordion-icon.gif", "Update Firmware installed on the appliance"),
+
+ new PanelDef("localexts", "Options", "accordion-icon.gif", "Admin Settings")
+
+);
+
+// show additional panels for advanced mode
+if(window.location.href.match("advanced=yes") ){
+panels.splice(10,0,
+
+ new PanelDef("feditor", "File Editor", "accordion-icon.gif", " Manually edit Config Files"),
+
+ new PanelDef("cli", "Asterisk CLI", "accordion-icon.gif", " Asterisk Command Line Interface"),
+
+ 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")
+ );
+}
+
+
function setLoggedOn(onoff) {
- if(!onoff){return;}
- loggedon = 1;
- var panels = returnpanels();
+ loggedon = onoff;
+ for (var i = 0; i < panels.length; i++) {
+ if (panels[i].name == 'home'){continue;}
+ var w = _$(panels[i].name);
+ w.onClick = (loggedon == 1)?w.realonclick: false;
+ w.onMouseOver = (loggedon == 1)?w.realonmouseover:false;
+ w.style.visibility = (loggedon == 1)?'inherit':'hidden';
+ }
+}
+
+function loadscreen(srcbody) {
+ _$('mainscreen').style.display = '';
+}
+
+function setstatus(status) { _$('status').innerHTML = copyright + status; }
+function showmainscreen(page) {
+ if (started) {
+ var opt = {
+ method: 'get',
+ asynchronous: true,
+ onComplete: function (originalRequest){
+ if ( originalRequest.responseText.match("Error") ) {
+ window.location.href=window.location.href;
+ return ;
+ }
+ if ( originalRequest.responseText.match("Pong") ) {
+ _$('mainscreen').src = page.titleBar.id + ".html";
+ }
+ }
+ };
+ opt.parameters="action=ping" ;
+ var tmp = new Ajax.Request(asterisk_rawmanPath , opt);
+ //$('mainscreen').src = page.titleBar.id + ".html";
+ }
+}
+
+function fademainscreen(page, newpage) {
+ // Confirm Discard Changes goes here
+ _$('tooltip').innerHTML = tooltip_default;
+ _$('mainscreen').style.display = "none";
+}
+
+function show_Acctooltip(name, tip){
+ if( loggedon != 1){ return; }
+ _$('tooltip').innerHTML = tip ;
+
+}
+
+function registerajax() {
+ astmanEngine = new Astman();
+ astmanEngine.setURL(asterisk_rawmanPath);
+
+ _$('mainscreen').src = "home.html" ;
+ 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_feedback(browser_alert, 'green');
+ }
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";
- _$( t + "_U" ).style.display = "none";
- _$( t ).style.display = "";
- }
- _$("home").style.display = "";
- _$("home_U").style.height = _$('configpanel').pheight + "px";
- _$("home_U").style.display = "";
-}
-
-function loadscreen(srcbody) {
- _$('mainscreen').style.display = '';
-}
-
-function setstatus(status) { _$('status').innerHTML = copyright + status; }
-
-
-function show_Acctooltip(tip){
- if( loggedon != 1){ return; }
- _$('tooltip').innerHTML = tip ;
-
-}
-
-function registerajax() {
- pao();
- astmanEngine = new Astman();
- astmanEngine.setURL(asterisk_rawmanPath );
-
- createpanels();
- _$('mainscreen').src = "home.html" ;
- if( navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Konqueror") != -1 || navigator.userAgent.indexOf("Safari") != -1 ){
- gui_feedback(browser_alert, 'green');
- }
-}
+ accordion = new Rico.Accordion( $('configpanel'), { panelHeight: pheight,onHideTab:fademainscreen,onShowTab:showmainscreen });
+ //$('borderbox').style.height = $('screenholder').clientHeight;
+ //$('titlebar').style.width = $('borderbox').clientWidth - 12;
+ for (var i = 0; i < panels.length; i++) {
+ var w = _$(panels[i].name) ;
+ if (panels[i].name == 'home'){
+ w.style.height = "19px";
+ continue;
+ }
+ w.realonclick = w.onClick;
+ w.realonmouseover = w.onMouseOver;
+ }
+ started = 1;
+}
+
+
+//astmanEngine.setEventCallback(eventeater.eventcb);
function Logoff(){
//if(!confirm("Are you sure ?")){ return true; }
@@ -224,133 +243,85 @@
}
function Logoff_2() {
- makerequest("","","action=logoff", function(t){ window.location.href=window.location.href; } );
+ var opt2 = {
+ method: 'get',
+ asynchronous: true,
+ onSuccess: function() {
+ setLoggedOn(0);
+ loggedon == -1;
+ // reload the browser URL
+ window.location.href=window.location.href;
+ },
+ onFailure: function(t) {
+ gui_alert("Config Error: " + t.status + ": " + t.statusText);
+ }
+ };
+ opt2.parameters ="action=logoff";
+ var tmp2 = new Ajax.Request(asterisk_rawmanPath , opt2);
}
function system_link(){
var newwindow_href = location.protocol + '//' + location.hostname + ':8003';
window.open(newwindow_href ,'mainwindow','width=1024,height=768,resizable=yes, scrollbars=no, toolbar=no, location=no,status=yes, menubar=no')
-}
-
-function reloadConfig(){
- _$('reloadconfig').style.display = 'none';
- window.setTimeout( function(){ _$('reloadconfig').style.display=""; }, asterisk_guifbt );
-
- var uri = parent.build_action('renamecat', 0, "","", "", "");
- var r = "action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri;
- makerequest("","",r, function(t){ gui_feedback("Restarted Asterisk !!",'blue'); } );
-}
-
-
-function pao(){
- var acb = _$('dimg');
- var tmp_left = acb.offsetLeft -1;
- var tmp_top = acb.offsetTop -1 ;
- var tmp_parent = acb;
- while(tmp_parent.offsetParent != document.body){
- tmp_parent = tmp_parent.offsetParent;
- tmp_left += tmp_parent.offsetLeft;
- }
- _$('AdvancedOptions').style.left = tmp_left + 700 ;
- _$('AdvancedOptions').style.top = 1 ;
- _$('AdvancedOptionsSelect').selectedIndex=-1;
-}
-
-function hide_advops(){
- _$('AdvancedOptions').style.display='none';
-
- if ( _$('mainscreen').contentWindow.flipadvbasic ){
- _$('mainscreen').contentWindow.flipadvbasic();
- }
-
-}
-
-function goto_advancedoption(){
- _$('mainscreen').style.display = "none";
- if( _$('AdvancedOptionsSelect').value == 'TOSETUP'){top.window.location.href = "./setup/install.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";
- }
- _$( "localexts_U" ).style.height = _$('configpanel').pheight + "px";
- _$( "localexts_U" ).style.display = "";
-
- _$('mainscreen').src = _$('AdvancedOptionsSelect').value ;
}
</script>
<head>
<title>Asterisk Configuration GUI (Beta)</title>
<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">
-<tbody>
- <tr height="47">
- <td align="right" bgcolor="white" height="47" valign="bottom" id="dimg"><img src="images/digiumlogo.gif" align="left"></td>
- <td align="center" bgcolor="white" valign="middle">
- <div id="feedback_round" style="background-color: #FFFFFF; width: 400px; display: none;">
- <div id="feedback" style="font-family: Arial,sans-serif,Helvetica,Trebuchet MS; font-size: 13px; font-weight: bold;"></div>
+<body onload="registerajax( )" topmargin=1>
+<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='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 align="right" bgcolor="white" valign="bottom">
+ <td valign='bottom' align='right' bgcolor='white'>
<!-- <a href="#" onclick=" system_link()">System Configuration</a> | -->
- <a target="_extern" href="http://www.digium.com/en/company/profile/">About Digium</a> |
- <a target="_extern" href="http://www.asterisknow.org/bugs">Report a Bug</a> |
- <a target="_extern" href="http://www.asterisknow.org/help">Help</a>
- <input id="login_name" type="hidden">
+ <a target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a> |
+ <a target='_extern' href="http://www.asterisknow.org/bugs">Report a Bug</a> |
+ <a target='_extern' href="http://www.asterisknow.org/help">Help</a>
+ <input type="hidden" id="login_name">
</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">
- <div id="titlebar" class="mainscreenTitleBar" style="position: absolute; top: 48px;">
- <span style="margin-left: 4px; font-weight: bold;">Loading Screen <img src="images/dots.gif"></span>
+<tr><td height="505">
+ <div id="configpanel" style="width:150px; height: 505px;">
+ <script>
+ for (var i = 0; i < panels.length; i++) {
+ var t = "<div onmouseover='show_Acctooltip(\""+ panels[i].name +"\", \""+ panels[i].content +"\")' onmouseout='show_Acctooltip(\""+ panels[i].name +"\", \"" + tooltip_default +"\")'>";
+ t += " <div id='" + panels[i].name + "' class='accordionTabTitleBar'>";
+ t += " <nobr><img style='vertical-align:middle' src='images/" + panels[i].icon + "'>";
+ t += " <span style='margin-left: 0px;font-weight:bold'>" + panels[i].label + "</span></nobr>";
+ t += " </div>";
+ t += " <div class='accordionTabContentBox' style='background-image:url(images/panel.png)'>" + panels[i].content + "</div>";
+ t += "</div>";
+ document.write(t);
+ }
+ </script>
+ </div>
+ </td>
+ <td width="550" height="505" bgcolor="#EFEFEF" valign="top" id="screenholder">
+ <div id="titlebar" class="mainscreenTitleBar" style="position:absolute;top:48px">
+ <span style="margin-left: 4px;font-weight:bold">Loading Screen <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">
- <div class="mainscreenTooltipBar" align="right">
- <span id="logoutlink" style="display:none">Logout</span>
+ <iframe width="540" height="505" frameborder="0" border="0" marginheight="0" marginwidth="0" id="mainscreen" style="position:absolute;top:48px;" SCROLLING=no></iframe>
+ </td>
+ <td valign=top width=250 height="505">
+ <div class="mainscreenTooltipBar" align=right>
+ <span id="logoutlink" style="display:none"></span>
</div>
- <div style="padding-top: 0pt; padding-bottom: 0pt;" id="tooltip_round" class="tooltip_round"><div style="background-color: rgb(221, 221, 221);"><span style="border-style: solid; border-color: rgb(206, 206, 206); border-width: 0px 1px; overflow: hidden; background-color: rgb(191, 191, 191); display: block; height: 1px; font-size: 1px; margin-left: 1px; margin-right: 1px;"></span><span style="border-style: solid; border-color: rgb(206, 206, 206); border-width: 0px 1px; overflow: hidden; background-color: rgb(191, 191, 191); display: block; height: 1px; font-size: 1px; margin-left: 0px; margin-right: 0px;"></span></div>
- <div id="tooltip" style="margin-left: 4px; font-family: Trebuchet MS,Arial,Helvetica,sans-serif; font-size: 11px;">Move the mouse over to a field to see tooltips</div>
- <div style="background-color: rgb(221, 221, 221);"><span style="border-style: solid; border-color: rgb(206, 206, 206); border-width: 0px 1px; overflow: hidden; background-color: rgb(191, 191, 191); display: block; height: 1px; font-size: 1px; margin-left: 0px; margin-right: 0px;"></span><span style="border-style: solid; border-color: rgb(206, 206, 206); border-width: 0px 1px; overflow: hidden; background-color: rgb(191, 191, 191); display: block; height: 1px; font-size: 1px; margin-left: 1px; margin-right: 1px;"></span></div></div>
+ <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>
</td>
</tr>
-<tr><td colspan="3" align="center" height="18">
- <div id="status" class="statusbar">Copyright 2006-2007 Digium, Inc. Digium and Asterisk are registered <a href="http://www.digium.com/en/company/profile/trademarkpolicy.php">trademarks</a> of Digium, Inc. All Rights Reserved. <i><a href="#">Legal Information</a></i></div>
+<tr><td colspan="3" align=center height=18>
+ <div id="status" class="statusbar">Copyright ©2006-2007 Digium, Inc. Digium® and Asterisk® are registered <a href="http://www.digium.com/en/company/profile/trademarkpolicy.php">trademarks</a> of Digium, Inc. All Rights Reserved. <i><a href="#">Legal Information</a></i></div>
</td>
</tr>
-</tbody></table>
-<div id="AdvancedOptions" style="display:none; position:absolute; z-index:1004; width:220px; background-color : #EFEFEF; padding : 2px 2px 4px 2px;">
- <table cellpadding=1 cellspacing=0 border=0 width=220>
- <tr> <td align=right>Goto: </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="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>
- </td>
- <td align="right" valign="top"><span style="color: #909090; font-size: 8pt;cursor:pointer;" onclick="hide_advops();">X</span></td>
- </tr>
- </table>
-</div>
-</body>
+</table>
+</body>
Modified: branches/aadk/config/cli.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/cli.html?view=diff&rev=971&r1=970&r2=971
==============================================================================
--- branches/aadk/config/cli.html (original)
+++ branches/aadk/config/cli.html Wed May 23 12:01:50 2007
@@ -19,6 +19,7 @@
*
-->
<script src="scripts/prototype.js"></script>
+<script src="scripts/rico.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" />
Modified: branches/aadk/config/feditor.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/feditor.html?view=diff&rev=971&r1=970&r2=971
==============================================================================
--- branches/aadk/config/feditor.html (original)
+++ branches/aadk/config/feditor.html Wed May 23 12:01:50 2007
@@ -19,6 +19,7 @@
*
-->
<script src="scripts/prototype.js"></script>
+<script src="scripts/rico.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" />
@@ -78,14 +79,25 @@
function delete_context(){
if(!confirm("Are you sure you want to delete the selected context ?")){ return true; }
+
var uri = build_action('delcat', 0, global_contextBeingEdited ,"", "");
- makerequest('u', global_fileBeingEdited, uri , function(t) {
+ var opt = {
+ method: 'get',
+ asynchronous: true,
+ onSuccess: function() {
_$('AddContext').style.display = "none";
_$('div_editcontext').style.display = "none";
global_contextBeingEdited = "";
gui_feedback('Context Deleted','blue');
config2json( global_fileBeingEdited, 0, fileparsed );
- });
+ },
+ onFailure: function(t) {
+ gui_alert("Config Error: " + t.status + ": " + t.statusText);
+ gui_alert("Failed to Rename the DID context for " + old_didcontext );
+ }
+ };
+ opt.parameters= "action=updateconfig&srcfilename=" + encodeURIComponent(global_fileBeingEdited) + "&dstfilename=" + encodeURIComponent(global_fileBeingEdited) + uri;
+ var tmp = new Ajax.Request(asterisk_rawmanPath, opt);
}
@@ -97,13 +109,23 @@
function update_context(){ // rename from global_contextBeingEdited to $('context_edited').value
var uri = build_action('renamecat', 0, global_contextBeingEdited ,"", _$('context_edited').value );
- makerequest('u',global_fileBeingEdited, uri, function(t) {
+ var opt = {
+ method: 'get',
+ asynchronous: true,
+ onSuccess: function() {
_$('AddContext').style.display = "none";
_$('div_editcontext').style.display = "none";
global_contextBeingEdited = "";
gui_feedback('Context Updated','blue');
config2json( global_fileBeingEdited, 0, fileparsed );
- });
+ },
+ onFailure: function(t) {
+ gui_alert("Config Error: " + t.status + ": " + t.statusText);
+ gui_alert("Failed to Rename the DID context for " + old_didcontext );
+ }
+ };
+ opt.parameters= "action=updateconfig&srcfilename=" + encodeURIComponent(global_fileBeingEdited) + "&dstfilename=" + encodeURIComponent(global_fileBeingEdited) + uri;
+ var tmp = new Ajax.Request(asterisk_rawmanPath, opt);
}
@@ -175,36 +197,34 @@
}
-function showeditcontext(event){
- var t = (event.srcElement)?event.srcElement:this;
+function showeditcontext(){
_$('AddContext').style.display = "none";
_$('div_editcontextContent').style.display = "none";
//move div_editcontext ontop of h_id and display it
- var h_id = t.getAttribute('id') ;
- global_contextBeingEdited = t.getAttribute('context');
+ var h_id = this.getAttribute('id') ;
+ global_contextBeingEdited = this.getAttribute('context');
_$(h_id).insertBefore(_$('div_editcontext'), null );
_$('div_editcontext').style.display = "";
- var f = t.getAttribute('context')
+ var f = this.getAttribute('context')
_$('context_edited').value = f ;
_$('context_edited').size = f.length;
_$('context_edited').focus();
}
-function showeditcontextContent(event){
- var t = (event.srcElement)?event.srcElement:this;
+function showeditcontextContent(){
_$('AddContext').style.display = "none";
_$('div_editcontext').style.display = "none";
- var i_id = t.getAttribute('id') ;
- global_contextBeingEdited = t.getAttribute('context');
+ var i_id = this.getAttribute('id') ;
+ global_contextBeingEdited = this.getAttribute('context');
_$(i_id).insertBefore(_$('div_editcontextContent'), null );
_$('div_editcontextContent').style.display = "";
- _$('context_Content').value = t.CONTEXTCONTENT ;
- _$('context_Content').rows = t.CONTEXTCONTENT_ROWS ;
+ _$('context_Content').value = this.CONTEXTCONTENT ;
+ _$('context_Content').rows = this.CONTEXTCONTENT_ROWS ;
//_$('context_edited').size = f.length;
_$('context_Content').focus();
}
@@ -234,15 +254,26 @@
if( posofeq == -1){ continue; }
firstpart = u[f].substring(0, posofeq );
secondpart = u[f].substring( posofeq+1 );
- uri += build_action('append', c, global_contextBeingEdited, firstpart, secondpart ); c++;
+ uri += build_action('update', c, global_contextBeingEdited, firstpart, secondpart ); c++;
}
- makerequest('u',global_fileBeingEdited, uri, function(t){
+ var opt = {
+ method: 'get',
+ asynchronous: true,
+ onSuccess: function() {
_$('div_editcontextContent').style.display = "none";
global_contextBeingEdited = "";
gui_feedback('Context Content Updated','blue');
config2json( global_fileBeingEdited, 0, fileparsed );
- });
+ },
+ onFailure: function(t) {
+ gui_alert("Config Error: " + t.status + ": " + t.statusText);
+ gui_alert("Failed to Rename the DID context for " + old_didcontext );
+ }
+ };
+ opt.parameters= "action=updateconfig&srcfilename=" + encodeURIComponent(global_fileBeingEdited) + "&dstfilename=" + encodeURIComponent(global_fileBeingEdited) + uri;
+ var tmp = new Ajax.Request(asterisk_rawmanPath, opt);
+
}
@@ -256,7 +287,7 @@
//alert(b);
var zz = _$('file_output');
- var c = b;
+ var c = eval('(' + b + ')');
var p = "";
var rows ;
@@ -277,10 +308,10 @@
h.style.width = '95%';
h.style.fontFamily = "'trebuchet ms',helvetica,sans-serif";
h.style.fontSize = '10pt' ;
- h.style.padding = '2px 2px 3px 3px' ;
+ var s_id = "span_" + d;
h.innerHTML = " [" + d + "]";
zz.appendChild(h);
- //Rico.Corner.round(h_id, {compact:true});
+ Rico.Corner.round(h_id, {compact:true});
add_event( _$(h_id) , 'click', showeditcontext );
var i = document.createElement("div");
@@ -292,23 +323,20 @@
i.style.marginTop = '5px' ;
i.style.width = '95%';
i.style.fontSize = '9pt' ;
- i.style.padding = '2px 2px 3px 3px' ;
i.style.fontFamily = 'courier' ;
var temp_contextContent = "" ;
rows = 0;
- if(c[d].length == 0){i.innerHTML += " <BR>" ;}
for(var r=0; r < c[d].length ; r++ ){
p = unescape( c[d][r] );
i.innerHTML += " " + p + "<BR>" ;
temp_contextContent += p + "\n";
rows++;
}
-
i.CONTEXTCONTENT = temp_contextContent ;
i.CONTEXTCONTENT_ROWS = rows ;
zz.appendChild(i);
- //Rico.Corner.round("contextContent_" + d, {compact:true});
+ Rico.Corner.round("contextContent_" + d, {compact:true});
add_event( _$(i_id) , 'click', showeditcontextContent );
}
@@ -353,12 +381,23 @@
function add_context(){
var uri = build_action('newcat', 0, _$('New_ContextName').value ,"", "");
- makerequest('u',global_fileBeingEdited,uri, function(){
+
+ var opt = {
+ method: 'get',
+ asynchronous: true,
+ onSuccess: function() {
cancel_addcontext();
global_contextBeingEdited = "";
gui_feedback('New Context Added','blue');
config2json( global_fileBeingEdited, 0, fileparsed );
- });
+ },
+ onFailure: function(t) {
+ gui_alert("Config Error: " + t.status + ": " + t.statusText);
+ gui_alert("Failed to Add New context ");
+ }
+ };
+ opt.parameters= "action=updateconfig&srcfilename=" + encodeURIComponent(global_fileBeingEdited) + "&dstfilename=" + encodeURIComponent(global_fileBeingEdited) + uri;
+ var tmp = new Ajax.Request(asterisk_rawmanPath, opt);
}
</script>
<body id="foo" onload="localajaxinit()" bgcolor="FFFFFF" onunload="resetmainscreen();">
Modified: branches/aadk/config/graphs.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/graphs.html?view=diff&rev=971&r1=970&r2=971
==============================================================================
--- branches/aadk/config/graphs.html (original)
+++ branches/aadk/config/graphs.html Wed May 23 12:01:50 2007
@@ -19,6 +19,7 @@
*
-->
<script src="scripts/prototype.js"></script>
+<script src="scripts/rico.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" />
Modified: branches/aadk/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/home.html?view=diff&rev=971&r1=970&r2=971
==============================================================================
--- branches/aadk/config/home.html (original)
+++ branches/aadk/config/home.html Wed May 23 12:01:50 2007
@@ -23,6 +23,7 @@
<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 demo = new Object;
var localloggedon = -1;
var asterisk_guitools = parent.asterisk_guitools;
var asterisk_rawmanPath = parent.asterisk_rawmanPath;
@@ -59,33 +60,6 @@
if(!f){ try{ _$('username').focus();}catch(err){ } }
}
-function localinit() {
- top.document.title = "Asterisk GUI (Beta) -- Home";
- var tmp;
- var opt = {
- method: 'get',
- parameters: "action=ping",
- asynchronous: true,
- onComplete: function(t){
- var f = t.responseText;
- if( f.match("Pong")){
- _$('statusbar').innerHTML = "<img src='images/tick.gif'><i>Connected!</i>";
- loggedOn();
- parent.loadscreen(this);
- return;
- }
- if( f.match(parent.asterisk_guipingerror)){
- _$('statusbar').innerHTML = "<i>Please login...</i>";
- loggedOff();
- parent.loadscreen(this);
- _$('username').focus();
- return;
- }
- }
- };
- tmp = new Ajax.Request( asterisk_rawmanPath, opt);
-}
-
function loggedOn() {
if ((parent.loggedon == 1) && (localloggedon == 1)){ return; }
if(_$('secret').value=="password"){
@@ -127,34 +101,19 @@
if ((parent.loggedon == 0) && (localloggedon == 0))
return;
parent.setLoggedOn(0);
- parent.loggedon = 0;
parent.document.getElementById('logoutlink').innerHTML = " ";
localloggedon = 0;
- _$('username').disabled = 0;
- _$('secret').disabled = 0;
- _$('logoff').disabled = 1;
- _$('login').disabled = 0;
-}
-
-
-function doLogin() {
- if( _$('username').value == "" ){
- parent.gui_feedback("Please enter a Username");
- _$('username').focus();
- return true;
- }
-
- if( _$('secret').value == "" ){
- parent.gui_feedback("Please enter a password");
- _$('secret').focus();
- return true;
- }
- parent.document.getElementById('login_name').value = _$('username').value ;
- _$('statusbar').innerHTML = "<i>Logging in...</i>";
- parent.astmanEngine.sendRequest('action=login&username=' + _$('username').value + "&secret=" + _$('secret').value, afterlogin);
-}
-
-afterlogin = function(msgs) {
+ _$('username').className = "input9";
+ _$('secret').className = "input9";
+ updateButtons();
+}
+
+demo.logoffs = function(msgs) {
+ _$('statusbar').innerHTML = msgs[0].headers['message'];
+ loggedOff();
+};
+
+demo.logins = function(msgs) {
_$('statusbar').innerHTML = msgs[0].headers['message'];
if ( msgs[0].headers['response'] == "Success" ){
gui_sysinfo_mount(1);
@@ -168,11 +127,47 @@
}
};
+demo.pongs = function(msgs) {
+ resp = msgs[0].headers['response'];
+ if (resp == "Pong") {
+ gui_sysinfo_mount(0);
+ } else {
+ _$('statusbar').innerHTML = "<i>Please login...</i>";
+ loggedOff();
+ parent.loadscreen(this);
+ }
+}
+
+function doLogin() {
+ if( _$('username').value == "" ){
+ parent.gui_feedback("Please enter a Username");
+ _$('username').focus();
+ return true;
+ }
+
+ if( _$('secret').value == "" ){
+ parent.gui_feedback("Please enter a password");
+ _$('secret').focus();
+ return true;
+ }
+ parent.document.getElementById('login_name').value = _$('username').value ;
+ _$('statusbar').innerHTML = "<i>Logging in...</i>";
+ parent.astmanEngine.sendRequest('action=login&username=' + _$('username').value + "&secret=" + _$('secret').value, demo.logins);
+}
function doLogoff() {
parent.Logoff();
}
+function localajaminit() {
+ parent.astmanEngine.sendRequest('action=ping', demo.pongs);
+}
+
+function localinit() {
+ showdiv_statusmessage();
+ top.document.title = "Asterisk GUI (Beta) -- Home";
+ localajaminit();
+}
[... 2990 lines stripped ...]
More information about the asterisk-gui-commits
mailing list