summaryrefslogtreecommitdiff
path: root/modules/extra/webcpanel/templates/default/header.html
diff options
context:
space:
mode:
authorMatthewM <mcm@they-got.us>2012-12-20 16:12:16 -0500
committerMatthewM <mcm@they-got.us>2012-12-20 16:12:16 -0500
commit8e219bdd770e5d62acca853ff0a47e32dc1b1dcf (patch)
tree4efdcbf466b638a9ae4acade407e644ab85d818c /modules/extra/webcpanel/templates/default/header.html
parent5acc93dd34c6bd474ae1bc85f70fa2d41a60f8bd (diff)
Moved the javascript to header.html from memos.html to make it easier to intergrate the overlay feedback and do tweaks
Diffstat (limited to 'modules/extra/webcpanel/templates/default/header.html')
-rw-r--r--modules/extra/webcpanel/templates/default/header.html51
1 files changed, 51 insertions, 0 deletions
diff --git a/modules/extra/webcpanel/templates/default/header.html b/modules/extra/webcpanel/templates/default/header.html
index 35bffaa23..15148838a 100644
--- a/modules/extra/webcpanel/templates/default/header.html
+++ b/modules/extra/webcpanel/templates/default/header.html
@@ -7,6 +7,57 @@
<script type="text/javascript">
var t=5000; // Time in ms to display an overlay if one will be displayed
</script>
+ {IF EXISTS CMDR}
+ <script type="text/javascript">
+ $(document).ready(function() \{
+
+ /*Modal*/
+ var id = "#dialog";
+
+ showModal();
+
+ $('.close').click(function (e) \{
+ e.preventDefault();
+ hideModal();
+ \});
+
+ $('#mask').click(function () \{
+ hideModal();
+ \});
+
+ function hideModal() \{
+ if ($('#mask').not(':hidden')) \{
+ $('.master').fadeTo('slow',1.0);
+ $('#mask, .window').fadeOut(200);
+ \}
+ \}
+
+ function showModal() \{
+ var mHeight = $(document).height();
+ var mWidth = $(window).width();
+
+ var alertMsg = '<br/>{CMDR}<br/>';
+
+ $('#mask').css(\{'width': mWidth, 'height': mHeight\});
+ $('#mask').fadeIn(200);
+ $('#mask').fadeTo('fast',0.75);
+
+ $('#dialogMsg').html(alertMsg);
+ var top = mHeight/2-$(id).height()/2;
+ var left= mWidth/2-$(id).width()/2;
+
+ $(id).css('top', top);
+ $(id).css('left', left);
+ $('.master').fadeTo('fast',0.3);
+
+ $(id).fadeIn(500);
+ setTimeout(hideModal, t);
+
+ \}
+
+ \});
+ </script>
+ {END IF}
</head>
<body>
<div id="boxes">