pari: branch appliance r237 - /branches/appliance/config/
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Wed Jan 10 21:23:15 MST 2007
Author: pari
Date: Wed Jan 10 22:23:15 2007
New Revision: 237
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=237
Log:
Confirm on navigating to a different website while logged in, auto logout if confirmed
Modified:
branches/appliance/config/cfgadvanced.html
branches/appliance/config/cfgappliance.html
branches/appliance/config/cfgbasic.html
branches/appliance/config/localexts.html
branches/appliance/config/options.html
Modified: branches/appliance/config/cfgadvanced.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/cfgadvanced.html?view=diff&rev=237&r1=236&r2=237
==============================================================================
--- branches/appliance/config/cfgadvanced.html (original)
+++ branches/appliance/config/cfgadvanced.html Wed Jan 10 22:23:15 2007
@@ -159,6 +159,22 @@
}
function registerajax() {
+ window.onbeforeunload = function(){
+ if(loggedon == 1)
+ return "Doing so will terminate your Asterisk GUI session";
+ }
+
+ window.onunload = function(){
+ if(loggedon != 1) return true;
+ var opt2 = {
+ method: 'get',asynchronous: true,
+ onSuccess: function() {setLoggedOn(0);loggedon == -1;},
+ onFailure: function(t) {}
+ };
+ opt2.parameters ="action=logoff";
+ var tmp2 = new Ajax.Request("../../rawman", opt2);
+ }
+
var pnameheight = 22;
var pheight = (503 - (pnameheight*panels.length) ) ;
accordion = new Rico.Accordion( $('configpanel'), { panelHeight: pheight,onHideTab:fademainscreen,onShowTab:showmainscreen });
Modified: branches/appliance/config/cfgappliance.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/cfgappliance.html?view=diff&rev=237&r1=236&r2=237
==============================================================================
--- branches/appliance/config/cfgappliance.html (original)
+++ branches/appliance/config/cfgappliance.html Wed Jan 10 22:23:15 2007
@@ -150,6 +150,22 @@
}
function registerajax() {
+ window.onbeforeunload = function(){
+ if(loggedon == 1)
+ return "Doing so will terminate your Asterisk GUI session";
+ }
+
+ window.onunload = function(){
+ if(loggedon != 1) return true;
+ var opt2 = {
+ method: 'get',asynchronous: true,
+ onSuccess: function() {setLoggedOn(0);loggedon == -1;},
+ onFailure: function(t) {}
+ };
+ opt2.parameters ="action=logoff";
+ var tmp2 = new Ajax.Request("../../rawman", opt2);
+ }
+
var pnameheight = 22;
var pheight = (503 - (pnameheight*panels.length) ) ;
accordion = new Rico.Accordion( $('configpanel'), { panelHeight: pheight,onHideTab:fademainscreen,onShowTab:showmainscreen });
Modified: branches/appliance/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/cfgbasic.html?view=diff&rev=237&r1=236&r2=237
==============================================================================
--- branches/appliance/config/cfgbasic.html (original)
+++ branches/appliance/config/cfgbasic.html Wed Jan 10 22:23:15 2007
@@ -153,6 +153,22 @@
}
function registerajax() {
+ window.onbeforeunload = function(){
+ if(loggedon == 1)
+ return "Doing so will terminate your Asterisk GUI session";
+ }
+
+ window.onunload = function(){
+ if(loggedon != 1) return true;
+ var opt2 = {
+ method: 'get',asynchronous: true,
+ onSuccess: function() {setLoggedOn(0);loggedon == -1;},
+ onFailure: function(t) {}
+ };
+ opt2.parameters ="action=logoff";
+ var tmp2 = new Ajax.Request("../../rawman", opt2);
+ }
+
var pnameheight = 22;
var pheight = (503 - (pnameheight*panels.length) ) ;
accordion = new Rico.Accordion( $('configpanel'), { panelHeight: pheight,onHideTab:fademainscreen,onShowTab:showmainscreen });
@@ -174,7 +190,7 @@
function Logoff() {
- t=confirm("Are you sure ?")
+ var t=confirm("Are you sure ?")
if(t == false)
return true;
var opt2 = {
Modified: branches/appliance/config/localexts.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/localexts.html?view=diff&rev=237&r1=236&r2=237
==============================================================================
--- branches/appliance/config/localexts.html (original)
+++ branches/appliance/config/localexts.html Wed Jan 10 22:23:15 2007
@@ -30,6 +30,8 @@
var widgets = new Array;
function tosetup(){
+ parent.window.onbeforeunload = function(){ }
+ parent.window.onunload = function(){ }
parent.window.location.href = "./setup/install.html";
}
Modified: branches/appliance/config/options.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/options.html?view=diff&rev=237&r1=236&r2=237
==============================================================================
--- branches/appliance/config/options.html (original)
+++ branches/appliance/config/options.html Wed Jan 10 22:23:15 2007
@@ -210,6 +210,8 @@
function tosetup(){
+ parent.window.onbeforeunload = function(){ }
+ parent.window.onunload = function(){ }
parent.window.location.href = "./setup/install.html";
}
More information about the asterisk-gui-commits
mailing list