clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject svn commit: r1133864 - in /incubator/clerezza/trunk/parent: platform.security.auth.cookie/ platform.security.auth.cookie/src/main/java/org/apache/clerezza/platform/security/auth/cookie/ platform.security.auth.cookie/src/main/resources/CLEREZZA-INF/ pla...
Date Thu, 09 Jun 2011 13:26:23 GMT
Author: hasan
Date: Thu Jun  9 13:26:23 2011
New Revision: 1133864

URL: http://svn.apache.org/viewvc?rev=1133864&view=rev
Log:
CLEREZZA-559: moved minimum style resources from web.resources.style to auth.cookie

Added:
    incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/CLEREZZA-INF/
    incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/CLEREZZA-INF/web-resources/
    incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/CLEREZZA-INF/web-resources/login-resources/
    incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/CLEREZZA-INF/web-resources/login-resources/scripts/
    incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/CLEREZZA-INF/web-resources/login-resources/scripts/login.js
    incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/CLEREZZA-INF/web-resources/login-resources/style/
    incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/CLEREZZA-INF/web-resources/login-resources/style/login.css
Removed:
    incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/org/apache/clerezza/platform/security/auth/cookie/staticweb/scripts/login.js
    incubator/clerezza/trunk/parent/web.resources.style/src/main/resources/CLEREZZA-INF/web-resources/style/login.css
Modified:
    incubator/clerezza/trunk/parent/platform.security.auth.cookie/pom.xml
    incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/java/org/apache/clerezza/platform/security/auth/cookie/CookieLogin.java
    incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/org/apache/clerezza/platform/security/auth/cookie/login.xhtml
    incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/org/apache/clerezza/platform/security/auth/cookie/login_naked.xhtml

Modified: incubator/clerezza/trunk/parent/platform.security.auth.cookie/pom.xml
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.security.auth.cookie/pom.xml?rev=1133864&r1=1133863&r2=1133864&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/platform.security.auth.cookie/pom.xml (original)
+++ incubator/clerezza/trunk/parent/platform.security.auth.cookie/pom.xml Thu Jun  9 13:26:23
2011
@@ -39,10 +39,6 @@
 			<groupId>org.apache.clerezza</groupId>
 			<artifactId>jaxrs.utils</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>org.apache.clerezza</groupId>
-			<artifactId>web.fileserver</artifactId>
-		</dependency>
 	 <dependency>
 	  <groupId>javax.servlet</groupId>
 	  <artifactId>servlet-api</artifactId>

Modified: incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/java/org/apache/clerezza/platform/security/auth/cookie/CookieLogin.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/java/org/apache/clerezza/platform/security/auth/cookie/CookieLogin.java?rev=1133864&r1=1133863&r2=1133864&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/java/org/apache/clerezza/platform/security/auth/cookie/CookieLogin.java
(original)
+++ incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/java/org/apache/clerezza/platform/security/auth/cookie/CookieLogin.java
Thu Jun  9 13:26:23 2011
@@ -35,7 +35,6 @@ import javax.ws.rs.FormParam;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.HttpHeaders;
@@ -64,8 +63,6 @@ import org.apache.clerezza.rdf.core.impl
 import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
-import org.apache.clerezza.web.fileserver.BundlePathNode;
-import org.apache.clerezza.web.fileserver.FileServer;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Reference;
@@ -74,7 +71,7 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Service;
 import org.osgi.framework.Bundle;
 import org.wymiwyg.commons.util.Base64;
-import org.wymiwyg.commons.util.dirbrowser.PathNode;
+
 
 /**
  *
@@ -87,7 +84,7 @@ import org.wymiwyg.commons.util.dirbrows
 		policy=ReferencePolicy.DYNAMIC,
 		referenceInterface=LoginListener.class)
 @Property(name = "javax.ws.rs", boolValue = true)
-@Path("/login")
+@Path("login/")
 public class CookieLogin {
 
 	/**
@@ -95,7 +92,6 @@ public class CookieLogin {
 	 */
 	public static final String AUTH_COOKIE_NAME = "auth";
 	private final Logger logger = LoggerFactory.getLogger(CookieLogin.class);
-	private FileServer fileServer;
 	private final Set<LoginListener> loginListenerSet = Collections.synchronizedSet(new
HashSet<LoginListener>());
 
 	@Reference
