From eb7c197cf52779055fc4be414c4f6a87ed67345c Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 30 Nov 2010 03:57:00 -0500 Subject: [PATCH] toggleModal() now explicitly accepts an argument of 1 (on) or 0 (off) --- webcit/static/modal.js | 5 ++++- webcit/static/styles/modal.css | 5 +++-- webcit/static/t/confirmlogoff.html | 2 +- webcit/static/t/head.html | 2 +- webcit/static/t/paging/failed_hook.html | 4 ++-- webcit/static/wclib.js | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/webcit/static/modal.js b/webcit/static/modal.js index 45090b92c..bd5de7960 100644 --- a/webcit/static/modal.js +++ b/webcit/static/modal.js @@ -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(); diff --git a/webcit/static/styles/modal.css b/webcit/static/styles/modal.css index c3331bebd..6389974b8 100644 --- a/webcit/static/styles/modal.css +++ b/webcit/static/styles/modal.css @@ -69,6 +69,7 @@ } .md-dialog { - background:white; - border:2px solid #800; + background: white; + border: 2px solid #800; + padding: 10px; } diff --git a/webcit/static/t/confirmlogoff.html b/webcit/static/t/confirmlogoff.html index da5b4c534..c6c3b82b3 100644 --- a/webcit/static/t/confirmlogoff.html +++ b/webcit/static/t/confirmlogoff.html @@ -2,7 +2,7 @@

 

-

 

+

 

diff --git a/webcit/static/t/head.html b/webcit/static/t/head.html index 1e98bf7bb..1840e2488 100644 --- a/webcit/static/t/head.html +++ b/webcit/static/t/head.html @@ -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.
-

Dismiss

+

Dismiss

diff --git a/webcit/static/t/paging/failed_hook.html b/webcit/static/t/paging/failed_hook.html index 46d983c3d..98ae11373 100644 --- a/webcit/static/t/paging/failed_hook.html +++ b/webcit/static/t/paging/failed_hook.html @@ -1,7 +1,7 @@ diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index 9ec96b0e8..7a85697ec 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -870,7 +870,7 @@ function ConfirmLogoff() { { method: 'get', onSuccess: function(cl_success) { - toggleModal(true); + toggleModal(1); } } ); -- 2.30.2