]> code.citadel.org Git - citadel.git/blobdiff - webcit/static/modal.js
Merge branch 'master' of ssh://git.citadel.org/appl/gitroot/citadel
[citadel.git] / webcit / static / modal.js
index 45090b92c0cdfa3f3a3fbf81d40095272b3df30a..5b631b14b40f6acd1baa685ae10e916804239337 100644 (file)
@@ -69,11 +69,14 @@ if ( isSafari ) {
 // need to do some special stuff to handle MSIE.
 
 
-var toggleModal = function (b) {
+function toggleModal (b) {
+
+       if (modalShowing && b) return;
+       if (!modalShowing && !b) return;
        
        html.className=modalShowing?'':'modal';
 
-       modalShowing = b;
+       modalShowing = !modalShowing;
 
        if (modalShowing) {
                dialog.focus();