From cdaeec59429383f86cd2a0e352382999da07b58c Mon Sep 17 00:00:00 2001 From: Simon Redfern Date: Thu, 16 Jul 2015 01:31:04 +0200 Subject: [PATCH] start-login id -> class so we can have more than one login link on a page --- src/main/scala/code/snippet/Login.scala | 4 ++-- src/main/webapp/404.html | 17 +++++++++++++---- src/main/webapp/media/css/website.css | 4 ++-- src/main/webapp/templates-hidden/default.html | 2 +- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/main/scala/code/snippet/Login.scala b/src/main/scala/code/snippet/Login.scala index 7b88ddba..8f32c145 100644 --- a/src/main/scala/code/snippet/Login.scala +++ b/src/main/scala/code/snippet/Login.scala @@ -41,8 +41,8 @@ import net.liftweb.http.js.JsCmds.Noop class Login { + // TODO show currenctly loggedin user / name private def loggedIn = { - ".logged-out *" #> "" & ".logout [onclick+]" #> SHtml.onEvent(s => { OAuthClient.logoutAll() @@ -52,7 +52,7 @@ class Login { def loggedOut = { ".logged-in *" #> "" & - "#start-login [onclick]" #> { + ".start-login [onclick]" #> { def actionJS: JsCmd = { OAuthClient.redirectToOauthLogin() Noop diff --git a/src/main/webapp/404.html b/src/main/webapp/404.html index 028b02c7..3befc5fd 100644 --- a/src/main/webapp/404.html +++ b/src/main/webapp/404.html @@ -34,12 +34,21 @@ Berlin 13359, Germany Sorry, we couldn't find the page you were looking for.

- Maybe this is because you don't have the right permissions - - (you are not logged in). - + Maybe this is because you don't have the right permissions.

+ +
+
+ You might like to +
+
+
+ Please double check the URL or logout and login as a different user. +
+
+
+ diff --git a/src/main/webapp/media/css/website.css b/src/main/webapp/media/css/website.css index 1fa4d00b..3a9bd3b6 100644 --- a/src/main/webapp/media/css/website.css +++ b/src/main/webapp/media/css/website.css @@ -10,7 +10,7 @@ h1 { margin-bottom: 10px; } -#start-login, +.start-login, .logout, a { color: #1C8B77; @@ -21,7 +21,7 @@ a:hover { color: #156759; } -#start-login:hover, +.start-login:hover, .logout:hover { color: #156759; text-decoration: underline; diff --git a/src/main/webapp/templates-hidden/default.html b/src/main/webapp/templates-hidden/default.html index 801d1fbb..a09b72c7 100755 --- a/src/main/webapp/templates-hidden/default.html +++ b/src/main/webapp/templates-hidden/default.html @@ -57,7 +57,7 @@ Berlin 13359, Germany
- Login +