From 66b37caa8621e2e78c61b44acef3653fdfdc1192 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sun, 31 Mar 2013 13:52:02 +0200 Subject: [PATCH] Rework Login dialog to work with rekonq (and hopefully Safari) - modal.js: don't use a function pointer - simply name the function as the pointer. - head.html: if we're not logged in, we add the login dialog to the page; its hidden anyways. - login.html: since we get printed into existing pages, we don't need - its wrong in first place to have them. - authmethods.js: GetLoggedInFirst(): we don't need to send an ajax request to retrieve the login mask; if its needed, head.html already contains it. Simply uncover it to the user. --- webcit/static/authmethods.js | 11 +---------- webcit/static/modal.js | 2 +- webcit/static/t/get_logged_in.html | 6 +----- webcit/static/t/head.html | 1 + webcit/static/t/login.html | 2 ++ 5 files changed, 6 insertions(+), 16 deletions(-) diff --git a/webcit/static/authmethods.js b/webcit/static/authmethods.js index a80543fdb..fe7da239e 100644 --- a/webcit/static/authmethods.js +++ b/webcit/static/authmethods.js @@ -38,16 +38,7 @@ function GetLoggedInFirst(destination_url) { new Ajax.Request(p, { method: 'get' } ); /* If not logged in, go modal and ask the user to log in first. */ - new Ajax.Updater( - 'md-content', - 'do_template?template=get_logged_in', - { - method: 'get', - onSuccess: function() { - toggleModal(1); - } - } - ); + toggleModal(1); } diff --git a/webcit/static/modal.js b/webcit/static/modal.js index bd5de7960..5b631b14b 100644 --- a/webcit/static/modal.js +++ b/webcit/static/modal.js @@ -69,7 +69,7 @@ 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; diff --git a/webcit/static/t/get_logged_in.html b/webcit/static/t/get_logged_in.html index 27b75a773..e7284c76b 100644 --- a/webcit/static/t/get_logged_in.html +++ b/webcit/static/t/get_logged_in.html @@ -1,12 +1,10 @@ - -
-  + <?_("Close window")>


@@ -117,5 +115,3 @@ - - diff --git a/webcit/static/t/head.html b/webcit/static/t/head.html index e342a7597..20c82f72d 100644 --- a/webcit/static/t/head.html +++ b/webcit/static/t/head.html @@ -41,6 +41,7 @@
+
diff --git a/webcit/static/t/login.html b/webcit/static/t/login.html index 96beced84..5be82d88d 100644 --- a/webcit/static/t/login.html +++ b/webcit/static/t/login.html @@ -1,4 +1,6 @@ + +
-- 2.30.2