ICAL: add conflict handling
[citadel.git] / webcit / static / modal.js
index f12aed2252a13474c82c27c4acfce0915d128c03..bd5de79603a410be1170662a92ad70ea61df111f 100644 (file)
@@ -69,10 +69,15 @@ if ( isSafari ) {
 // need to do some special stuff to handle MSIE.
 
 
-var toggleModal = function () {
+var toggleModal = function (b) {
+
+       if (modalShowing && b) return;
+       if (!modalShowing && !b) return;
        
        html.className=modalShowing?'':'modal';
+
        modalShowing = !modalShowing;
+
        if (modalShowing) {
                dialog.focus();
        } else if (focusedElement) {