Use modal dialog for confirm logoff
authorArt Cancro <ajc@citadel.org>
Tue, 30 Nov 2010 06:52:24 +0000 (01:52 -0500)
committerArt Cancro <ajc@citadel.org>
Tue, 30 Nov 2010 06:52:24 +0000 (01:52 -0500)
webcit/static/styles/modal.css
webcit/static/t/confirmlogoff.html [new file with mode: 0644]
webcit/static/t/head.html
webcit/static/t/iconbar.html
webcit/static/wclib.js

index 5d05b4a60ef3ca50646d1a0c7eb2511475c6960f..c3331bebdeb5606813b07ba97d5b8b53c493b8a5 100644 (file)
@@ -70,5 +70,5 @@
 
 .md-dialog {
        background:white;
 
 .md-dialog {
        background:white;
-       border:2px solid #080;
+       border:2px solid #800;
 }
 }
diff --git a/webcit/static/t/confirmlogoff.html b/webcit/static/t/confirmlogoff.html
new file mode 100644 (file)
index 0000000..cc8cc12
--- /dev/null
@@ -0,0 +1,8 @@
+<html>
+<body>
+<center>
+<h1><a href="termquit"><img src="static/logoff_32x.gif" border="0">&nbsp;<?_("Log off")></a></h1>
+<h1><a href="javascript:toggleModal();"><img src="static/closewindow.gif" border="0">&nbsp;<?_("Cancel")></a></h1>
+</center>
+</body>
+</html>
index 3f3055a11124eaa6f208ee269963826b5d25624d..1e98bf7bb8e882b181e702bc5a616eae370676dd 100644 (file)
@@ -38,7 +38,7 @@
                        <div class="md-dialog-decorator"></div>
                        <div class="md-dialog-wrap">
                                <div class="md-dialog" id="dialog">
                        <div class="md-dialog-decorator"></div>
                        <div class="md-dialog-wrap">
                                <div class="md-dialog" id="dialog">
-                                       <div class="md-content">
+                                       <div class="md-content" id="md-content">
 
 This is the modal dialog box.  If you are seeing this message, the
 modal dialog was invoked without first populating its contents, which
 
 This is the modal dialog box.  If you are seeing this message, the
 modal dialog was invoked without first populating its contents, which
index 65d7d3a9d3d991fe1871ffca8448f3ba19e0dec2..ab386f7c06fbc1139b4927f1cf83b85f63a7ccd4 100644 (file)
@@ -71,7 +71,7 @@
 </ul>
 </div>
 <div id="ib_logoff" class="ib_button">
 </ul>
 </div>
 <div id="ib_logoff" class="ib_button">
-<a class="ib_button_link" href="termquit" onclick="return confirm('<?_("Log off now?")>');" title="<?_("Log off")>"><span><?_("Log off")></span></a>
+<a class="ib_button_link" href="javascript:ConfirmLogoff()" title="<?_("Log off")>"><span><?_("Log off")></span></a>
 </div>
 <div id="customize" class="iconbar_text">
   <span><a href="do_template?template=iconbar_edit"><?_("customize this menu")></a></span>
 </div>
 <div id="customize" class="iconbar_text">
   <span><a href="do_template?template=iconbar_edit"><?_("customize this menu")></a></span>
index 938ed03fee086e448b87cb982fb4b59d1688e3c9..597fdd1bd0e33d80f54bb7e6c5e8fc4f85dffb19 100644 (file)
@@ -861,3 +861,17 @@ function DeleteSMTPqueueMsg(msgnum1, msgnum2) {
                }
        );
 }
                }
        );
 }
+
+
+function ConfirmLogoff() {
+       new Ajax.Updater(
+               'md-content',
+               'do_template?template=confirmlogoff',
+                {
+                        method: 'get',
+                       onSuccess: function(cl_success) {
+                               toggleModal();
+                       }
+                }
+        );
+}