@@ -113,8 +109,7 @@ public class CookieLogin {
 
 		Bundle bundle = componentContext.getBundleContext().getBundle();
 		URL resourceDir = getClass().getResource("staticweb");
-		PathNode pathNode = new BundlePathNode(bundle, resourceDir.getPath());
-		fileServer = new FileServer(pathNode);
+
 
 
 		URL templateURL = getClass().getResource("login.xhtml");
@@ -237,12 +232,6 @@ public class CookieLogin {
 		return cookie;
 	}
 
-	@GET
-	@Path("{path:.+}")
-	public PathNode getStaticFile(@PathParam("path") String path) {
-		return fileServer.getNode(path);
-	}
-
 	/**
 	 * Registers a <code>LoginListener</code>
 	 *

Added: incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/CLEREZZA-INF/web-resources/login-resources/scripts/login.js
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/CLEREZZA-INF/web-resources/login-resources/scripts/login.js?rev=1133864&view=auto
==============================================================================
--- incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/CLEREZZA-INF/web-resources/login-resources/scripts/login.js
(added)
+++ incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/CLEREZZA-INF/web-resources/login-resources/scripts/login.js
Thu Jun  9 13:26:23 2011
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+$(document).ready(function() {
+
+	$("#submitButton").hide();
+	$("<a/>").addClass("tx-button tx-button-generic").attr("href", "#")
+		.text("Log in").insertBefore("#submitButton");
+
+	$(".tx-button-generic").click(function(){
+		$("#login-form").submit();
+	});
+
+	$("input[name*='user']").focus();
+	
+});
\ No newline at end of file

Added: incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/CLEREZZA-INF/web-resources/login-resources/style/login.css
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/CLEREZZA-INF/web-resources/login-resources/style/login.css?rev=1133864&view=auto
==============================================================================
--- incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/CLEREZZA-INF/web-resources/login-resources/style/login.css
(added)
+++ incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/CLEREZZA-INF/web-resources/login-resources/style/login.css
Thu Jun  9 13:26:23 2011
@@ -0,0 +1,94 @@
+body {
+	background-color: #eeeeee;
+	background-image: url(/style/images/bg/fade-login.png);
+	background-repeat: repeat-x;
+	background-position: center top;		
+}
+
+
+#tx-login-mask ol {
+	margin: 0;
+	padding: 0;
+	list-style: none;
+}		
+
+#tx-login-mask ol li {
+	margin: 0;
+	padding: 0;
+	list-style: none;
+	height: 2em;
+}	
+
+#tx-login-mask ol li:last-child {
+	padding-top: 0.8em;
+}		
+
+
+#tx-login-mask label {
+	width: 8em;
+	float: left;
+	color: #666666;
+}
+
+#tx-login-mask label.tx-checkbox {
+	width: 9em;
+	float: left;
+}
+
+#tx-login-mask  input[type="checkbox"] {
+	margin-left: 8em;
+	float: left;
+}
+
+#tx-login-mask input[type="text"], #tx-login-mask input[type="password"] {
+	width: 20em;
+}
+
+#tx-login-mask .tx-button {
+	width: 5em;
+	float: right;
+}
+
+#tx-login-mask {
+	top: 30%;
+	position: absolute;
+	width: 99%;
+}
+
+#tx-login-mask > div {
+	margin: 0 auto;
+	width: 29.7em;
+}	
+
+#tx-login-mask > div > div {
+	text-align: center; 
+	margin: 1em;
+}	
+
+#tx-login-mask fieldset {
+	padding: 0.5em;
+	margin: 0.5em 0;
+}
+
+#tx-login-mask .tx-info .tx-icon {
+	vertical-align: middle;
+	float: none;
+	display: inline-block;
+}
+
+.tx-error {
+	color: #cc3333;
+	font-weight: bold;
+	margin: 0.3em;
+}	
+
+.tx-info {
+	color: #c59e00;
+	font-weight: bold;
+	margin: 0.3em;
+}	
+
+.tx-line {
+	border-bottom: 1px solid #E4E4E4;
+	border-top: none;
+}
\ No newline at end of file

Modified: incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/org/apache/clerezza/platform/security/auth/cookie/login.xhtml
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/org/apache/clerezza/platform/security/auth/cookie/login.xhtml?rev=1133864&r1=1133863&r2=1133864&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/org/apache/clerezza/platform/security/auth/cookie/login.xhtml
(original)
+++ incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/org/apache/clerezza/platform/security/auth/cookie/login.xhtml
Thu Jun  9 13:26:23 2011
@@ -5,7 +5,7 @@ def login(s: Any) = new UriRef("http://c
 <title>Login Page</title>
 
 	<link href="/style/style.css" media="screen" rel="stylesheet" type="text/css" />
-	<link href="/style/login.css" media="screen" rel="stylesheet" type="text/css" />
+	<link href="/login-resources/style/login.css" media="screen" rel="stylesheet" type="text/css"
/>
 
 </head>
 
@@ -23,7 +23,7 @@ def login(s: Any) = new UriRef("http://c
 <div id="tx-login-mask">
 	<div>
 		<div>
-			<div id="tx-logo"></div>
+			<div id="login-logo"><img src="/style/images/logo-big.png"/></div>
 			<div class="tx-info"></div>
 			{ifx((res/login("message")).length > 0) {
 				<div class="tx-error">{res/login("message")*}</div>

Modified: incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/org/apache/clerezza/platform/security/auth/cookie/login_naked.xhtml
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/org/apache/clerezza/platform/security/auth/cookie/login_naked.xhtml?rev=1133864&r1=1133863&r2=1133864&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/org/apache/clerezza/platform/security/auth/cookie/login_naked.xhtml
(original)
+++ incubator/clerezza/trunk/parent/platform.security.auth.cookie/src/main/resources/org/apache/clerezza/platform/security/auth/cookie/login_naked.xhtml
Thu Jun  9 13:26:23 2011
@@ -2,7 +2,7 @@ def login(s: Any) = new UriRef("http://c
 
 
 resultDocModifier.addScriptReference("/jquery/jquery-1.3.2.min.js");
-resultDocModifier.addScriptReference("/login/scripts/login.js");
+resultDocModifier.addScriptReference("/login-resources/scripts/login.js");
 
 <form action="/login" method="post" id="login-form">
 	<fieldset class="tx-line">



Mime
View raw message