toggleModal() now explicitly accepts an argument of 1 (on) or 0 (off)
authorArt Cancro <ajc@citadel.org>
Tue, 30 Nov 2010 08:57:00 +0000 (03:57 -0500)
committerArt Cancro <ajc@citadel.org>
Tue, 30 Nov 2010 08:57:00 +0000 (03:57 -0500)
webcit/static/modal.js
webcit/static/styles/modal.css
webcit/static/t/confirmlogoff.html
webcit/static/t/head.html
webcit/static/t/paging/failed_hook.html
webcit/static/wclib.js

index 45090b92c0cdfa3f3a3fbf81d40095272b3df30a..bd5de79603a410be1170662a92ad70ea61df111f 100644 (file)
@@ -70,10 +70,13 @@ if ( isSafari ) {
 
 
 var toggleModal = function (b) {
+
+       if (modalShowing && b) return;
+       if (!modalShowing && !b) return;
        
        html.className=modalShowing?'':'modal';
 
-       modalShowing = b;
+       modalShowing = !modalShowing;
 
        if (modalShowing) {
                dialog.focus();
index c3331bebdeb5606813b07ba97d5b8b53c493b8a5..6389974b8528c5b0809b0061bc589c7acaed09e8 100644 (file)
@@ -69,6 +69,7 @@
 }
 
 .md-dialog {
-       background:white;
-       border:2px solid #800;
+       background: white;
+       border: 2px solid #800;
+       padding: 10px;
 }
index da5b4c534045506bcdaf2192efb0bfa46a6f631b..c6c3b82b38cf5b3096a9cfb3aa250b1dfe2fecf9 100644 (file)
@@ -2,7 +2,7 @@
 <body>
 <center>
 <h1><a href="termquit"><img src="static/logoff_32x.gif" border="0">&nbsp;<?_("Log off")></a></h1>
-<h1><a href="javascript:toggleModal(false);"><img src="static/closewindow.gif" height="32" width="32" border="0">&nbsp;<?_("Cancel")></a></h1>
+<h1><a href="javascript:toggleModal(0);"><img src="static/closewindow.gif" height="32" width="32" border="0">&nbsp;<?_("Cancel")></a></h1>
 </center>
 </body>
 </html>
index 1e98bf7bb8e882b181e702bc5a616eae370676dd..1840e24882c4112ba56553a173d4fd3726e954d2 100644 (file)
@@ -44,7 +44,7 @@ This is the modal dialog box.  If you are seeing this message, the
 modal dialog was invoked without first populating its contents, which
 is a mistake.
 <br>
-<h2><a href="javascript:toggleModal();">Dismiss</a></h2>
+<h2><a href="javascript:toggleModal(0);">Dismiss</a></h2>
 
                                        </div>
                                </div>
index 46d983c3dda5307e5ecdf4a5fdd46b138f8f9ffc..98ae11373509664a22906350490186c17e0c9c1e 100644 (file)
@@ -1,7 +1,7 @@
 <script type="text/javascript">
 function PopUpFailed() {
 
-       $('md-content').innerHTML = "<div align='justify'><?_("You have one or more instant messages waiting, but the Citadel Instant Messenger window failed to open.  This is probably because you have a popup blocker installed.  Please configure your popup blocker to allow popups from this site if you wish to receive instant messages.")></div><br><br><div align='center'><h2><a href='javascript:toggleModal(false);'>OK</a></h2></div>";
-       toggleModal(true);
+       $('md-content').innerHTML = "<div align='justify'><?_("You have one or more instant messages waiting, but the Citadel Instant Messenger window failed to open.  This is probably because you have a popup blocker installed.  Please configure your popup blocker to allow popups from this site if you wish to receive instant messages.")></div><br><br><div align='center'><h2><a href='javascript:toggleModal(0);'>OK</a></h2></div>";
+       toggleModal(1);
 }
 </script>
index 9ec96b0e82646372ded960bbcdeb78af82fd4585..7a85697ecaad8823adb72c62b049d2a84b09d563 100644 (file)
@@ -870,7 +870,7 @@ function ConfirmLogoff() {
                 {
                         method: 'get',
                        onSuccess: function(cl_success) {
-                               toggleModal(true);
+                               toggleModal(1);
                        }
                 }
         );