|
From: <abe...@us...> - 2011-12-11 23:46:41
|
Revision: 5302
http://astlinux.svn.sourceforge.net/astlinux/?rev=5302&view=rev
Author: abelbeck
Date: 2011-12-11 23:46:35 +0000 (Sun, 11 Dec 2011)
Log Message:
-----------
web interface, CLI tab, display a dialog if CLI session is active and user tries to leave the page, Thanks to David Kerr for helping
Modified Paths:
--------------
branches/1.0/package/webinterface/altweb/admin/cli.php
Modified: branches/1.0/package/webinterface/altweb/admin/cli.php
===================================================================
--- branches/1.0/package/webinterface/altweb/admin/cli.php 2011-12-09 02:59:53 UTC (rev 5301)
+++ branches/1.0/package/webinterface/altweb/admin/cli.php 2011-12-11 23:46:35 UTC (rev 5302)
@@ -32,6 +32,14 @@
<script language="JavaScript" type="text/javascript">
//<![CDATA[
+ function setOKexit() {
+ var cli = document.getElementById("cli");
+ var active = cli.contentWindow.document.getElementById("reconnect").style.visibility == 'hidden';
+ if (active) {
+ return 'CLI session is active, leaving will kill the session!';
+ }
+ }
+
function setCLIheight() {
var winW = 840;
if (document.documentElement && document.documentElement.offsetWidth) {
@@ -42,6 +50,7 @@
}
document.getElementById("cli").height = winW * 11 / 20;
window.onresize = setCLIheight;
+ window.onbeforeunload = setOKexit;
}
//]]>
</script>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|