Scmwebeditor-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- 439 discussions
r179 - in trunk/src/main: java/org/nuiton/scmwebeditor java/org/nuiton/scmwebeditor/actions webapp/WEB-INF/content
by kcardineaud@users.nuiton.org 20 Jul '11
by kcardineaud@users.nuiton.org 20 Jul '11
20 Jul '11
Author: kcardineaud
Date: 2011-07-20 10:53:51 +0200 (Wed, 20 Jul 2011)
New Revision: 179
Url: http://nuiton.org/repositories/revision/scmwebeditor/179
Log:
Modify some log
Modified:
trunk/src/main/java/org/nuiton/scmwebeditor/ScmWebEditorBaseAction.java
trunk/src/main/java/org/nuiton/scmwebeditor/actions/PreviewAction.java
trunk/src/main/java/org/nuiton/scmwebeditor/actions/ResetAction.java
trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorCommitAction.java
trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorMainAction.java
trunk/src/main/java/org/nuiton/scmwebeditor/actions/SearchAction.java
trunk/src/main/java/org/nuiton/scmwebeditor/actions/UploadAction.java
trunk/src/main/webapp/WEB-INF/content/badFileRedirect.jsp
Modified: trunk/src/main/java/org/nuiton/scmwebeditor/ScmWebEditorBaseAction.java
===================================================================
--- trunk/src/main/java/org/nuiton/scmwebeditor/ScmWebEditorBaseAction.java 2011-07-19 16:05:25 UTC (rev 178)
+++ trunk/src/main/java/org/nuiton/scmwebeditor/ScmWebEditorBaseAction.java 2011-07-20 08:53:51 UTC (rev 179)
@@ -244,7 +244,9 @@
AutoDetectParser parser = new AutoDetectParser();
parser.parse(is, contenthandler, metadata);
String result = metadata.get(Metadata.CONTENT_TYPE);
- log.info("Mine type of " + file.getName() + " is : " + result);
+ if(log.isDebugEnabled()) {
+ log.debug("Mine type of " + file.getName() + " is : " + result);
+ }
return result;
}
finally {
@@ -261,7 +263,10 @@
AutoDetectParser parser = new AutoDetectParser();
parser.parse(is, contenthandler, metadata);
String result = metadata.get(Metadata.CONTENT_TYPE);
- log.info("Mine type of " + filename + " is : " + result);
+ if(log.isDebugEnabled()) {
+ log.debug("Mine type of " + filename + " is : " + result);
+ }
+
return result;
}
finally {
Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/PreviewAction.java
===================================================================
--- trunk/src/main/java/org/nuiton/scmwebeditor/actions/PreviewAction.java 2011-07-19 16:05:25 UTC (rev 178)
+++ trunk/src/main/java/org/nuiton/scmwebeditor/actions/PreviewAction.java 2011-07-20 08:53:51 UTC (rev 179)
@@ -60,7 +60,7 @@
log.debug(newText);
}
XMLResponse="";
- //Using jrst for generate html document
+ //Using jrst to generate html document
try {
XMLResponse = JRST.generate(JRST.TYPE_HTML, newText);
if(log.isDebugEnabled()) {
@@ -71,7 +71,7 @@
if(log.isWarnEnabled()) {
log.warn("RST generate fail",eee);
}
- XMLResponse = "<h4>Parsing érror, please read RST specification<h4>";
+ XMLResponse = "<h4>Parsing error, please read RST specification<h4>";
return;
}
Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/ResetAction.java
===================================================================
--- trunk/src/main/java/org/nuiton/scmwebeditor/actions/ResetAction.java 2011-07-19 16:05:25 UTC (rev 178)
+++ trunk/src/main/java/org/nuiton/scmwebeditor/actions/ResetAction.java 2011-07-20 08:53:51 UTC (rev 179)
@@ -50,6 +50,7 @@
String url = svnSess.getSvnPath();
String file = svnSess.getFileName();
+ //Si le login ou le mot de passe ne sont pas renseignes, on tente de se connecter en anonyme
if(login==null && pw==null) {
login = "anonymous";
pw = "anonymous";
Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorCommitAction.java
===================================================================
--- trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorCommitAction.java 2011-07-19 16:05:25 UTC (rev 178)
+++ trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorCommitAction.java 2011-07-20 08:53:51 UTC (rev 179)
@@ -111,6 +111,7 @@
svnSess.getPassword() != null && !svnSess.getPassword().equalsIgnoreCase("") ? svnSess.getPassword() : pw);
+ // Avant le commit, il faut checkout le repertoire
try {
checkout(svnSess);
} catch (SVNAuthenticationException authexep) {
@@ -126,7 +127,7 @@
return Action.LOGIN;
} catch (SVNException e) {
- //Suppression du repertoire temporaire
+ //Suppression du repertoire temporaire
delTempDirectory(svnSess);
return "errorPath";
}
@@ -188,7 +189,7 @@
File[] tabFile = new File[1];
tabFile[0] = pathToFile;
-// Sending Data to SVN
+
try {
Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorMainAction.java
===================================================================
--- trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorMainAction.java 2011-07-19 16:05:25 UTC (rev 178)
+++ trunk/src/main/java/org/nuiton/scmwebeditor/actions/ScmWebEditorMainAction.java 2011-07-20 08:53:51 UTC (rev 179)
@@ -103,9 +103,7 @@
if(log.isDebugEnabled()) {
- log.debug("--------------------------\n" +
- "Connection to SCMWebEditor\n" +
- "--------------------------");
+ log.debug("Connection to SCMWebEditor\n");
}
@@ -117,15 +115,16 @@
return "noParameter";
}
- if(log.isInfoEnabled()) {
- log.info("ProjectUrl= "+request.getHeader("referer"));
+ if(log.isDebugEnabled()) {
+ log.debug("ProjectUrl= "+request.getHeader("referer"));
}
+
projectUrl=request.getHeader("referer");
HttpSession httpSession = request.getSession(true);
if(log.isInfoEnabled()) {
- log.info("IP client : "+request.getRemoteAddr());
+ log.info("IP client : "+request.getRemoteAddr() + " , get file : "+address);
}
//SvnSession object creation if doesn't already exist
Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/SearchAction.java
===================================================================
--- trunk/src/main/java/org/nuiton/scmwebeditor/actions/SearchAction.java 2011-07-19 16:05:25 UTC (rev 178)
+++ trunk/src/main/java/org/nuiton/scmwebeditor/actions/SearchAction.java 2011-07-20 08:53:51 UTC (rev 179)
@@ -123,8 +123,8 @@
public String search() {
- if(log.isInfoEnabled()) {
- log.info("Enter in search action");
+ if(log.isDebugEnabled()) {
+ log.debug("Enter in search action");
}
@@ -162,8 +162,9 @@
if(id.equals("")) {
try {
- log.info("Address svn : "+address);
-
+ if(log.isDebugEnabled()) {
+ log.debug("Address svn : "+address);
+ }
repository = SVNRepositoryFactory.create( SVNURL.parseURIDecoded( address ) );
authManager = SVNWCUtil.createDefaultAuthenticationManager( name , password );
@@ -200,21 +201,21 @@
authManager = SVNWCUtil.createDefaultAuthenticationManager( name , password );
repository.setAuthenticationManager( authManager );
- if(log.isInfoEnabled()) {
- log.info( "Repository Root: " + repository.getRepositoryRoot( true ) );
- log.info( "Repository UUID: " + repository.getRepositoryUUID( true ) );
+ if(log.isDebugEnabled()) {
+ log.debug( "Repository Root: " + repository.getRepositoryRoot( true ) );
+ log.debug( "Repository UUID: " + repository.getRepositoryUUID( true ) );
}
SVNNodeKind nodeKind = repository.checkPath( "" , -1 );
if ( nodeKind == SVNNodeKind.NONE ) {
- if(log.isErrorEnabled()) {
- log.error( "There is no entry at '" + url + "'." );
+ if(log.isWarnEnabled()) {
+ log.warn( "There is no entry at '" + url + "'." );
}
error="There is no entry at '" + url + "'.";
return Action.SUCCESS;
} else if ( nodeKind == SVNNodeKind.FILE ) {
- if(log.isInfoEnabled()) {
- log.info( "The entry at '" + url + "' is a file." );
+ if(log.isDebugEnabled()) {
+ log.debug( "The entry at '" + url + "' is a file." );
}
TreeNode node = new TreeNode();
node.setId(url);
@@ -226,8 +227,8 @@
}
numberOfFile=0;
listEntries( repository , "" );
- if(log.isInfoEnabled()) {
- log.info("Nombre de fichier : "+files.size());
+ if(log.isDebugEnabled()) {
+ log.debug("Number of file : "+files.size());
}
@@ -272,7 +273,10 @@
error="Can't access to the repository";
}
- log.info("Search success");
+ if(log.isDebugEnabled()) {
+ log.debug("Search success");
+ }
+
return Action.SUCCESS;
}
@@ -282,7 +286,9 @@
try {
entries = repository.getDir( path, -1 , null , (Collection<?>) null );
} catch (SVNException e) {
- log.error("Can not reach the repository",e);
+ if(log.isErrorEnabled()) {
+ log.error("Can not reach the repository",e);
+ }
}
Iterator<?> iterator = entries.iterator();
@@ -328,7 +334,9 @@
public String getAddressUnique(String leFichier) {
String result = leFichier.replaceAll("/|:", "");
- log.info("Result of getAddressUnique : "+result);
+ if(log.isDebugEnabled()) {
+ log.debug("Result of getAddressUnique : "+result);
+ }
return result;
}
Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/UploadAction.java
===================================================================
--- trunk/src/main/java/org/nuiton/scmwebeditor/actions/UploadAction.java 2011-07-19 16:05:25 UTC (rev 178)
+++ trunk/src/main/java/org/nuiton/scmwebeditor/actions/UploadAction.java 2011-07-20 08:53:51 UTC (rev 179)
@@ -95,9 +95,9 @@
badLogin=false;
error=false;
- if(log.isInfoEnabled()) {
- log.info("PictureName : "+uploadFileName);
- log.info("ContentType : "+uploadContentType);
+ if(log.isDebugEnabled()) {
+ log.debug("PictureName : "+uploadFileName);
+ log.debug("ContentType : "+uploadContentType);
}
@@ -163,7 +163,9 @@
FileUtils.copyFile(upload, file);
} catch (IOException e) {
error=true;
- log.error("Can't copy the file to the checkout directory",e);
+ if(log.isErrorEnabled()) {
+ log.error("Can't copy the file to the checkout directory",e);
+ }
return ERROR;
}
@@ -190,7 +192,9 @@
}
catch (SVNException e) {
- log.error("Erreur SVN Add",e);
+ if(log.isErrorEnabled()){
+ log.error("Erreur SVN Add",e);
+ }
error=true;
//Suppression du repertoire temporaire
delTempDirectory(svnSess);
@@ -210,14 +214,18 @@
}
} catch (SVNAuthenticationException authexep) {
- log.error("authentification fail");
+ if(log.isErrorEnabled()) {
+ log.error("authentification fail");
+ }
badLogin=true;
//Suppression du repertoire temporaire
delTempDirectory(svnSess);
return Action.LOGIN;
}
catch (SVNException e) {
- log.error("Erreur SVN commit",e);
+ if(log.isErrorEnabled()) {
+ log.error("Erreur SVN commit",e);
+ }
error=true;
//Suppression du repertoire temporaire
delTempDirectory(svnSess);
@@ -228,8 +236,8 @@
//Suppression du repertoire temporaire
delTempDirectory(svnSess);
- if(log.isInfoEnabled()) {
- log.info("File upload successful");
+ if(log.isDebugEnabled()) {
+ log.debug("File upload successful");
}
return SUCCESS;
Modified: trunk/src/main/webapp/WEB-INF/content/badFileRedirect.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/badFileRedirect.jsp 2011-07-19 16:05:25 UTC (rev 178)
+++ trunk/src/main/webapp/WEB-INF/content/badFileRedirect.jsp 2011-07-20 08:53:51 UTC (rev 179)
@@ -16,7 +16,7 @@
<body>
<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
<p><s:text name="badPathOrFileName" /></p>
-<p><s:text name="scm.formTransferred" /> You should be transferred automatically to the form page. If notplease <a href="<%=request.getAttribute("projectUrl")%>">
+<p><s:text name="scm.formTransferred" /> <a href="<%=request.getAttribute("projectUrl")%>">
<s:text name="scm.clickHere" /></a>.</p>
<p>©2004-2009 CodeLutin</p>
</body>
1
0
r178 - in trunk/src/main: resources/i18n webapp/WEB-INF/content
by kcardineaud@users.nuiton.org 19 Jul '11
by kcardineaud@users.nuiton.org 19 Jul '11
19 Jul '11
Author: kcardineaud
Date: 2011-07-19 18:05:25 +0200 (Tue, 19 Jul 2011)
New Revision: 178
Url: http://nuiton.org/repositories/revision/scmwebeditor/178
Log:
Add some i18n properties
Removed:
trunk/src/main/webapp/WEB-INF/content/accueil.jsp
Modified:
trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties
trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties
trunk/src/main/webapp/WEB-INF/content/badFileRedirect.jsp
trunk/src/main/webapp/WEB-INF/content/error.jsp
trunk/src/main/webapp/WEB-INF/content/preview.jsp
trunk/src/main/webapp/WEB-INF/content/recall.jsp
trunk/src/main/webapp/WEB-INF/content/redirect.jsp
Modified: trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties
===================================================================
--- trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties 2011-07-19 15:16:35 UTC (rev 177)
+++ trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties 2011-07-19 16:05:25 UTC (rev 178)
@@ -36,4 +36,10 @@
scm.uploadSuccess=File upload successful
scm.mustBeLog=You must be login to see this repository.
scm.loginButton=Login
-scm.privateScmAccess=You try to access a Private SCM. Please login
\ No newline at end of file
+scm.privateScmAccess=You try to access a Private SCM. Please login
+scm.thankUsing=Thank you using SCMWebEditor
+scm.beTransferred=You should be transferred automatically to the new page. If not please
+scm.clickHere=click here
+scm.redirection=Redirection...
+badPathOrFileName=Bad repository path or file name! Please correct it.
+scm.formTransferred=You should be transferred automatically to the form page. If not please
\ No newline at end of file
Modified: trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties
===================================================================
--- trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties 2011-07-19 15:16:35 UTC (rev 177)
+++ trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties 2011-07-19 16:05:25 UTC (rev 178)
@@ -1,11 +1,15 @@
+badPathOrFileName=L''adresse du depot ou le nom du fichier est incorrect \!
scm.FileInEditor=Fichier dans l''editeur \:
scm.badUsernameOrPassword=Identifiant ou mot de passe incorrect
+scm.beTransferred=Vous devrais être redirige sur une nouvelle page. si non
+scm.clickHere=cliquez ici
scm.commitMessage=Message associe au commit
scm.commitMessageTitle=laisser un message pour le commit
scm.erreurRepo=Erreur sur le depot
scm.exit=Quitter
scm.exitJavascript=Quitter ScmWebEditor sans sauvegarder ? Toutes les modifications serons perdues.
scm.exitTitle=Quitter ScmWebEditor sans sauvegarder.
+scm.formTransferred=Vous devrais être redirige vers la page du formulaire. si non
scm.info.ProblemWithRst=Si vous rencontrez des problemes avec RestruturedText, visitez le
scm.info.rstWebsite=site de la documentation RST
scm.language=Langage
@@ -22,6 +26,7 @@
scm.passwordTitle=Mot de passe du depot
scm.preview=Apercu
scm.privateScmAccess=Pour modifier ce fichier, veuillez vous connecter.
+scm.redirection=Redirection...
scm.reset=Reinitialiser
scm.resetTitle=Retour a la derniere revision du fichier
scm.saveAndContinue=Sauvegarder et continuer
@@ -29,6 +34,7 @@
scm.saveAndQuit=Sauvegarder et quitter
scm.saveAndQuitTitle=Sauvegarder le fichier sur le depot et retourner à la page precedente.
scm.text=Texte
+scm.thankUsing=merci d'avoir utilise SCMWebEditor
scm.upload=Ajouter un fichier
scm.uploadFile=Url du fichier
scm.uploadPath=Repertoire sur le depot
Deleted: trunk/src/main/webapp/WEB-INF/content/accueil.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/accueil.jsp 2011-07-19 15:16:35 UTC (rev 177)
+++ trunk/src/main/webapp/WEB-INF/content/accueil.jsp 2011-07-19 16:05:25 UTC (rev 178)
@@ -1,3 +0,0 @@
-<%@ page contentType="text/html; charset=UTF-8" %>
-
- <p>Parametres detectés</p>
Modified: trunk/src/main/webapp/WEB-INF/content/badFileRedirect.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/badFileRedirect.jsp 2011-07-19 15:16:35 UTC (rev 177)
+++ trunk/src/main/webapp/WEB-INF/content/badFileRedirect.jsp 2011-07-19 16:05:25 UTC (rev 178)
@@ -1,6 +1,7 @@
<%-- Document : BadFileRedirect Created on : 6 oct. 2009, 15:33:56
Author : glorieux --%> <%@page contentType="text/html"
pageEncoding="UTF-8"%>
+<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
@@ -14,10 +15,9 @@
</head>
<body>
<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
-<p>Bad SCM path or file name! Please correct it.</p>
-<p>You should be transferred automatically to the form page. If not
-please <a href="<%=request.getAttribute("projectUrl")%>">click
-this link</a>.</p>
+<p><s:text name="badPathOrFileName" /></p>
+<p><s:text name="scm.formTransferred" /> You should be transferred automatically to the form page. If notplease <a href="<%=request.getAttribute("projectUrl")%>">
+<s:text name="scm.clickHere" /></a>.</p>
<p>©2004-2009 CodeLutin</p>
</body>
</html>
Modified: trunk/src/main/webapp/WEB-INF/content/error.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/error.jsp 2011-07-19 15:16:35 UTC (rev 177)
+++ trunk/src/main/webapp/WEB-INF/content/error.jsp 2011-07-19 16:05:25 UTC (rev 178)
@@ -1,5 +1,6 @@
<%-- Document : Error Created on : 15 sept. 2009, 12:22:29 Author :
glorieux --%> <%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
@@ -16,7 +17,7 @@
</head>
<body>
<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
-<p>Bad Login or Password. Please Wait.</p>
+<p><s:text name="scm.badUsernameOrPassword"/></p>
<p>©2004-2009 CodeLutin</p>
</body>
</html>
Modified: trunk/src/main/webapp/WEB-INF/content/preview.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/preview.jsp 2011-07-19 15:16:35 UTC (rev 177)
+++ trunk/src/main/webapp/WEB-INF/content/preview.jsp 2011-07-19 16:05:25 UTC (rev 178)
@@ -1,7 +1,7 @@
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%--Title and div for rst preview--%>
- <h3 id="prevtitle" >Preview :</h3>
+ <h3 id="prevtitle" ><s:text name="scm.preview" /> :</h3>
<div id="prev" title="Preview">
<div id="preview" >
Modified: trunk/src/main/webapp/WEB-INF/content/recall.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/recall.jsp 2011-07-19 15:16:35 UTC (rev 177)
+++ trunk/src/main/webapp/WEB-INF/content/recall.jsp 2011-07-19 16:05:25 UTC (rev 178)
@@ -1,12 +1,13 @@
<%-- Document : Recall Created on : 30 sept. 2009, 17:05:40 Author :
glorieux --%> <%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Redirect...</title>
+<title><s:text name="scm.redirection" /></title>
<meta http-equiv="Refresh" content="0; url=
<%=request.getAttribute("Redirect_url")%>">
</head>
Modified: trunk/src/main/webapp/WEB-INF/content/redirect.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/redirect.jsp 2011-07-19 15:16:35 UTC (rev 177)
+++ trunk/src/main/webapp/WEB-INF/content/redirect.jsp 2011-07-19 16:05:25 UTC (rev 178)
@@ -1,12 +1,13 @@
<%-- Document : Redirect Created on : 10 sept. 2009, 13:43:11 Author :
glorieux --%> <%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Redirection...</title>
+<title><s:text name="scm.redirection" /></title>
<link rel="icon" href="img/ScmWebEditor_little.png" type="image/png">
<link rel="stylesheet" type="text/css" href="css/main.css">
<meta http-equiv="Refresh" content="2; url=
@@ -14,10 +15,8 @@
</head>
<body>
<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
-<p>Thank you using RSTEditor</p>
-<p>You should be transferred automatically to the new page. If not
-please <a href="<%=request.getAttribute("Redirection_url")%>">click
-this link</a>.</p>
+<p><s:text name="scm.thankUsing" /></p>
+<p><s:text name="scm.beTransferred" /> <a href="<%=request.getAttribute("Redirection_url")%>"><s:text name="scm.clickHere" /></a>.</p>
<p>©2004-2009 CodeLutin</p>
</body>
</html>
1
0
Author: kcardineaud
Date: 2011-07-19 17:16:35 +0200 (Tue, 19 Jul 2011)
New Revision: 177
Url: http://nuiton.org/repositories/revision/scmwebeditor/177
Log:
Add an icon for file in repository tree
Added:
trunk/src/main/webapp/img/file.png
Modified:
trunk/src/main/webapp/css/main.css
Modified: trunk/src/main/webapp/css/main.css
===================================================================
--- trunk/src/main/webapp/css/main.css 2011-07-19 14:18:47 UTC (rev 176)
+++ trunk/src/main/webapp/css/main.css 2011-07-19 15:16:35 UTC (rev 177)
@@ -10,6 +10,11 @@
display:inline;
}
+.ui-icon-document {
+ background-image:url("../img/file.png") !important;
+ background-position: 0 1px !important ;
+}
+
#form {
width:70%;
margin:auto;
Added: trunk/src/main/webapp/img/file.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/file.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
1
0
r176 - in trunk/src/main: i18n resources resources/i18n webapp/WEB-INF/content webapp/css
by kcardineaud@users.nuiton.org 19 Jul '11
by kcardineaud@users.nuiton.org 19 Jul '11
19 Jul '11
Author: kcardineaud
Date: 2011-07-19 16:18:47 +0200 (Tue, 19 Jul 2011)
New Revision: 176
Url: http://nuiton.org/repositories/revision/scmwebeditor/176
Log:
add i18n for login
Modified:
trunk/src/main/i18n/jsp.rules
trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties
trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties
trunk/src/main/resources/struts.properties
trunk/src/main/webapp/WEB-INF/content/loginSearch.jsp
trunk/src/main/webapp/WEB-INF/content/privateSvnRedirect.jsp
trunk/src/main/webapp/css/main.css
Modified: trunk/src/main/i18n/jsp.rules
===================================================================
--- trunk/src/main/i18n/jsp.rules 2011-07-19 13:21:29 UTC (rev 175)
+++ trunk/src/main/i18n/jsp.rules 2011-07-19 14:18:47 UTC (rev 176)
@@ -9,4 +9,6 @@
//s:file/@key
//s:label/@key
//s:optiontransferselect/@key
-//s:select/@key
\ No newline at end of file
+//s:select/@key
+//sj:head/@key
+//s:if/@key
\ No newline at end of file
Modified: trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties
===================================================================
--- trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties 2011-07-19 13:21:29 UTC (rev 175)
+++ trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties 2011-07-19 14:18:47 UTC (rev 176)
@@ -33,4 +33,7 @@
scm.uploadPath=Path on Repository
scm.badUsernameOrPassword=Bad username or password
scm.erreurRepo=Error on repository
-scm.uploadSuccess=File upload successful
\ No newline at end of file
+scm.uploadSuccess=File upload successful
+scm.mustBeLog=You must be login to see this repository.
+scm.loginButton=Login
+scm.privateScmAccess=You try to access a Private SCM. Please login
\ No newline at end of file
Modified: trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties
===================================================================
--- trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties 2011-07-19 13:21:29 UTC (rev 175)
+++ trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties 2011-07-19 14:18:47 UTC (rev 176)
@@ -9,16 +9,19 @@
scm.info.ProblemWithRst=Si vous rencontrez des problemes avec RestruturedText, visitez le
scm.info.rstWebsite=site de la documentation RST
scm.language=Langage
-scm.logAs=Connecte
+scm.logAs=Connecte en tant que
+scm.loginButton=Connection
scm.modificationViewer.betterUseJavascript=
scm.modificationViewer.noJavascript=Javascript est desactive. Vous pouvais seulement utiliser les boutons sauvegarder et quitter, quitter ou upload.
+scm.mustBeLog=Vous devez vous identifier pour parcourir ce depot.
scm.outConnection.enterRepo=Entrez l''adresse de votre depot.
scm.outConnection.noJavascript=Javascript n''est pas active. Certaines fonctions ne serons pas accessible.
scm.outConnection.scmPath=Repertoire SCM \:
scm.outConnection.search=Chercher
scm.password=Mot de passe
-scm.passwordTitle=Mot de pass du depot
+scm.passwordTitle=Mot de passe du depot
scm.preview=Apercu
+scm.privateScmAccess=Pour modifier ce fichier, veuillez vous connecter.
scm.reset=Reinitialiser
scm.resetTitle=Retour a la derniere revision du fichier
scm.saveAndContinue=Sauvegarder et continuer
Modified: trunk/src/main/resources/struts.properties
===================================================================
--- trunk/src/main/resources/struts.properties 2011-07-19 13:21:29 UTC (rev 175)
+++ trunk/src/main/resources/struts.properties 2011-07-19 14:18:47 UTC (rev 176)
@@ -20,7 +20,7 @@
struts.tag.altSyntax=true
-struts.devMode=true
+struts.devMode=false
struts.i18n.reload=true
Modified: trunk/src/main/webapp/WEB-INF/content/loginSearch.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/loginSearch.jsp 2011-07-19 13:21:29 UTC (rev 175)
+++ trunk/src/main/webapp/WEB-INF/content/loginSearch.jsp 2011-07-19 14:18:47 UTC (rev 176)
@@ -6,13 +6,16 @@
<sj:head jquerytheme="default"/>
<div id="search">
- <p>You must be login to see this repository.</p>
+ <p><s:text name="scm.mustBeLog"/></p>
<p>
- <label>Username : <input type="text" name="username"></input></label><br/>
- <label>Password : <input type ="password" name="pw"></input></label><br/>
+ <label><s:text name="scm.username"/> : <input type="text" name="username"></input></label><br/>
+ <label><s:text name="scm.password"/> : <input type ="password" name="pw"></input></label><br/>
<s:url id="ajaxSearchLogin" value="search.action" />
+ <s:set id="scm.loginButton">
+ <s:text name="scm.loginButton"/>
+ </s:set>
<sj:submit
id="ajaxSearchButtonLogin"
formIds="configForm"
@@ -21,7 +24,7 @@
indicator="indicator"
button="true"
buttonIcon="ui-icon-refresh"
- value="Login"
+ value="%{scm.loginButton}"
>
</sj:submit>
</p>
Modified: trunk/src/main/webapp/WEB-INF/content/privateSvnRedirect.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/privateSvnRedirect.jsp 2011-07-19 13:21:29 UTC (rev 175)
+++ trunk/src/main/webapp/WEB-INF/content/privateSvnRedirect.jsp 2011-07-19 14:18:47 UTC (rev 176)
@@ -1,6 +1,7 @@
<%-- Document : PrivateSvnRedirect Created on : 30 sept. 2009, 14:05:43
Author : glorieux --%> <%@page contentType="text/html"
pageEncoding="UTF-8"%>
+<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
@@ -17,13 +18,25 @@
<input type="hidden" name="address" value="<%=request.getAttribute("address")%>"/>
<input type="hidden" name="projectUrl" value="<%=request.getAttribute("projectUrl")%>"/>
<script src="cancelRedirect.js"></script>
-<p>You try to access a Private SCM. Please login</p>
-<p><label ACCESSKEY=U>User name: <input TYPE=text
- NAME=username SIZE=12></label> <label ACCESSKEY=P>Password: <input
+<p><s:text name="scm.privateScmAccess" /></p>
+<p><label ACCESSKEY=U><s:text name="scm.username" /> : <input TYPE=text
+ NAME=username SIZE=12></label>
+ <label ACCESSKEY=P><s:text name="scm.password" /> : <input
TYPE=password NAME=pw SIZE=12></label></p>
-<input type="submit" value="Submit" name="Save" /> <input type="button"
- value="Exit" name="Cancel"
- onclick="cancelRedirect(this.form.projectUrl);" /></form>
+
+
+<input type="submit" name="Save" />
+
+
+ <s:set id="scm.exit">
+ <s:text name="scm.exit"/>
+ </s:set>
+ <s:set id="scm.exitJavascript">
+ <s:text name="scm.exitJavascript"/>
+ </s:set>
+ <s:submit type="button" value="%{scm.exit}" name="exitLogin" onclick="return cancelRedirect('%{scm.exitJavascript}',this.form.ProjectUrl);"/>
+
+</form>
<p>©2004-2009 CodeLutin</p>
</body>
</html>
\ No newline at end of file
Modified: trunk/src/main/webapp/css/main.css
===================================================================
--- trunk/src/main/webapp/css/main.css 2011-07-19 13:21:29 UTC (rev 175)
+++ trunk/src/main/webapp/css/main.css 2011-07-19 14:18:47 UTC (rev 176)
@@ -19,20 +19,25 @@
}
#wwctrl_Save, #wwctrl_Cancel, #wwctrl_uploadButton {
- text-align:center;
+ text-align:center;
}
+#wwctrl_exitLogin {
+ text-align:left;
+ display:inline;
+}
+
#wwgrp_username {
float:left;
- }
+}
#scmButton {
-
+
}
#loginDiv {
- margin:auto;
- width:285px;
+ margin:auto;
+ width:285px;
}
1
0
r175 - in trunk/src/main: resources/i18n webapp/WEB-INF/content
by kcardineaud@users.nuiton.org 19 Jul '11
by kcardineaud@users.nuiton.org 19 Jul '11
19 Jul '11
Author: kcardineaud
Date: 2011-07-19 15:21:29 +0200 (Tue, 19 Jul 2011)
New Revision: 175
Url: http://nuiton.org/repositories/revision/scmwebeditor/175
Log:
Add i18n for upload
Modified:
trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties
trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties
trunk/src/main/webapp/WEB-INF/content/upload.jsp
trunk/src/main/webapp/WEB-INF/content/uploadForm.jsp
trunk/src/main/webapp/WEB-INF/content/uploadSuccess.jsp
Modified: trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties
===================================================================
--- trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties 2011-07-19 12:41:07 UTC (rev 174)
+++ trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties 2011-07-19 13:21:29 UTC (rev 175)
@@ -28,4 +28,9 @@
scm.exitTitle=Exit ScmWebEditor without saving.
scm.exitJavascript=Exit ScmWebEditor without saving ? All modification will be lost.
scm.upload=Upload
-scm.uploadTitle=Upload a file on the repository
\ No newline at end of file
+scm.uploadTitle=Upload a file on the repository
+scm.uploadFile=File Url
+scm.uploadPath=Path on Repository
+scm.badUsernameOrPassword=Bad username or password
+scm.erreurRepo=Error on repository
+scm.uploadSuccess=File upload successful
\ No newline at end of file
Modified: trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties
===================================================================
--- trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties 2011-07-19 12:41:07 UTC (rev 174)
+++ trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties 2011-07-19 13:21:29 UTC (rev 175)
@@ -1,6 +1,8 @@
scm.FileInEditor=Fichier dans l''editeur \:
+scm.badUsernameOrPassword=Identifiant ou mot de passe incorrect
scm.commitMessage=Message associe au commit
scm.commitMessageTitle=laisser un message pour le commit
+scm.erreurRepo=Erreur sur le depot
scm.exit=Quitter
scm.exitJavascript=Quitter ScmWebEditor sans sauvegarder ? Toutes les modifications serons perdues.
scm.exitTitle=Quitter ScmWebEditor sans sauvegarder.
@@ -25,6 +27,9 @@
scm.saveAndQuitTitle=Sauvegarder le fichier sur le depot et retourner à la page precedente.
scm.text=Texte
scm.upload=Ajouter un fichier
+scm.uploadFile=Url du fichier
+scm.uploadPath=Repertoire sur le depot
+scm.uploadSuccess=Fichier telecharche avec succes
scm.uploadTitle=Ajouter un fichier sur le depot
scm.username=Identifiant
scm.usernameTitle=Identifiant du depot
Modified: trunk/src/main/webapp/WEB-INF/content/upload.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/upload.jsp 2011-07-19 12:41:07 UTC (rev 174)
+++ trunk/src/main/webapp/WEB-INF/content/upload.jsp 2011-07-19 13:21:29 UTC (rev 175)
@@ -1,14 +1,13 @@
<%@ taglib prefix="s" uri="/struts-tags"%>
-<p>Result : </p>
<s:if test="badLogin">
- <p><font color="red">Bad username or password</font></p>
+ <p><font color="red"><s:text name="scm.badUsernameOrPassword"/></font></p>
</s:if>
<s:elseif test="error">
- <p><font color="red">Erreur SVN</font></p>
+ <p><font color="red"><s:text name="scm.erreurRepo"/></font></p>
</s:elseif>
<s:else>
- <p>File upload successful</p>
+ <p><s:text name="scm.uploadSuccess"/></p>
</s:else>
\ No newline at end of file
Modified: trunk/src/main/webapp/WEB-INF/content/uploadForm.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/uploadForm.jsp 2011-07-19 12:41:07 UTC (rev 174)
+++ trunk/src/main/webapp/WEB-INF/content/uploadForm.jsp 2011-07-19 13:21:29 UTC (rev 175)
@@ -9,17 +9,17 @@
</head>
<body>
- <form method="POST" id="uploadForm" action="doUpload" enctype="multipart/form-data">
- <label>Upload a picture : <input type="file" name="upload"/></label><br/>
- <label>Path on svn : <input type="text" name="svnPath" /></label><br/>
- <label>username : <input type="text" name="username" /></label><br/>
- <label>password : <input type="password" name="pw" /></label><br/>
+ <form method="POST" id="uploadForm" action="doUpload.action" enctype="multipart/form-data">
+ <label><s:text name="scm.uploadFile" /> : <input type="file" name="upload"/></label><br/>
+ <label><s:text name="scm.uploadPath" /> : <input type="text" name="svnPath" /></label><br/>
+ <label><s:text name="scm.username" /> : <input type="text" name="username" /></label><br/>
+ <label><s:text name="scm.password" /> : <input type="password" name="pw" /></label><br/>
<s:if test="badLogin">
- <p><font color="red">Bad username or password</font></p>
+ <p><font color="red"><s:text name="scm.badUsernameOrPassword"/></font></p>
</s:if>
<s:elseif test="error">
- <p><font color="red">Erreur SVN</font></p>
+ <p><font color="red"><s:text name="scm.erreurRepo"/></font></p>
</s:elseif>
<input type="submit"/>
</form>
Modified: trunk/src/main/webapp/WEB-INF/content/uploadSuccess.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/uploadSuccess.jsp 2011-07-19 12:41:07 UTC (rev 174)
+++ trunk/src/main/webapp/WEB-INF/content/uploadSuccess.jsp 2011-07-19 13:21:29 UTC (rev 175)
@@ -1,5 +1,6 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
+ <%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
@@ -7,7 +8,7 @@
<title>Success</title>
</head>
<body>
-<p>File upload successful</p>
+<p><s:text name="scm.uploadSuccess"/></p>
<form>
<input type="button" value="close" onclick="window.close()">
</form>
1
0
r174 - in trunk/src/main: resources resources/i18n webapp/WEB-INF/content webapp/css webapp/js
by kcardineaud@users.nuiton.org 19 Jul '11
by kcardineaud@users.nuiton.org 19 Jul '11
19 Jul '11
Author: kcardineaud
Date: 2011-07-19 14:41:07 +0200 (Tue, 19 Jul 2011)
New Revision: 174
Url: http://nuiton.org/repositories/revision/scmwebeditor/174
Log:
ModificationViewer.jsp is now in i18n
Modified:
trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties
trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties
trunk/src/main/resources/struts.xml
trunk/src/main/webapp/WEB-INF/content/modificationViewer.jsp
trunk/src/main/webapp/css/main.css
trunk/src/main/webapp/js/cancelRedirect.js
Modified: trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties
===================================================================
--- trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties 2011-07-18 15:23:54 UTC (rev 173)
+++ trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties 2011-07-19 12:41:07 UTC (rev 174)
@@ -9,4 +9,23 @@
scm.text=Text
scm.modificationViewer.noJavascript=Javascript is not activated. You can't only use Save and Quit or upload button.
scm.modificationViewer.betterUseJavascript=For a better use of SCMWebEditor please activate JavaScript.
-scm.commitMessage=Commit message \:
\ No newline at end of file
+scm.commitMessage=Commit message
+scm.username=Username
+scm.password=Password
+scm.commitMessageTitle=let a message for commit
+scm.FileInEditor=File in editor \:
+scm.usernameTitle=Repository username
+scm.passwordTitle=Repository password
+scm.logAs=You are log as \:
+scm.saveAndContinue=Save and Continue Editing
+scm.saveAndContinueTitle=Commit modifications and continue editing the file.
+scm.saveAndQuit=Save and quit
+scm.saveAndQuitTitle=Save this file and go back to previous page.
+scm.preview=Preview
+scm.reset=Reset
+scm.resetTitle=Go back to the last revision of the file
+scm.exit=Exit
+scm.exitTitle=Exit ScmWebEditor without saving.
+scm.exitJavascript=Exit ScmWebEditor without saving ? All modification will be lost.
+scm.upload=Upload
+scm.uploadTitle=Upload a file on the repository
\ No newline at end of file
Modified: trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties
===================================================================
--- trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties 2011-07-18 15:23:54 UTC (rev 173)
+++ trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties 2011-07-19 12:41:07 UTC (rev 174)
@@ -1,12 +1,31 @@
-scm.commitMessage=Message associe au commit \:
+scm.FileInEditor=Fichier dans l''editeur \:
+scm.commitMessage=Message associe au commit
+scm.commitMessageTitle=laisser un message pour le commit
+scm.exit=Quitter
+scm.exitJavascript=Quitter ScmWebEditor sans sauvegarder ? Toutes les modifications serons perdues.
+scm.exitTitle=Quitter ScmWebEditor sans sauvegarder.
scm.info.ProblemWithRst=Si vous rencontrez des problemes avec RestruturedText, visitez le
scm.info.rstWebsite=site de la documentation RST
-scm.language=langage
+scm.language=Langage
+scm.logAs=Connecte
scm.modificationViewer.betterUseJavascript=
scm.modificationViewer.noJavascript=Javascript est desactive. Vous pouvais seulement utiliser les boutons sauvegarder et quitter, quitter ou upload.
-scm.outConnection.enterRepo=Entrez l'adresse de votre depot.
-scm.outConnection.noJavascript=Javascript n'est pas active. Certaines fonctions ne serons pas accessible.
+scm.outConnection.enterRepo=Entrez l''adresse de votre depot.
+scm.outConnection.noJavascript=Javascript n''est pas active. Certaines fonctions ne serons pas accessible.
scm.outConnection.scmPath=Repertoire SCM \:
scm.outConnection.search=Chercher
+scm.password=Mot de passe
+scm.passwordTitle=Mot de pass du depot
+scm.preview=Apercu
+scm.reset=Reinitialiser
+scm.resetTitle=Retour a la derniere revision du fichier
+scm.saveAndContinue=Sauvegarder et continuer
+scm.saveAndContinueTitle=Enregister les modifications sur le depot et continer d''editer le fichier
+scm.saveAndQuit=Sauvegarder et quitter
+scm.saveAndQuitTitle=Sauvegarder le fichier sur le depot et retourner à la page precedente.
scm.text=Texte
+scm.upload=Ajouter un fichier
+scm.uploadTitle=Ajouter un fichier sur le depot
+scm.username=Identifiant
+scm.usernameTitle=Identifiant du depot
scm.welcome=Bienvenue sur SCMWebEditor
Modified: trunk/src/main/resources/struts.xml
===================================================================
--- trunk/src/main/resources/struts.xml 2011-07-18 15:23:54 UTC (rev 173)
+++ trunk/src/main/resources/struts.xml 2011-07-19 12:41:07 UTC (rev 174)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration
2.0//EN"
Modified: trunk/src/main/webapp/WEB-INF/content/modificationViewer.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/modificationViewer.jsp 2011-07-18 15:23:54 UTC (rev 173)
+++ trunk/src/main/webapp/WEB-INF/content/modificationViewer.jsp 2011-07-19 12:41:07 UTC (rev 174)
@@ -49,12 +49,12 @@
<a title="ScmWebEditor Project Website" target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="ScmWebEditor logo"/></a>
<center>
- <h2>Welcome on SCMWebEditor</h2>
+ <h2><s:text name="scm.welcome"/></h2>
<%
String typeEditor="null";
if (request.getAttribute("format")!=null && request.getAttribute("format").equals("rst")){
%>
- <h4>For any Problem with RestruturedText visit <a href="http://docutils.sourceforge.net/rst.html">RST documentation website</a>.</h4>
+ <h4><s:text name="scm.info.ProblemWithRst"/> <a href="http://docutils.sourceforge.net/rst.html"><s:text name="scm.info.rstWebsite"/></a>.</h4>
<% } %>
</center>
@@ -74,7 +74,9 @@
%>
- <p>File in editor : <a href="<%=request.getAttribute("address")%>" ><%=request.getAttribute("address")%></a> </p>
+ <p>
+ <s:text name="scm.FileInEditor"/><a href="<%=request.getAttribute("address")%>" ><%=request.getAttribute("address")%></a>
+ </p>
<textarea id="newTextId" rows="50" cols="80" name="newText"><%=valueTextarea%></textarea>
@@ -87,9 +89,9 @@
</script>
- <label>Language :
+ <label><s:text name="scm.language"/>
<select id="language" name="langageSelection" onchange="changeModeBy(editor,this)">
- <option value="null">Text</option>
+ <option value="null"><s:text name="scm.text"/></option>
<option value="rst">ReStructuredText</option>
<option value="javascript">Javascript</option>
<option value="text/html">HTML</option>
@@ -117,15 +119,23 @@
<script src="js/gereSession.js" type="text/javascript"></script>
<script src="js/cancelRedirect.js" type="text/javascript"></script>
<script src="js/pictureUpload.js" type="text/javascript"></script>
- <noscript><h4>Javascript is not activated. You can't only use Save and Quit or Reset button.</h4></noscript>
- <noscript><h4>For a better use of SCMWebEditor please activate JavaScript.</h4></noscript>
+ <noscript><h4><s:text name="scm.modificationViewer.noJavascript"/></h4></noscript>
+ <noscript><h4><s:text name="scm.modificationViewer.betterUseJavascript"/></h4></noscript>
<div id="form">
<div id="htmlcontentCommit"></div>
- <label>Commit Message: <input type="text" name="commitMessage" title="Let a commit message with this file."/></label>
+ <s:set id="scm.commitMessage">
+ <s:text name="scm.commitMessage"/>
+ </s:set>
+ <s:set id="scm.commitMessageTitle">
+ <s:text name="scm.commitMessageTitle"/>
+ </s:set>
+ <s:textfield required="true" label="%{scm.commitMessage}" name="commitMessage" title="%{scm.commitMessageTitle}" />
+
+
<%if (request.getAttribute("IsLogin").equals(false) == true){
%>
<%if (request.getAttribute("badLogin")!=null && request.getAttribute("badLogin").equals(true)) { %>
@@ -137,10 +147,27 @@
<% } %>
<p>
- <label ACCESSKEY=U>User name: <input TYPE=text NAME=username SIZE=12 title="Commit Username."/></label>
- <label ACCESSKEY=P>Password: <input TYPE=password NAME=pw SIZE=12 title="Commit Password."/></label> </p><%
+
+ <s:set id="scm.username">
+ <s:text name="scm.username"/>
+ </s:set>
+ <s:set id="scm.usernameTitle">
+ <s:text name="scm.usernameTitle"/>
+ </s:set>
+ <s:set id="scm.password">
+ <s:text name="scm.password"/>
+ </s:set>
+ <s:set id="scm.passwordTitle">
+ <s:text name="scm.passwordTitle"/>
+ </s:set>
+ <div id="loginDiv">
+ <s:textfield accesskey="U" size="12" label="%{scm.username}" name="username" title="%{scm.usernameTitle}" />
+ <s:password accesskey="P" size="12" label="%{scm.password}" name="pw" title="%{scm.passwordTitle}" />
+ </div>
+
+ <%
} else {
- %><p>You are log as: <%=request.getAttribute("Login")%></p>
+ %><p><s:text name="scm.logAs"/> <%=request.getAttribute("Login")%></p>
<input type="hidden" NAME=username />
<input type="hidden" NAME=pw /><%
}%>
@@ -153,6 +180,15 @@
<s:url id="ajaxCommit" value="save.action" />
+
+ <div id="scmButton">
+
+ <s:set id="scm.saveAndContinue">
+ <s:text name="scm.saveAndContinue"/>
+ </s:set>
+ <s:set id="scm.saveAndContinueTitle">
+ <s:text name="scm.saveAndContinueTitle"/>
+ </s:set>
<sj:submit onclick="loadChange()"
id="ajaxSaveButton"
formIds="editForm"
@@ -161,17 +197,26 @@
indicator="indicator"
button="true"
buttonIcon="ui-icon-refresh"
- value="Save and Continue Editing"
- title="Commit modifications and continue editing the file"
+ value="%{scm.saveAndContinue}"
+ title="%{scm.saveAndContinueTitle}"
>
</sj:submit>
-
- <input title="Save this file and go back to previous page." type="submit" value="Save and Quit" name="Save"/>
+ <s:set id="scm.saveAndQuit">
+ <s:text name="scm.saveAndQuit"/>
+ </s:set>
+ <s:set id="scm.saveAndQuitTitle">
+ <s:text name="scm.saveAndQuitTitle"/>
+ </s:set>
+ <s:submit cssStyle="align:center;" title="%{scm.saveAndQuitTitle}" type="button" value="%{scm.saveAndQuit}" name="Save"/>
+
<%if (request.getAttribute("format")!=null && request.getAttribute("format")!=null && request.getAttribute("format").equals("rst") == true){
%>
<s:url id="ajaxPreview" value="preview.action" />
-
+
+ <s:set id="scm.preview">
+ <s:text name="scm.preview"/>
+ </s:set>
<sj:submit onclick="loadChange()"
id="ajaxPreviewButton"
formIds="editForm"
@@ -179,35 +224,61 @@
href="%{ajaxPreview}"
button="true"
buttonIcon="ui-icon-refresh"
- value="Preview"
+ value="%{scm.preview}"
>
</sj:submit>
<%}%>
+ <s:set id="scm.reset">
+ <s:text name="scm.reset"/>
+ </s:set>
+ <s:set id="scm.resetTitle">
+ <s:text name="scm.resetTitle"/>
+ </s:set>
<sj:submit
- title="Go back to the last revision of the file"
+ title="%{scm.resetTitle}"
id="resetButton"
- targets="resetResult"
- value="Reset"
+ targets="resetResult"
+ value="%{scm.reset}"
button="true"
href="reset.action"
/>
+
<div id="resetResult"></div>
- <!-- <input title="Reset text as current repository HEAD revision." type="reset" value="Reset" name="Reset" /> -->
<input type="hidden" value="<%=request.getAttribute("ProjectUrl")%>" name="ProjectUrl">
- <input title="Exit ScmWebEditor without saving." type="button" value="Exit" name="Cancel" onclick="javascript:cancelRedirect(this.form.ProjectUrl);"/>
+
+ <s:set id="scm.exit">
+ <s:text name="scm.exit"/>
+ </s:set>
+ <s:set id="scm.exitTitle">
+ <s:text name="scm.exitTitle"/>
+ </s:set>
+ <s:set id="scm.exitJavascript">
+ <s:text name="scm.exitJavascript"/>
+ </s:set>
+ <s:submit title="%{scm.exitTitle}" type="button" value="%{scm.exit}" name="Cancel" onclick="return cancelRedirect('%{scm.exitJavascript}',this.form.ProjectUrl);"/>
+
-
<br/>
+ </div>
</div>
</form>
+
+ <s:set id="scm.upload">
+ <s:text name="scm.upload"/>
+ </s:set>
+ <s:set id="scm.uploadTitle">
+ <s:text name="scm.uploadTitle"/>
+ </s:set>
<center>
- <button title="Upload a file on the repository" onClick="javascript:upload_popup('doUpload.action','upload');" >Upload</button>
+ <s:submit name="uploadButton" value="%{scm.upload}" title="%{scm.uploadTitle}" onClick="javascript:upload_popup('doUpload.action','upload');" />
</center>
+
+
<div>
Modified: trunk/src/main/webapp/css/main.css
===================================================================
--- trunk/src/main/webapp/css/main.css 2011-07-18 15:23:54 UTC (rev 173)
+++ trunk/src/main/webapp/css/main.css 2011-07-19 12:41:07 UTC (rev 174)
@@ -6,6 +6,9 @@
margin:auto;
}
+.wwlbl , .wwctrl {
+ display:inline;
+}
#form {
width:70%;
@@ -15,6 +18,24 @@
text-align:center;
}
+#wwctrl_Save, #wwctrl_Cancel, #wwctrl_uploadButton {
+ text-align:center;
+}
+
+#wwgrp_username {
+ float:left;
+ }
+
+#scmButton {
+
+}
+
+#loginDiv {
+ margin:auto;
+ width:285px;
+}
+
+
#uploadFormId {
width:70%;
margin:auto;
Modified: trunk/src/main/webapp/js/cancelRedirect.js
===================================================================
--- trunk/src/main/webapp/js/cancelRedirect.js 2011-07-18 15:23:54 UTC (rev 173)
+++ trunk/src/main/webapp/js/cancelRedirect.js 2011-07-19 12:41:07 UTC (rev 174)
@@ -3,9 +3,11 @@
*/
-function cancelRedirect(url)
+function cancelRedirect(text, url)
{
- if (confirm("Exit SCMWebEditor ?")){
+ if (confirm(text)){
window.location.replace(url.value);
+ return false;
}
+ else {return false};
}
\ No newline at end of file
1
0
Author: kcardineaud
Date: 2011-07-18 17:23:54 +0200 (Mon, 18 Jul 2011)
New Revision: 173
Url: http://nuiton.org/repositories/revision/scmwebeditor/173
Log:
Texts in outConnection.jsp are now compatible with i18n
Modified:
trunk/src/main/webapp/WEB-INF/content/outConnection.jsp
Modified: trunk/src/main/webapp/WEB-INF/content/outConnection.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/outConnection.jsp 2011-07-18 15:21:26 UTC (rev 172)
+++ trunk/src/main/webapp/WEB-INF/content/outConnection.jsp 2011-07-18 15:23:54 UTC (rev 173)
@@ -18,19 +18,22 @@
<body>
<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
<center>
-<h2>Welcome on SCMWebEditor</h2>
-<noscript><h4>Javascript is not activated. Please activate it for a fully use of ScmWebEditor.</h4></noscript>
+<h2><s:text name="scm.welcome"/></h2>
+<noscript><h4><s:text name="scm.outConnection.noJavascript"/></h4></noscript>
<h4>
-Please complete this form for application using.
+<s:text name="scm.outConnection.enterRepo"/>
</h4>
</center>
<form id="configForm" method="get" action="checkout.action">
<center>
- <p><label>SCM path: <input TYPE=text name="address" SIZE=100></label>
+ <p><label><s:text name="scm.outConnection.scmPath"/> <input TYPE=text name="address" SIZE=100></label>
<s:url id="ajaxSearch" value="search.action" />
+ <s:set id="search">
+ <s:text name="scm.outConnection.search"/>
+ </s:set>
<sj:submit
id="ajaxSearchButton"
formIds="configForm"
@@ -39,7 +42,7 @@
indicator="indicator"
button="true"
buttonIcon="ui-icon-refresh"
- value="Search"
+ value="%{search}"
>
</sj:submit>
1
0
r172 - in trunk: . src/main src/main/i18n src/main/resources src/main/resources/i18n
by kcardineaud@users.nuiton.org 18 Jul '11
by kcardineaud@users.nuiton.org 18 Jul '11
18 Jul '11
Author: kcardineaud
Date: 2011-07-18 17:21:26 +0200 (Mon, 18 Jul 2011)
New Revision: 172
Url: http://nuiton.org/repositories/revision/scmwebeditor/172
Log:
Add i18n in scmwebeditor
Added:
trunk/src/main/i18n/
trunk/src/main/i18n/jsp.rules
trunk/src/main/resources/i18n/
trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties
trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties
trunk/src/main/resources/struts.properties
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-07-12 12:40:41 UTC (rev 171)
+++ trunk/pom.xml 2011-07-18 15:21:26 UTC (rev 172)
@@ -79,6 +79,14 @@
<version>0.9</version>
</dependency>
+
+ <dependency>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>nuiton-i18n</artifactId>
+ <version>${nuitonI18nVersion}</version>
+ <scope>compile</scope>
+ </dependency>
+
<!-- Struts -->
<dependency>
@@ -185,7 +193,15 @@
<struts2Version>2.2.3</struts2Version>
<struts2jqueryVersion>3.1.0</struts2jqueryVersion>
<strutsxworksVersion>2.2.3</strutsxworksVersion>
+ <nuitonI18nVersion>2.4</nuitonI18nVersion>
+ <i18n.bundles>fr_FR,en_GB</i18n.bundles>
+ <i18n.silent>true</i18n.silent>
+
+ <i18n.silent>true</i18n.silent>
+ <i18n.bundleOutputName>scmwebeditor-i18n</i18n.bundleOutputName>
+ <i18n.bundleOutputPackage/>
+
<!-- extra files to include in release -->
<redmine.releaseFiles>${redmine.libReleaseFiles}</redmine.releaseFiles>
@@ -195,8 +211,65 @@
<build>
- <pluginManagement>
+
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+
<plugins>
+
+
+
+
+ <plugin>
+
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <version>${nuitonI18nVersion}</version>
+ <configuration>
+ <bundles>fr_FR</bundles>
+ </configuration>
+ <executions>
+ <execution>
+ <id>scan-java-sources</id>
+ <goals>
+ <goal>parserJava</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>scan-jsp-sources</id>
+ <goals>
+ <goal>parserJsp</goal>
+ </goals>
+ <configuration>
+ <userRulesFiles>
+ <file>${basedir}/src/main/i18n/jsp.rules</file>
+ </userRulesFiles>
+ <namespaces>
+ <s>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</s>
+ <sx>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</sx>
+ <sj>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</sj>
+ <jsp>http://java.sun.com/JSP/Page</jsp>
+ </namespaces>
+ </configuration>
+ </execution>
+ <execution>
+ <id>gen-and-make-bundle</id>
+ <goals>
+ <goal>gen</goal>
+ <goal>bundle</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
@@ -221,7 +294,6 @@
</dependencies>
</plugin>
</plugins>
- </pluginManagement>
</build>
@@ -247,27 +319,8 @@
<plugins>
- <!-- launch in a release the assembly automaticly -->
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>create-assemblies</id>
- <phase>verify</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <attach>false</attach>
- <descriptorRefs>
- <descriptorRef>deps</descriptorRef>
- <descriptorRef>full</descriptorRef>
- </descriptorRefs>
- </configuration>
- </plugin>
+
</plugins>
</build>
</profile>
Added: trunk/src/main/i18n/jsp.rules
===================================================================
--- trunk/src/main/i18n/jsp.rules (rev 0)
+++ trunk/src/main/i18n/jsp.rules 2011-07-18 15:21:26 UTC (rev 172)
@@ -0,0 +1,12 @@
+# Règles i18n pour les jsp
+
+//s:text/@name
+//s:submit/@key
+//sj:submit/@key
+//s:textfield/@key
+//s:checkbox/@key
+//s:password/@key
+//s:file/@key
+//s:label/@key
+//s:optiontransferselect/@key
+//s:select/@key
\ No newline at end of file
Added: trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties
===================================================================
--- trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties (rev 0)
+++ trunk/src/main/resources/i18n/scmwebeditor_en_GB.properties 2011-07-18 15:21:26 UTC (rev 172)
@@ -0,0 +1,12 @@
+scm.outConnection.search=Search
+scm.outConnection.scmPath=SCM path \:
+scm.welcome=Welcome on SCMWebEditor
+scm.outConnection.noJavascript=Javascript is not activated. Please activate it for a fully use of ScmWebEditor.
+scm.outConnection.enterRepo=Please enter your repository address.
+scm.info.ProblemWithRst=For any Problem with RestruturedText visit
+scm.info.rstWebsite=RST documentation website
+scm.language=Language
+scm.text=Text
+scm.modificationViewer.noJavascript=Javascript is not activated. You can't only use Save and Quit or upload button.
+scm.modificationViewer.betterUseJavascript=For a better use of SCMWebEditor please activate JavaScript.
+scm.commitMessage=Commit message \:
\ No newline at end of file
Added: trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties
===================================================================
--- trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties (rev 0)
+++ trunk/src/main/resources/i18n/scmwebeditor_fr_FR.properties 2011-07-18 15:21:26 UTC (rev 172)
@@ -0,0 +1,12 @@
+scm.commitMessage=Message associe au commit \:
+scm.info.ProblemWithRst=Si vous rencontrez des problemes avec RestruturedText, visitez le
+scm.info.rstWebsite=site de la documentation RST
+scm.language=langage
+scm.modificationViewer.betterUseJavascript=
+scm.modificationViewer.noJavascript=Javascript est desactive. Vous pouvais seulement utiliser les boutons sauvegarder et quitter, quitter ou upload.
+scm.outConnection.enterRepo=Entrez l'adresse de votre depot.
+scm.outConnection.noJavascript=Javascript n'est pas active. Certaines fonctions ne serons pas accessible.
+scm.outConnection.scmPath=Repertoire SCM \:
+scm.outConnection.search=Chercher
+scm.text=Texte
+scm.welcome=Bienvenue sur SCMWebEditor
Added: trunk/src/main/resources/struts.properties
===================================================================
--- trunk/src/main/resources/struts.properties (rev 0)
+++ trunk/src/main/resources/struts.properties 2011-07-18 15:21:26 UTC (rev 172)
@@ -0,0 +1,45 @@
+struts.locale=fr_FR
+struts.i18n.encoding=UTF-8
+
+# struts.multipart.parser=cos
+# struts.multipart.parser=pell
+struts.multipart.parser=jakarta
+# uses javax.servlet.context.tempdir by default
+struts.multipart.saveDir=
+struts.multipart.maxSize=2097152
+
+# struts.custom.properties=application,com/webwork/extension/custom
+
+#struts.mapper.class=org.apache.struts2.dispatcher.mapper.DefaultActionMapper
+
+struts.action.extension=action
+
+struts.serve.static=true
+
+struts.serve.static.browserCache=true
+
+struts.tag.altSyntax=true
+
+struts.devMode=true
+
+struts.i18n.reload=true
+
+struts.ui.theme=css_xhtml
+struts.ui.templateDir=template
+#sets the default template type. Either ftl, vm, or jsp
+struts.ui.templateSuffix=ftl
+
+struts.configuration.xml.reload=false
+
+struts.url.http.port = 80
+struts.url.https.port = 443
+
+struts.custom.i18n.resources=scmwebeditor-i18n
+
+struts.dispatcher.parametersWorkaround = false
+
+#struts.freemarker.manager.classname=org.apache.struts2.views.freemarker.FreemarkerManager
+
+struts.freemarker.wrapper.altMap=true
+
+struts.xslt.nocache=false
1
0
r171 - in trunk/src/main: java/org/nuiton/scmwebeditor/actions resources webapp webapp/WEB-INF webapp/WEB-INF/content webapp/js
by kcardineaud@users.nuiton.org 12 Jul '11
by kcardineaud@users.nuiton.org 12 Jul '11
12 Jul '11
Author: kcardineaud
Date: 2011-07-12 14:40:41 +0200 (Tue, 12 Jul 2011)
New Revision: 171
Url: http://nuiton.org/repositories/revision/scmwebeditor/171
Log:
Move jsp and javascript file in proper directory and delete capital letter for jsp files names
Added:
trunk/src/main/webapp/WEB-INF/content/
trunk/src/main/webapp/WEB-INF/content/accueil.jsp
trunk/src/main/webapp/WEB-INF/content/badFileRedirect.jsp
trunk/src/main/webapp/WEB-INF/content/badUseRedirect.jsp
trunk/src/main/webapp/WEB-INF/content/error.jsp
trunk/src/main/webapp/WEB-INF/content/index.jsp
trunk/src/main/webapp/WEB-INF/content/loginSearch.jsp
trunk/src/main/webapp/WEB-INF/content/modificationViewer.jsp
trunk/src/main/webapp/WEB-INF/content/outConnection.jsp
trunk/src/main/webapp/WEB-INF/content/preview.jsp
trunk/src/main/webapp/WEB-INF/content/privateSvnRedirect.jsp
trunk/src/main/webapp/WEB-INF/content/recall.jsp
trunk/src/main/webapp/WEB-INF/content/redirect.jsp
trunk/src/main/webapp/WEB-INF/content/reset.jsp
trunk/src/main/webapp/WEB-INF/content/save.jsp
trunk/src/main/webapp/WEB-INF/content/search.jsp
trunk/src/main/webapp/WEB-INF/content/upload.jsp
trunk/src/main/webapp/WEB-INF/content/uploadForm.jsp
trunk/src/main/webapp/WEB-INF/content/uploadSuccess.jsp
trunk/src/main/webapp/js/
trunk/src/main/webapp/js/cancelRedirect.js
trunk/src/main/webapp/js/gereSession.js
trunk/src/main/webapp/js/pictureUpload.js
trunk/src/main/webapp/js/selectLanguage.js
Removed:
trunk/src/main/webapp/BadFileRedirect.jsp
trunk/src/main/webapp/BadUseRedirect.jsp
trunk/src/main/webapp/Error.jsp
trunk/src/main/webapp/GereSession.js
trunk/src/main/webapp/LoginSearch.jsp
trunk/src/main/webapp/ModificationViewer.jsp
trunk/src/main/webapp/OutConnection.jsp
trunk/src/main/webapp/Preview.jsp
trunk/src/main/webapp/PrivateSvnRedirect.jsp
trunk/src/main/webapp/Recall.jsp
trunk/src/main/webapp/Redirect.jsp
trunk/src/main/webapp/Save.jsp
trunk/src/main/webapp/Search.jsp
trunk/src/main/webapp/accueil.jsp
trunk/src/main/webapp/cancelRedirect.js
trunk/src/main/webapp/index.jsp
trunk/src/main/webapp/pictureUpload.js
trunk/src/main/webapp/reset.jsp
trunk/src/main/webapp/selectLanguage.js
trunk/src/main/webapp/upload.jsp
trunk/src/main/webapp/uploadForm.jsp
trunk/src/main/webapp/uploadSuccess.jsp
Modified:
trunk/src/main/java/org/nuiton/scmwebeditor/actions/UploadAction.java
trunk/src/main/resources/struts.xml
trunk/src/main/webapp/WEB-INF/web.xml
Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/UploadAction.java
===================================================================
--- trunk/src/main/java/org/nuiton/scmwebeditor/actions/UploadAction.java 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/java/org/nuiton/scmwebeditor/actions/UploadAction.java 2011-07-12 12:40:41 UTC (rev 171)
@@ -88,6 +88,9 @@
public String execute() {
+ if(upload==null) {
+ return "redirect";
+ }
badLogin=false;
error=false;
@@ -161,7 +164,7 @@
} catch (IOException e) {
error=true;
log.error("Can't copy the file to the checkout directory",e);
- return "error";
+ return ERROR;
}
@@ -218,7 +221,7 @@
error=true;
//Suppression du repertoire temporaire
delTempDirectory(svnSess);
- return Action.ERROR;
+ return ERROR;
}
@@ -229,7 +232,7 @@
log.info("File upload successful");
}
- return Action.SUCCESS;
+ return SUCCESS;
}
Modified: trunk/src/main/resources/struts.xml
===================================================================
--- trunk/src/main/resources/struts.xml 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/resources/struts.xml 2011-07-12 12:40:41 UTC (rev 171)
@@ -9,51 +9,52 @@
</result-types>
<action name="checkout" class="org.nuiton.scmwebeditor.actions.ScmWebEditorMainAction" method="execute">
- <result name="noParameter" >/OutConnection.jsp</result>
- <result name="login" >/PrivateSvnRedirect.jsp</result>
- <result name="errorPath" >/BadFileRedirect.jsp</result>
- <result name="editPage" >/ModificationViewer.jsp</result>
+ <result name="noParameter" >/WEB-INF/content/outConnection.jsp</result>
+ <result name="login" >/WEB-INF/content/privateSvnRedirect.jsp</result>
+ <result name="errorPath" >/WEB-INF/content/badFileRedirect.jsp</result>
+ <result name="editPage" >/WEB-INF/content/modificationViewer.jsp</result>
</action>
<action name="commit" class="org.nuiton.scmwebeditor.actions.ScmWebEditorCommitAction" method="execute">
- <result name="success" >/Redirect.jsp</result>
- <result name="login" >/ModificationViewer.jsp</result>
- <result name="error">/BadFileRedirect.jsp</result>
- <result name="errorPath">/BadFileRedirect.jsp</result>
+ <result name="success" >/WEB-INF/content/redirect.jsp</result>
+ <result name="login" >/WEB-INF/content/modificationViewer.jsp</result>
+ <result name="error">/WEB-INF/content/badFileRedirect.jsp</result>
+ <result name="errorPath">/WEB-INF/content/badFileRedirect.jsp</result>
</action>
<action name="save" class="org.nuiton.scmwebeditor.actions.SaveAction" method="save">
- <result>/Save.jsp</result>
+ <result>/WEB-INF/content/save.jsp</result>
</action>
<action name="reset" class="org.nuiton.scmwebeditor.actions.ResetAction" >
- <result>/reset.jsp</result>
+ <result>/WEB-INF/content/reset.jsp</result>
</action>
<action name="doUpload" class="org.nuiton.scmwebeditor.actions.UploadAction" >
- <result>/uploadSuccess.jsp</result>
- <result name="login" >/uploadForm.jsp</result>
- <result name="error" >/uploadForm.jsp</result>
+ <result>/WEB-INF/content/uploadSuccess.jsp</result>
+ <result name="redirect" >/WEB-INF/content/uploadForm.jsp</result>
+ <result name="login" >/WEB-INF/content/uploadForm.jsp</result>
+ <result name="error" >/WEB-INF/content/uploadForm.jsp</result>
</action>
<action name="uploadFile" class="org.nuiton.scmwebeditor.actions.UploadAction" >
- <result>/upload.jsp</result>
- <result name="login" >/upload.jsp</result>
- <result name="error" >/upload.jsp</result>
+ <result>/WEB-INF/content/upload.jsp</result>
+ <result name="login" >/WEB-INF/content/upload.jsp</result>
+ <result name="error" >/WEB-INF/content/upload.jsp</result>
</action>
<action name="preview" class="org.nuiton.scmwebeditor.actions.PreviewAction" >
- <result>/Preview.jsp</result>
+ <result>/WEB-INF/content/preview.jsp</result>
</action>
<action name="search" class="org.nuiton.scmwebeditor.actions.SearchAction" method="search">
<param name="address"/>
- <result name="root" >Search.jsp</result>
+ <result name="root" >/WEB-INF/content/search.jsp</result>
<result name="success" type="json">
<param name="root">nodes</param>
</result>
- <result name="authError" >/LoginSearch.jsp</result>
+ <result name="authError" >/WEB-INF/content/loginSearch.jsp</result>
</action>
</package>
Deleted: trunk/src/main/webapp/BadFileRedirect.jsp
===================================================================
--- trunk/src/main/webapp/BadFileRedirect.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/BadFileRedirect.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,23 +0,0 @@
-<%-- Document : BadFileRedirect Created on : 6 oct. 2009, 15:33:56
-Author : glorieux --%> <%@page contentType="text/html"
-pageEncoding="UTF-8"%>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Error...</title>
-<link rel="icon" href="img/ScmWebEditor_little.png" type="image/png">
-<link rel="stylesheet" type="text/css" href="css/main.css">
-<meta http-equiv="Refresh" content="3; url=<%=request.getAttribute("projectUrl")%>">
-</head>
-<body>
-<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
-<p>Bad SCM path or file name! Please correct it.</p>
-<p>You should be transferred automatically to the form page. If not
-please <a href="<%=request.getAttribute("projectUrl")%>">click
-this link</a>.</p>
-<p>©2004-2009 CodeLutin</p>
-</body>
-</html>
Deleted: trunk/src/main/webapp/BadUseRedirect.jsp
===================================================================
--- trunk/src/main/webapp/BadUseRedirect.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/BadUseRedirect.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,24 +0,0 @@
-<%-- Document : BadFileRedirect Created on : 6 oct. 2009, 15:33:56
-Author : glorieux --%> <%@page contentType="text/html"
-pageEncoding="UTF-8"%>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Error...</title>
-<link rel="icon" href="img/ScmWebEditor_little.png" type="image/png">
-<link rel="stylesheet" type="text/css" href="css/main.css">
-<meta http-equiv="Refresh" content="3; url=
-<%=request.getAttribute("scmEditorUrl")%>">
-</head>
-<body>
-<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
-<p>Bad Use of ScmWebEditor! Please try again.</p>
-<p>You should be transferred automatically to the previous page. If not
-please <a href="<%=request.getAttribute("scmEditorUrl")%>">click
-this link</a>.</p>
-<p>©2004-2009 CodeLutin</p>
-</body>
-</html>
Deleted: trunk/src/main/webapp/Error.jsp
===================================================================
--- trunk/src/main/webapp/Error.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/Error.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,22 +0,0 @@
-<%-- Document : Error Created on : 15 sept. 2009, 12:22:29 Author :
-glorieux --%> <%@page contentType="text/html" pageEncoding="UTF-8"%>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Error</title>
-<link rel="icon" href="img/ScmWebEditor_little.png" type="image/png">
-<link rel="stylesheet" type="text/css" href="css/main.css">
-<meta http-equiv="Refresh" content="2;
- url="
-<%=request.getAttribute("Redirect_url")%>">
-<%--%=request.getAttribute("scmEditorUrl")%>?adresse=<%=request.getAttribute("Svnpath_url")%>&file_name=<%=request.getAttribute("Filename_url")%>&project_url=<%=request.getAttribute("Redirection_url")%>&lang=<%=request.getAttribute("Lang")%>&format=<%=request.getAttribute("Format")%>"--%>
-</head>
-<body>
-<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
-<p>Bad Login or Password. Please Wait.</p>
-<p>©2004-2009 CodeLutin</p>
-</body>
-</html>
Deleted: trunk/src/main/webapp/GereSession.js
===================================================================
--- trunk/src/main/webapp/GereSession.js 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/GereSession.js 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,41 +0,0 @@
-/**
- * @author geoffroy lorieux
- */
-
-function rappelSession(minutes)
-{
- var msg='Your session expire on '+minutes+' minute';
- if(minutes>1)
- {
- msg+='s';
- }
- msg+='.\nDo you want to reload this page ?(You will not lose your data)';
-
- if(confirm(msg))
- {
- location.reload();
- }
-}
-
-/**
- * affiche une alerte sur l'expiration de la session et redirige vers une autre page
- */
-function expirationSession()
-{
- alert("Your session has expire. Please relogin");
- window.history.back(-1);
-}
-
-/**
- * affiche des avertissements sur le délai d'expiration de la session :
- * - un premier au bout de (expiration-rappel) minutes (par ex. : 20-3 = 17 minutes)
- * - un second au bout de (expiration) minutes (par ex. : 20 minutes)
- */
-function geresession(expiration, rappel)
-{
- // affichage du rappel
- var chronoRappel=setTimeout('rappelSession('+rappel+')', (expiration-rappel)*60*1000);
-
- // une fois le rappel affiché, on avertit uniquement de l'expiration
- var chronoExpiration=setTimeout('expirationSession()', (expiration)*60*1000);
-}
Deleted: trunk/src/main/webapp/LoginSearch.jsp
===================================================================
--- trunk/src/main/webapp/LoginSearch.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/LoginSearch.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,28 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=UTF-8"
- pageEncoding="UTF-8"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <%@ taglib prefix="s" uri="/struts-tags"%>
- <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
- <sj:head jquerytheme="default"/>
-
-<div id="search">
- <p>You must be login to see this repository.</p>
- <p>
- <label>Username : <input type="text" name="username"></input></label><br/>
- <label>Password : <input type ="password" name="pw"></input></label><br/>
-
- <s:url id="ajaxSearchLogin" value="search.action" />
-
- <sj:submit
- id="ajaxSearchButtonLogin"
- formIds="configForm"
- targets="htmlcontentSearch"
- href="%{ajaxSearchLogin}"
- indicator="indicator"
- button="true"
- buttonIcon="ui-icon-refresh"
- value="Login"
- >
- </sj:submit>
- </p>
-</div>
\ No newline at end of file
Deleted: trunk/src/main/webapp/ModificationViewer.jsp
===================================================================
--- trunk/src/main/webapp/ModificationViewer.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/ModificationViewer.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,247 +0,0 @@
- <%-- Document : ModificationViewer Created on : 10 sept. 2009, 13:43:11 Author : glorieux --%>
- <%@page import="org.apache.commons.lang.StringEscapeUtils"%>
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <%@ taglib prefix="s" uri="/struts-tags"%>
- <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
- <sj:head jquerytheme="default"/>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <title>SCMWebEditor</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <script src="selectLanguage.js"></script>
-
-
- <!-- Code mirror -->
- <!-- First the CodeMirror stuff -->
- <script src="codemirror-ui/lib/CodeMirror-2.1/lib/codemirror.js" type="text/javascript"></script>
- <link rel="stylesheet" href="codemirror-ui/lib/CodeMirror-2.1/lib/codemirror.css">
-
- <script src="codemirror-ui/lib/CodeMirror-2.1/mode/rst/rst.js"></script>
- <link rel="stylesheet" href="codemirror-ui/lib/CodeMirror-2.1/mode/rst/rst.css">
-
- <script src="codemirror-ui/lib/CodeMirror-2.1/mode/clike/clike.js"></script>
- <link rel="stylesheet" href="codemirror-ui/lib/CodeMirror-2.1/mode/clike/clike.css">
-
- <link rel="stylesheet" href="codemirror-ui/lib/CodeMirror-2.1/theme/default.css">
-
- <script src="codemirror-ui/lib/CodeMirror-2.1/mode/htmlmixed/htmlmixed.js"></script>
- <script src="codemirror-ui/lib/CodeMirror-2.1/mode/javascript/javascript.js"></script>
- <script src="codemirror-ui/lib/CodeMirror-2.1/mode/css/css.js"></script>
- <script src="codemirror-ui/lib/CodeMirror-2.1/mode/xml/xml.js"></script>
-
-
- <!-- Then the CodeMirrorUI stuff -->
- <script src="codemirror-ui/js/codemirror-ui.js" type="text/javascript"></script>
- <link rel="stylesheet" href="codemirror-ui/css/codemirror-ui.css" type="text/css" media="screen" />
-
-
-
- <link rel="icon" href="img/ScmWebEditor_little.png" type="image/png">
- <link rel="stylesheet" type="text/css" href="css/main.css">
-
-
-
-</head>
-<body onload="geresession(<%=request.getAttribute("InvalidateMaxTime")%>, 5);">
- <a title="ScmWebEditor Project Website" target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="ScmWebEditor logo"/></a>
-
- <center>
- <h2>Welcome on SCMWebEditor</h2>
- <%
- String typeEditor="null";
- if (request.getAttribute("format")!=null && request.getAttribute("format").equals("rst")){
- %>
- <h4>For any Problem with RestruturedText visit <a href="http://docutils.sourceforge.net/rst.html">RST documentation website</a>.</h4>
- <% } %>
- </center>
-
-
- <form method="post" action=commit.action id="editForm">
-
-
-
- <%
- String valueTextarea;
- if(request.getAttribute("lastText")!=null) {
- valueTextarea = (String) request.getAttribute("lastText");
- } else {
- valueTextarea = (String) request.getAttribute("OrigText");
- }
-
-
- %>
-
- <p>File in editor : <a href="<%=request.getAttribute("address")%>" ><%=request.getAttribute("address")%></a> </p>
- <textarea id="newTextId" rows="50" cols="80" name="newText"><%=valueTextarea%></textarea>
-
-
-
- <script type="text/javascript">
- var textarea = document.getElementById('newTextId');
- var uiOptions = { path : 'codemirror-ui/js/', searchMode : 'inline' }
- var codeMirrorOptions = { mode: "null" }
- var editor = new CodeMirrorUI(textarea,uiOptions,codeMirrorOptions);
- </script>
-
-
- <label>Language :
- <select id="language" name="langageSelection" onchange="changeModeBy(editor,this)">
- <option value="null">Text</option>
- <option value="rst">ReStructuredText</option>
- <option value="javascript">Javascript</option>
- <option value="text/html">HTML</option>
- <option value="xml">XML</option>
- <option value="text/x-java">JAVA</option>
- </select>
- </label>
-
-
-
- <script type='text/javascript'>
- selectLanguage('<%=((String) request.getAttribute("minetype"))%>','<%=request.getAttribute("format")%>' );
- changeModeBy(editor, document.getElementById('language'));
- </script>
-
-
- <script type="text/javascript">
- function loadChange(){
- document.getElementById('newTextId').value = editor.mirror.getValue();
- }
- </script>
-
-
-
- <script src="GereSession.js" type="text/javascript"></script>
- <script src="cancelRedirect.js" type="text/javascript"></script>
- <script src="pictureUpload.js" type="text/javascript"></script>
- <noscript><h4>Javascript is not activated. You can't only use Save and Quit or Reset button.</h4></noscript>
- <noscript><h4>For a better use of SCMWebEditor please activate JavaScript.</h4></noscript>
-
- <div id="form">
-
- <div id="htmlcontentCommit"></div>
-
- <label>Commit Message: <input type="text" name="commitMessage" title="Let a commit message with this file."/></label>
-
- <%if (request.getAttribute("IsLogin").equals(false) == true){
- %>
- <%if (request.getAttribute("badLogin")!=null && request.getAttribute("badLogin").equals(true)) { %>
- <p>
- <font color="red">
- Bad username or password
- </font>
- </p>
- <% } %>
- <p>
-
- <label ACCESSKEY=U>User name: <input TYPE=text NAME=username SIZE=12 title="Commit Username."/></label>
- <label ACCESSKEY=P>Password: <input TYPE=password NAME=pw SIZE=12 title="Commit Password."/></label> </p><%
- } else {
- %><p>You are log as: <%=request.getAttribute("Login")%></p>
- <input type="hidden" NAME=username />
- <input type="hidden" NAME=pw /><%
- }%>
- <input type="hidden" name="address" value="<%=request.getAttribute("address")%>"/>
- <input type="hidden" name="origText" value="<%=request.getAttribute("OrigText")%>"/>
- <% if(request.getAttribute("lastText")!=null) { %>
- <input type="hidden" name="lastText" value="<%=request.getAttribute("lastText")%>" />
- <% } %>
- <input type="hidden" name="scmEditorUrl" value="<%=request.getAttribute("scmEditorUrl")%>"/>
-
- <s:url id="ajaxCommit" value="save.action" />
-
- <sj:submit onclick="loadChange()"
- id="ajaxSaveButton"
- formIds="editForm"
- targets="htmlcontentCommit"
- href="%{ajaxCommit}"
- indicator="indicator"
- button="true"
- buttonIcon="ui-icon-refresh"
- value="Save and Continue Editing"
- title="Commit modifications and continue editing the file"
- >
- </sj:submit>
-
- <input title="Save this file and go back to previous page." type="submit" value="Save and Quit" name="Save"/>
-
- <%if (request.getAttribute("format")!=null && request.getAttribute("format")!=null && request.getAttribute("format").equals("rst") == true){
- %>
- <s:url id="ajaxPreview" value="preview.action" />
-
- <sj:submit onclick="loadChange()"
- id="ajaxPreviewButton"
- formIds="editForm"
- targets="htmlcontentPreview"
- href="%{ajaxPreview}"
- button="true"
- buttonIcon="ui-icon-refresh"
- value="Preview"
- >
- </sj:submit>
-
- <%}%>
-
- <sj:submit
- title="Go back to the last revision of the file"
- id="resetButton"
- targets="resetResult"
- value="Reset"
- button="true"
- href="reset.action"
- />
- <div id="resetResult"></div>
-
- <!-- <input title="Reset text as current repository HEAD revision." type="reset" value="Reset" name="Reset" /> -->
- <input type="hidden" value="<%=request.getAttribute("ProjectUrl")%>" name="ProjectUrl">
- <input title="Exit ScmWebEditor without saving." type="button" value="Exit" name="Cancel" onclick="javascript:cancelRedirect(this.form.ProjectUrl);"/>
-
-
- <br/>
-
- </div>
- </form>
- <center>
- <button title="Upload a file on the repository" onClick="javascript:upload_popup('uploadForm.jsp','upload');" >Upload</button>
- </center>
-
- <div>
-
-
- </div>
-
-
- <!--
- <div id="uploadFormId" >
- <s:form method="POST" id="uploadForm" action="uploadFile" enctype="multipart/form-data">
-
-
- <label>Upload a picture : <input type="file" name="upload"/></label><br/>
- <label>Path on svn : <input type="text" name="svnPath" /></label><br/>
- <label>username : <input type="text" name="username" /></label><br/>
- <label>password : <input type="password" name="pw" /></label><br/>
-
- <sj:submit
- id="ajaxUploadButton"
- targets="targetContentUpload"
- button="true"
- value="upload"
- >
- </sj:submit>
-
- </s:form>
- </div>
- -->
-
- <div id="targetContentUpload"></div>
-
-
- <div id="htmlcontentPreview"></div>
-
-
- <p align="right">©2004-2009 CodeLutin</p>
-</body>
-</html>
Deleted: trunk/src/main/webapp/OutConnection.jsp
===================================================================
--- trunk/src/main/webapp/OutConnection.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/OutConnection.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,67 +0,0 @@
-<%-- Document : OutConnection Created on : 6 oct. 2009, 12:07:27 Author: glorieux --%>
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
- <%@ taglib prefix="s" uri="/struts-tags"%>
- <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
- <%@ taglib prefix="sjt" uri="/struts-jquery-tree-tags" %>
- <sj:head jquerytheme="default"/>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<link rel="icon" href="img/ScmWebEditor_little.png" type="image/png">
-<link rel="stylesheet" type="text/css" href="css/main.css">
-<title>SCM Web Editor</title>
-</head>
-<body>
-<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
-<center>
-<h2>Welcome on SCMWebEditor</h2>
-<noscript><h4>Javascript is not activated. Please activate it for a fully use of ScmWebEditor.</h4></noscript>
-<h4>
-Please complete this form for application using.
-</h4>
-</center>
-
-<form id="configForm" method="get" action="checkout.action">
-<center>
- <p><label>SCM path: <input TYPE=text name="address" SIZE=100></label>
-
- <s:url id="ajaxSearch" value="search.action" />
-
- <sj:submit
- id="ajaxSearchButton"
- formIds="configForm"
- targets="htmlcontentSearch"
- href="%{ajaxSearch}"
- indicator="indicator"
- button="true"
- buttonIcon="ui-icon-refresh"
- value="Search"
- >
- </sj:submit>
-
- <input type="submit" name="Save" />
- </p>
-</center>
-<div id="htmlcontentSearch" ></div>
-</form>
-
-<!--
- <div id="searchTree">
-
- <s:url id="searchTreeUrl" action="search?address=http://localhost/scmsvn"/>
-
- <sjt:tree id="svnTree"
- jstreetheme="classic"
- href="%{searchTreeUrl}"
- onClickTopics="treeClicked"/>
-
- </div>
- -->
-
-<p align="right">©2004-2009 CodeLutin</p>
-</body>
-</html>
Deleted: trunk/src/main/webapp/Preview.jsp
===================================================================
--- trunk/src/main/webapp/Preview.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/Preview.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,10 +0,0 @@
- <%@ taglib prefix="s" uri="/struts-tags"%>
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <%--Title and div for rst preview--%>
- <h3 id="prevtitle" >Preview :</h3>
-
- <div id="prev" title="Preview">
- <div id="preview" >
- <s:property value="XMLResponse" escapeHtml="false"/>
- </div>
- </div>
Deleted: trunk/src/main/webapp/PrivateSvnRedirect.jsp
===================================================================
--- trunk/src/main/webapp/PrivateSvnRedirect.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/PrivateSvnRedirect.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,29 +0,0 @@
-<%-- Document : PrivateSvnRedirect Created on : 30 sept. 2009, 14:05:43
-Author : glorieux --%> <%@page contentType="text/html"
-pageEncoding="UTF-8"%>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Private Scm</title>
-<link rel="icon" href="img/ScmWebEditor_little.png" type="image/png">
-<link rel="stylesheet" type="text/css" href="css/main.css">
-</head>
-<body>
-<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
-<form method="post" action="checkout.action" >
-<input type="hidden" name="address" value="<%=request.getAttribute("address")%>"/>
-<input type="hidden" name="projectUrl" value="<%=request.getAttribute("projectUrl")%>"/>
-<script src="cancelRedirect.js"></script>
-<p>You try to access a Private SCM. Please login</p>
-<p><label ACCESSKEY=U>User name: <input TYPE=text
- NAME=username SIZE=12></label> <label ACCESSKEY=P>Password: <input
- TYPE=password NAME=pw SIZE=12></label></p>
-<input type="submit" value="Submit" name="Save" /> <input type="button"
- value="Exit" name="Cancel"
- onclick="cancelRedirect(this.form.projectUrl);" /></form>
-<p>©2004-2009 CodeLutin</p>
-</body>
-</html>
\ No newline at end of file
Deleted: trunk/src/main/webapp/Recall.jsp
===================================================================
--- trunk/src/main/webapp/Recall.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/Recall.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,13 +0,0 @@
-<%-- Document : Recall Created on : 30 sept. 2009, 17:05:40 Author :
-glorieux --%> <%@page contentType="text/html" pageEncoding="UTF-8"%>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Redirect...</title>
-<meta http-equiv="Refresh" content="0; url=
-<%=request.getAttribute("Redirect_url")%>">
-</head>
-</html>
Deleted: trunk/src/main/webapp/Redirect.jsp
===================================================================
--- trunk/src/main/webapp/Redirect.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/Redirect.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,23 +0,0 @@
-<%-- Document : Redirect Created on : 10 sept. 2009, 13:43:11 Author :
-glorieux --%> <%@page contentType="text/html" pageEncoding="UTF-8"%>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Redirection...</title>
-<link rel="icon" href="img/ScmWebEditor_little.png" type="image/png">
-<link rel="stylesheet" type="text/css" href="css/main.css">
-<meta http-equiv="Refresh" content="2; url=
-<%=request.getAttribute("Redirection_url")%>">
-</head>
-<body>
-<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
-<p>Thank you using RSTEditor</p>
-<p>You should be transferred automatically to the new page. If not
-please <a href="<%=request.getAttribute("Redirection_url")%>">click
-this link</a>.</p>
-<p>©2004-2009 CodeLutin</p>
-</body>
-</html>
Deleted: trunk/src/main/webapp/Save.jsp
===================================================================
--- trunk/src/main/webapp/Save.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/Save.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,17 +0,0 @@
- <%@ taglib prefix="s" uri="/struts-tags"%>
- <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
-
-
-
- <s:if test="result=='authError'" >
- <h4> <font color="red"> Bad username or password, can't save modification</font> </h4>
- </s:if>
- <s:elseif test="result=='error'" >
- <h4> Can't save modification </h4>
- </s:elseif>
- <s:elseif test="result=='uselessSave'" >
- <h4> It's useless to save the file, file is not modify</h4>
- </s:elseif>
- <s:else>
- <h4>Last change save <s:property value="formatDate" /> </h4>
- </s:else>
\ No newline at end of file
Deleted: trunk/src/main/webapp/Search.jsp
===================================================================
--- trunk/src/main/webapp/Search.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/Search.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,49 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=UTF-8"
- pageEncoding="UTF-8"%>
-<%@page import="org.nuiton.scmwebeditor.actions.SearchAction"%>
-<%@page import="java.util.LinkedList" %>
-<%@page import="java.util.Iterator" %>
-
-
- <%@ taglib prefix="s" uri="/struts-tags"%>
- <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
- <%@ taglib prefix="sjt" uri="/struts-jquery-tree-tags" %>
-
- <sj:head debug="true" jquerytheme="default"/>
-
-<script>
-$.subscribe('treeClicked', function(event, data) {
- var item = event.originalEvent.data.rslt.obj;
-
- if(item.text().indexOf("/") == -1) {
- document.location.href=("checkout.action?address="+item.attr("id"));
- }
-
-});
-
-</script>
-
- <div id="searchTree">
- <s:set name="address">
- <s:property value="address"/>
- </s:set>
- <s:set name="username">
- <s:property value="username"/>
- </s:set>
- <s:set name="pw">
- <s:property value="pw"/>
- </s:set>
-
-
- <s:url id="searchTreeUrl" action="search?address=%{address}&username=%{username}&pw=%{pw}" />
- <sjt:tree id="svnTree"
- htmlTitles="true"
- jstreetheme="classic"
- href="%{searchTreeUrl}"
- onClickTopics="treeClicked"
- />
-
- </div>
-
- <s:label name="error"></s:label>
-
Added: trunk/src/main/webapp/WEB-INF/content/accueil.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/accueil.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/accueil.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,3 @@
+<%@ page contentType="text/html; charset=UTF-8" %>
+
+ <p>Parametres detectés</p>
Added: trunk/src/main/webapp/WEB-INF/content/badFileRedirect.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/badFileRedirect.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/badFileRedirect.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,23 @@
+<%-- Document : BadFileRedirect Created on : 6 oct. 2009, 15:33:56
+Author : glorieux --%> <%@page contentType="text/html"
+pageEncoding="UTF-8"%>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Error...</title>
+<link rel="icon" href="img/ScmWebEditor_little.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="css/main.css">
+<meta http-equiv="Refresh" content="3; url=<%=request.getAttribute("projectUrl")%>">
+</head>
+<body>
+<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
+<p>Bad SCM path or file name! Please correct it.</p>
+<p>You should be transferred automatically to the form page. If not
+please <a href="<%=request.getAttribute("projectUrl")%>">click
+this link</a>.</p>
+<p>©2004-2009 CodeLutin</p>
+</body>
+</html>
Added: trunk/src/main/webapp/WEB-INF/content/badUseRedirect.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/badUseRedirect.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/badUseRedirect.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,24 @@
+<%-- Document : BadFileRedirect Created on : 6 oct. 2009, 15:33:56
+Author : glorieux --%> <%@page contentType="text/html"
+pageEncoding="UTF-8"%>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Error...</title>
+<link rel="icon" href="img/ScmWebEditor_little.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="css/main.css">
+<meta http-equiv="Refresh" content="3; url=
+<%=request.getAttribute("scmEditorUrl")%>">
+</head>
+<body>
+<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
+<p>Bad Use of ScmWebEditor! Please try again.</p>
+<p>You should be transferred automatically to the previous page. If not
+please <a href="<%=request.getAttribute("scmEditorUrl")%>">click
+this link</a>.</p>
+<p>©2004-2009 CodeLutin</p>
+</body>
+</html>
Added: trunk/src/main/webapp/WEB-INF/content/error.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/error.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/error.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,22 @@
+<%-- Document : Error Created on : 15 sept. 2009, 12:22:29 Author :
+glorieux --%> <%@page contentType="text/html" pageEncoding="UTF-8"%>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Error</title>
+<link rel="icon" href="img/ScmWebEditor_little.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="css/main.css">
+<meta http-equiv="Refresh" content="2;
+ url="
+<%=request.getAttribute("Redirect_url")%>">
+<%--%=request.getAttribute("scmEditorUrl")%>?adresse=<%=request.getAttribute("Svnpath_url")%>&file_name=<%=request.getAttribute("Filename_url")%>&project_url=<%=request.getAttribute("Redirection_url")%>&lang=<%=request.getAttribute("Lang")%>&format=<%=request.getAttribute("Format")%>"--%>
+</head>
+<body>
+<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
+<p>Bad Login or Password. Please Wait.</p>
+<p>©2004-2009 CodeLutin</p>
+</body>
+</html>
Added: trunk/src/main/webapp/WEB-INF/content/index.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/index.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/index.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,3 @@
+<%
+response.sendRedirect("checkout.action");
+%>
\ No newline at end of file
Added: trunk/src/main/webapp/WEB-INF/content/loginSearch.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/loginSearch.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/loginSearch.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,28 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+ <%@ taglib prefix="s" uri="/struts-tags"%>
+ <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
+ <sj:head jquerytheme="default"/>
+
+<div id="search">
+ <p>You must be login to see this repository.</p>
+ <p>
+ <label>Username : <input type="text" name="username"></input></label><br/>
+ <label>Password : <input type ="password" name="pw"></input></label><br/>
+
+ <s:url id="ajaxSearchLogin" value="search.action" />
+
+ <sj:submit
+ id="ajaxSearchButtonLogin"
+ formIds="configForm"
+ targets="htmlcontentSearch"
+ href="%{ajaxSearchLogin}"
+ indicator="indicator"
+ button="true"
+ buttonIcon="ui-icon-refresh"
+ value="Login"
+ >
+ </sj:submit>
+ </p>
+</div>
\ No newline at end of file
Added: trunk/src/main/webapp/WEB-INF/content/modificationViewer.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/modificationViewer.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/modificationViewer.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,247 @@
+ <%-- Document : ModificationViewer Created on : 10 sept. 2009, 13:43:11 Author : glorieux --%>
+ <%@page import="org.apache.commons.lang.StringEscapeUtils"%>
+ <%@page contentType="text/html" pageEncoding="UTF-8"%>
+ <%@ taglib prefix="s" uri="/struts-tags"%>
+ <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
+ <sj:head jquerytheme="default"/>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>SCMWebEditor</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <script type="text/javascript" src="js/selectLanguage.js"></script>
+
+
+ <!-- Code mirror -->
+ <!-- First the CodeMirror stuff -->
+ <script src="codemirror-ui/lib/CodeMirror-2.1/lib/codemirror.js" type="text/javascript"></script>
+ <link rel="stylesheet" href="codemirror-ui/lib/CodeMirror-2.1/lib/codemirror.css">
+
+ <script src="codemirror-ui/lib/CodeMirror-2.1/mode/rst/rst.js"></script>
+ <link rel="stylesheet" href="codemirror-ui/lib/CodeMirror-2.1/mode/rst/rst.css">
+
+ <script src="codemirror-ui/lib/CodeMirror-2.1/mode/clike/clike.js"></script>
+ <link rel="stylesheet" href="codemirror-ui/lib/CodeMirror-2.1/mode/clike/clike.css">
+
+ <link rel="stylesheet" href="codemirror-ui/lib/CodeMirror-2.1/theme/default.css">
+
+ <script src="codemirror-ui/lib/CodeMirror-2.1/mode/htmlmixed/htmlmixed.js"></script>
+ <script src="codemirror-ui/lib/CodeMirror-2.1/mode/javascript/javascript.js"></script>
+ <script src="codemirror-ui/lib/CodeMirror-2.1/mode/css/css.js"></script>
+ <script src="codemirror-ui/lib/CodeMirror-2.1/mode/xml/xml.js"></script>
+
+
+ <!-- Then the CodeMirrorUI stuff -->
+ <script src="codemirror-ui/js/codemirror-ui.js" type="text/javascript"></script>
+ <link rel="stylesheet" href="codemirror-ui/css/codemirror-ui.css" type="text/css" media="screen" />
+
+
+
+ <link rel="icon" href="img/ScmWebEditor_little.png" type="image/png">
+ <link rel="stylesheet" type="text/css" href="css/main.css">
+
+
+
+</head>
+<body onload="geresession(<%=request.getAttribute("InvalidateMaxTime")%>, 5);">
+ <a title="ScmWebEditor Project Website" target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="ScmWebEditor logo"/></a>
+
+ <center>
+ <h2>Welcome on SCMWebEditor</h2>
+ <%
+ String typeEditor="null";
+ if (request.getAttribute("format")!=null && request.getAttribute("format").equals("rst")){
+ %>
+ <h4>For any Problem with RestruturedText visit <a href="http://docutils.sourceforge.net/rst.html">RST documentation website</a>.</h4>
+ <% } %>
+ </center>
+
+
+ <form method="post" action=commit.action id="editForm">
+
+
+
+ <%
+ String valueTextarea;
+ if(request.getAttribute("lastText")!=null) {
+ valueTextarea = (String) request.getAttribute("lastText");
+ } else {
+ valueTextarea = (String) request.getAttribute("OrigText");
+ }
+
+
+ %>
+
+ <p>File in editor : <a href="<%=request.getAttribute("address")%>" ><%=request.getAttribute("address")%></a> </p>
+ <textarea id="newTextId" rows="50" cols="80" name="newText"><%=valueTextarea%></textarea>
+
+
+
+ <script type="text/javascript">
+ var textarea = document.getElementById('newTextId');
+ var uiOptions = { path : 'codemirror-ui/js/', searchMode : 'inline' }
+ var codeMirrorOptions = { mode: "null" }
+ var editor = new CodeMirrorUI(textarea,uiOptions,codeMirrorOptions);
+ </script>
+
+
+ <label>Language :
+ <select id="language" name="langageSelection" onchange="changeModeBy(editor,this)">
+ <option value="null">Text</option>
+ <option value="rst">ReStructuredText</option>
+ <option value="javascript">Javascript</option>
+ <option value="text/html">HTML</option>
+ <option value="xml">XML</option>
+ <option value="text/x-java">JAVA</option>
+ </select>
+ </label>
+
+
+
+ <script type='text/javascript'>
+ selectLanguage('<%=((String) request.getAttribute("minetype"))%>','<%=request.getAttribute("format")%>' );
+ changeModeBy(editor, document.getElementById('language'));
+ </script>
+
+
+ <script type="text/javascript">
+ function loadChange(){
+ document.getElementById('newTextId').value = editor.mirror.getValue();
+ }
+ </script>
+
+
+
+ <script src="js/gereSession.js" type="text/javascript"></script>
+ <script src="js/cancelRedirect.js" type="text/javascript"></script>
+ <script src="js/pictureUpload.js" type="text/javascript"></script>
+ <noscript><h4>Javascript is not activated. You can't only use Save and Quit or Reset button.</h4></noscript>
+ <noscript><h4>For a better use of SCMWebEditor please activate JavaScript.</h4></noscript>
+
+ <div id="form">
+
+ <div id="htmlcontentCommit"></div>
+
+ <label>Commit Message: <input type="text" name="commitMessage" title="Let a commit message with this file."/></label>
+
+ <%if (request.getAttribute("IsLogin").equals(false) == true){
+ %>
+ <%if (request.getAttribute("badLogin")!=null && request.getAttribute("badLogin").equals(true)) { %>
+ <p>
+ <font color="red">
+ Bad username or password
+ </font>
+ </p>
+ <% } %>
+ <p>
+
+ <label ACCESSKEY=U>User name: <input TYPE=text NAME=username SIZE=12 title="Commit Username."/></label>
+ <label ACCESSKEY=P>Password: <input TYPE=password NAME=pw SIZE=12 title="Commit Password."/></label> </p><%
+ } else {
+ %><p>You are log as: <%=request.getAttribute("Login")%></p>
+ <input type="hidden" NAME=username />
+ <input type="hidden" NAME=pw /><%
+ }%>
+ <input type="hidden" name="address" value="<%=request.getAttribute("address")%>"/>
+ <input type="hidden" name="origText" value="<%=request.getAttribute("OrigText")%>"/>
+ <% if(request.getAttribute("lastText")!=null) { %>
+ <input type="hidden" name="lastText" value="<%=request.getAttribute("lastText")%>" />
+ <% } %>
+ <input type="hidden" name="scmEditorUrl" value="<%=request.getAttribute("scmEditorUrl")%>"/>
+
+ <s:url id="ajaxCommit" value="save.action" />
+
+ <sj:submit onclick="loadChange()"
+ id="ajaxSaveButton"
+ formIds="editForm"
+ targets="htmlcontentCommit"
+ href="%{ajaxCommit}"
+ indicator="indicator"
+ button="true"
+ buttonIcon="ui-icon-refresh"
+ value="Save and Continue Editing"
+ title="Commit modifications and continue editing the file"
+ >
+ </sj:submit>
+
+ <input title="Save this file and go back to previous page." type="submit" value="Save and Quit" name="Save"/>
+
+ <%if (request.getAttribute("format")!=null && request.getAttribute("format")!=null && request.getAttribute("format").equals("rst") == true){
+ %>
+ <s:url id="ajaxPreview" value="preview.action" />
+
+ <sj:submit onclick="loadChange()"
+ id="ajaxPreviewButton"
+ formIds="editForm"
+ targets="htmlcontentPreview"
+ href="%{ajaxPreview}"
+ button="true"
+ buttonIcon="ui-icon-refresh"
+ value="Preview"
+ >
+ </sj:submit>
+
+ <%}%>
+
+ <sj:submit
+ title="Go back to the last revision of the file"
+ id="resetButton"
+ targets="resetResult"
+ value="Reset"
+ button="true"
+ href="reset.action"
+ />
+ <div id="resetResult"></div>
+
+ <!-- <input title="Reset text as current repository HEAD revision." type="reset" value="Reset" name="Reset" /> -->
+ <input type="hidden" value="<%=request.getAttribute("ProjectUrl")%>" name="ProjectUrl">
+ <input title="Exit ScmWebEditor without saving." type="button" value="Exit" name="Cancel" onclick="javascript:cancelRedirect(this.form.ProjectUrl);"/>
+
+
+ <br/>
+
+ </div>
+ </form>
+ <center>
+ <button title="Upload a file on the repository" onClick="javascript:upload_popup('doUpload.action','upload');" >Upload</button>
+ </center>
+
+ <div>
+
+
+ </div>
+
+
+ <!--
+ <div id="uploadFormId" >
+ <s:form method="POST" id="uploadForm" action="uploadFile" enctype="multipart/form-data">
+
+
+ <label>Upload a picture : <input type="file" name="upload"/></label><br/>
+ <label>Path on svn : <input type="text" name="svnPath" /></label><br/>
+ <label>username : <input type="text" name="username" /></label><br/>
+ <label>password : <input type="password" name="pw" /></label><br/>
+
+ <sj:submit
+ id="ajaxUploadButton"
+ targets="targetContentUpload"
+ button="true"
+ value="upload"
+ >
+ </sj:submit>
+
+ </s:form>
+ </div>
+ -->
+
+ <div id="targetContentUpload"></div>
+
+
+ <div id="htmlcontentPreview"></div>
+
+
+ <p align="right">©2004-2009 CodeLutin</p>
+</body>
+</html>
Added: trunk/src/main/webapp/WEB-INF/content/outConnection.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/outConnection.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/outConnection.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,67 @@
+<%-- Document : OutConnection Created on : 6 oct. 2009, 12:07:27 Author: glorieux --%>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+ <%@ taglib prefix="s" uri="/struts-tags"%>
+ <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
+ <%@ taglib prefix="sjt" uri="/struts-jquery-tree-tags" %>
+ <sj:head jquerytheme="default"/>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<link rel="icon" href="img/ScmWebEditor_little.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="css/main.css">
+<title>SCM Web Editor</title>
+</head>
+<body>
+<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
+<center>
+<h2>Welcome on SCMWebEditor</h2>
+<noscript><h4>Javascript is not activated. Please activate it for a fully use of ScmWebEditor.</h4></noscript>
+<h4>
+Please complete this form for application using.
+</h4>
+</center>
+
+<form id="configForm" method="get" action="checkout.action">
+<center>
+ <p><label>SCM path: <input TYPE=text name="address" SIZE=100></label>
+
+ <s:url id="ajaxSearch" value="search.action" />
+
+ <sj:submit
+ id="ajaxSearchButton"
+ formIds="configForm"
+ targets="htmlcontentSearch"
+ href="%{ajaxSearch}"
+ indicator="indicator"
+ button="true"
+ buttonIcon="ui-icon-refresh"
+ value="Search"
+ >
+ </sj:submit>
+
+ <input type="submit" name="Save" />
+ </p>
+</center>
+<div id="htmlcontentSearch" ></div>
+</form>
+
+<!--
+ <div id="searchTree">
+
+ <s:url id="searchTreeUrl" action="search?address=http://localhost/scmsvn"/>
+
+ <sjt:tree id="svnTree"
+ jstreetheme="classic"
+ href="%{searchTreeUrl}"
+ onClickTopics="treeClicked"/>
+
+ </div>
+ -->
+
+<p align="right">©2004-2009 CodeLutin</p>
+</body>
+</html>
Added: trunk/src/main/webapp/WEB-INF/content/preview.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/preview.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/preview.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,10 @@
+ <%@ taglib prefix="s" uri="/struts-tags"%>
+ <%@page contentType="text/html" pageEncoding="UTF-8"%>
+ <%--Title and div for rst preview--%>
+ <h3 id="prevtitle" >Preview :</h3>
+
+ <div id="prev" title="Preview">
+ <div id="preview" >
+ <s:property value="XMLResponse" escapeHtml="false"/>
+ </div>
+ </div>
Added: trunk/src/main/webapp/WEB-INF/content/privateSvnRedirect.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/privateSvnRedirect.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/privateSvnRedirect.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,29 @@
+<%-- Document : PrivateSvnRedirect Created on : 30 sept. 2009, 14:05:43
+Author : glorieux --%> <%@page contentType="text/html"
+pageEncoding="UTF-8"%>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Private Scm</title>
+<link rel="icon" href="img/ScmWebEditor_little.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="css/main.css">
+</head>
+<body>
+<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
+<form method="post" action="checkout.action" >
+<input type="hidden" name="address" value="<%=request.getAttribute("address")%>"/>
+<input type="hidden" name="projectUrl" value="<%=request.getAttribute("projectUrl")%>"/>
+<script src="cancelRedirect.js"></script>
+<p>You try to access a Private SCM. Please login</p>
+<p><label ACCESSKEY=U>User name: <input TYPE=text
+ NAME=username SIZE=12></label> <label ACCESSKEY=P>Password: <input
+ TYPE=password NAME=pw SIZE=12></label></p>
+<input type="submit" value="Submit" name="Save" /> <input type="button"
+ value="Exit" name="Cancel"
+ onclick="cancelRedirect(this.form.projectUrl);" /></form>
+<p>©2004-2009 CodeLutin</p>
+</body>
+</html>
\ No newline at end of file
Added: trunk/src/main/webapp/WEB-INF/content/recall.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/recall.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/recall.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,13 @@
+<%-- Document : Recall Created on : 30 sept. 2009, 17:05:40 Author :
+glorieux --%> <%@page contentType="text/html" pageEncoding="UTF-8"%>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Redirect...</title>
+<meta http-equiv="Refresh" content="0; url=
+<%=request.getAttribute("Redirect_url")%>">
+</head>
+</html>
Added: trunk/src/main/webapp/WEB-INF/content/redirect.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/redirect.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/redirect.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,23 @@
+<%-- Document : Redirect Created on : 10 sept. 2009, 13:43:11 Author :
+glorieux --%> <%@page contentType="text/html" pageEncoding="UTF-8"%>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Redirection...</title>
+<link rel="icon" href="img/ScmWebEditor_little.png" type="image/png">
+<link rel="stylesheet" type="text/css" href="css/main.css">
+<meta http-equiv="Refresh" content="2; url=
+<%=request.getAttribute("Redirection_url")%>">
+</head>
+<body>
+<a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt" /></a>
+<p>Thank you using RSTEditor</p>
+<p>You should be transferred automatically to the new page. If not
+please <a href="<%=request.getAttribute("Redirection_url")%>">click
+this link</a>.</p>
+<p>©2004-2009 CodeLutin</p>
+</body>
+</html>
Added: trunk/src/main/webapp/WEB-INF/content/reset.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/reset.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/reset.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,12 @@
+<%@ taglib prefix="s" uri="/struts-tags"%>
+
+ <s:set name="lastRevision">
+ <s:property value="lastRevision"/>
+ </s:set>
+
+ <s:hidden id="valueOfLastRevision" value="%{lastRevision}" />
+ <script type="text/javascript">
+
+ editor.mirror.setValue(document.getElementById('valueOfLastRevision').value);
+
+ </script>
\ No newline at end of file
Added: trunk/src/main/webapp/WEB-INF/content/save.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/save.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/save.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,17 @@
+ <%@ taglib prefix="s" uri="/struts-tags"%>
+ <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
+
+
+
+ <s:if test="result=='authError'" >
+ <h4> <font color="red"> Bad username or password, can't save modification</font> </h4>
+ </s:if>
+ <s:elseif test="result=='error'" >
+ <h4> Can't save modification </h4>
+ </s:elseif>
+ <s:elseif test="result=='uselessSave'" >
+ <h4> It's useless to save the file, file is not modify</h4>
+ </s:elseif>
+ <s:else>
+ <h4>Last change save <s:property value="formatDate" /> </h4>
+ </s:else>
\ No newline at end of file
Added: trunk/src/main/webapp/WEB-INF/content/search.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/search.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/search.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,49 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+<%@page import="org.nuiton.scmwebeditor.actions.SearchAction"%>
+<%@page import="java.util.LinkedList" %>
+<%@page import="java.util.Iterator" %>
+
+
+ <%@ taglib prefix="s" uri="/struts-tags"%>
+ <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
+ <%@ taglib prefix="sjt" uri="/struts-jquery-tree-tags" %>
+
+ <sj:head debug="true" jquerytheme="default"/>
+
+<script>
+$.subscribe('treeClicked', function(event, data) {
+ var item = event.originalEvent.data.rslt.obj;
+
+ if(item.text().indexOf("/") == -1) {
+ document.location.href=("checkout.action?address="+item.attr("id"));
+ }
+
+});
+
+</script>
+
+ <div id="searchTree">
+ <s:set name="address">
+ <s:property value="address"/>
+ </s:set>
+ <s:set name="username">
+ <s:property value="username"/>
+ </s:set>
+ <s:set name="pw">
+ <s:property value="pw"/>
+ </s:set>
+
+
+ <s:url id="searchTreeUrl" action="search?address=%{address}&username=%{username}&pw=%{pw}" />
+ <sjt:tree id="svnTree"
+ htmlTitles="true"
+ jstreetheme="classic"
+ href="%{searchTreeUrl}"
+ onClickTopics="treeClicked"
+ />
+
+ </div>
+
+ <s:label name="error"></s:label>
+
Added: trunk/src/main/webapp/WEB-INF/content/upload.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/upload.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/upload.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,14 @@
+<%@ taglib prefix="s" uri="/struts-tags"%>
+
+<p>Result : </p>
+
+
+ <s:if test="badLogin">
+ <p><font color="red">Bad username or password</font></p>
+ </s:if>
+ <s:elseif test="error">
+ <p><font color="red">Erreur SVN</font></p>
+ </s:elseif>
+ <s:else>
+ <p>File upload successful</p>
+ </s:else>
\ No newline at end of file
Added: trunk/src/main/webapp/WEB-INF/content/uploadForm.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/uploadForm.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/uploadForm.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,28 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+ <%@ taglib prefix="s" uri="/struts-tags"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>UploadFile</title>
+</head>
+<body>
+
+ <form method="POST" id="uploadForm" action="doUpload" enctype="multipart/form-data">
+ <label>Upload a picture : <input type="file" name="upload"/></label><br/>
+ <label>Path on svn : <input type="text" name="svnPath" /></label><br/>
+ <label>username : <input type="text" name="username" /></label><br/>
+ <label>password : <input type="password" name="pw" /></label><br/>
+
+ <s:if test="badLogin">
+ <p><font color="red">Bad username or password</font></p>
+ </s:if>
+ <s:elseif test="error">
+ <p><font color="red">Erreur SVN</font></p>
+ </s:elseif>
+ <input type="submit"/>
+ </form>
+
+</body>
+</html>
\ No newline at end of file
Added: trunk/src/main/webapp/WEB-INF/content/uploadSuccess.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/content/uploadSuccess.jsp (rev 0)
+++ trunk/src/main/webapp/WEB-INF/content/uploadSuccess.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,15 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Success</title>
+</head>
+<body>
+<p>File upload successful</p>
+ <form>
+ <input type="button" value="close" onclick="window.close()">
+ </form>
+</body>
+</html>
\ No newline at end of file
Modified: trunk/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/src/main/webapp/WEB-INF/web.xml 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/WEB-INF/web.xml 2011-07-12 12:40:41 UTC (rev 171)
@@ -15,7 +15,7 @@
<welcome-file-list>
- <welcome-file>index.jsp</welcome-file>
+ <welcome-file>/WEB-INF/content/index.jsp</welcome-file>
</welcome-file-list>
<listener>
Deleted: trunk/src/main/webapp/accueil.jsp
===================================================================
--- trunk/src/main/webapp/accueil.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/accueil.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,3 +0,0 @@
-<%@ page contentType="text/html; charset=UTF-8" %>
-
- <p>Parametres detectés</p>
Deleted: trunk/src/main/webapp/cancelRedirect.js
===================================================================
--- trunk/src/main/webapp/cancelRedirect.js 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/cancelRedirect.js 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,11 +0,0 @@
-/**
- * @author geoffroy lorieux
- */
-
-
-function cancelRedirect(url)
- {
- if (confirm("Exit SCMWebEditor ?")){
- window.location.replace(url.value);
- }
- }
\ No newline at end of file
Deleted: trunk/src/main/webapp/index.jsp
===================================================================
--- trunk/src/main/webapp/index.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/index.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,3 +0,0 @@
-<%
-response.sendRedirect("checkout.action");
-%>
\ No newline at end of file
Added: trunk/src/main/webapp/js/cancelRedirect.js
===================================================================
--- trunk/src/main/webapp/js/cancelRedirect.js (rev 0)
+++ trunk/src/main/webapp/js/cancelRedirect.js 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,11 @@
+/**
+ * @author geoffroy lorieux
+ */
+
+
+function cancelRedirect(url)
+ {
+ if (confirm("Exit SCMWebEditor ?")){
+ window.location.replace(url.value);
+ }
+ }
\ No newline at end of file
Added: trunk/src/main/webapp/js/gereSession.js
===================================================================
--- trunk/src/main/webapp/js/gereSession.js (rev 0)
+++ trunk/src/main/webapp/js/gereSession.js 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,41 @@
+/**
+ * @author geoffroy lorieux
+ */
+
+function rappelSession(minutes)
+{
+ var msg='Your session expire on '+minutes+' minute';
+ if(minutes>1)
+ {
+ msg+='s';
+ }
+ msg+='.\nDo you want to reload this page ?(You will not lose your data)';
+
+ if(confirm(msg))
+ {
+ location.reload();
+ }
+}
+
+/**
+ * affiche une alerte sur l'expiration de la session et redirige vers une autre page
+ */
+function expirationSession()
+{
+ alert("Your session has expire. Please relogin");
+ window.history.back(-1);
+}
+
+/**
+ * affiche des avertissements sur le délai d'expiration de la session :
+ * - un premier au bout de (expiration-rappel) minutes (par ex. : 20-3 = 17 minutes)
+ * - un second au bout de (expiration) minutes (par ex. : 20 minutes)
+ */
+function geresession(expiration, rappel)
+{
+ // affichage du rappel
+ var chronoRappel=setTimeout('rappelSession('+rappel+')', (expiration-rappel)*60*1000);
+
+ // une fois le rappel affiché, on avertit uniquement de l'expiration
+ var chronoExpiration=setTimeout('expirationSession()', (expiration)*60*1000);
+}
Added: trunk/src/main/webapp/js/pictureUpload.js
===================================================================
--- trunk/src/main/webapp/js/pictureUpload.js (rev 0)
+++ trunk/src/main/webapp/js/pictureUpload.js 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,4 @@
+function upload_popup(page, name)
+{
+window.open (page, name, config='top=300, left=300, height=300, width=500, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no')
+}
\ No newline at end of file
Added: trunk/src/main/webapp/js/selectLanguage.js
===================================================================
--- trunk/src/main/webapp/js/selectLanguage.js (rev 0)
+++ trunk/src/main/webapp/js/selectLanguage.js 2011-07-12 12:40:41 UTC (rev 171)
@@ -0,0 +1,92 @@
+/**
+ *
+ */
+
+
+function contains(text, test) {
+
+ if(text.indexOf(test) == -1) {
+ return false;
+ }
+ else {
+ return true;
+ }
+}
+
+
+
+function changeModeBy(CodeMirrorEditor, select){
+ CodeMirrorEditor.mirror.setOption("mode",select.value);
+}
+
+
+
+function selectLanguage(minetype, format) {
+
+ var typeEditor = null;
+
+ if(typeEditor==null && minetype!=null) {
+
+ if(contains(minetype, "rst") ) {
+ typeEditor="rst";
+ document.getElementById('language').selectedIndex=1
+ }
+ else if(contains(minetype, "javascript")) {
+ typeEditor="javascript";
+ document.getElementById('language').selectedIndex=2
+ }
+ else if(contains(minetype, "html") ) {
+ typeEditor="text/html";
+
+
+ document.getElementById('language').selectedIndex=3
+
+
+ }
+ else if( contains(minetype, "xml") ) {
+ typeEditor="xml";
+
+
+ document.getElementById('language').selectedIndex=4
+
+
+ }
+ }
+
+ if (typeEditor==null && format!=null){
+
+
+ if (format==("rst")) {
+ typeEditor="rst";
+
+
+ document.getElementById('language').selectedIndex=1
+// var element = document.getElementById('language');
+// element.value = "rst";
+
+ } else if(format==("javascript")) {
+ typeEditor="javascript";
+
+ document.getElementById('language').selectedIndex=2
+
+ } else if(format==("html")) {
+ typeEditor="text/html";
+
+ document.getElementById('language').selectedIndex=3
+
+ } else if(format==("xml")) {
+ typeEditor="xml";
+
+ document.getElementById('language').selectedIndex=4
+
+ } else if(format==("java")) {
+ typeEditor="text/x-java";
+
+ document.getElementById('language').selectedIndex=5
+
+ }
+
+ }
+
+
+}
\ No newline at end of file
Deleted: trunk/src/main/webapp/pictureUpload.js
===================================================================
--- trunk/src/main/webapp/pictureUpload.js 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/pictureUpload.js 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,4 +0,0 @@
-function upload_popup(page, name)
-{
-window.open (page, name, config='top=300, left=300, height=300, width=500, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no')
-}
\ No newline at end of file
Deleted: trunk/src/main/webapp/reset.jsp
===================================================================
--- trunk/src/main/webapp/reset.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/reset.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,12 +0,0 @@
-<%@ taglib prefix="s" uri="/struts-tags"%>
-
- <s:set name="lastRevision">
- <s:property value="lastRevision"/>
- </s:set>
-
- <s:hidden id="valueOfLastRevision" value="%{lastRevision}" />
- <script type="text/javascript">
-
- editor.mirror.setValue(document.getElementById('valueOfLastRevision').value);
-
- </script>
\ No newline at end of file
Deleted: trunk/src/main/webapp/selectLanguage.js
===================================================================
--- trunk/src/main/webapp/selectLanguage.js 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/selectLanguage.js 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,92 +0,0 @@
-/**
- *
- */
-
-
-function contains(text, test) {
-
- if(text.indexOf(test) == -1) {
- return false;
- }
- else {
- return true;
- }
-}
-
-
-
-function changeModeBy(CodeMirrorEditor, select){
- CodeMirrorEditor.mirror.setOption("mode",select.value);
-}
-
-
-
-function selectLanguage(minetype, format) {
-
- var typeEditor = null;
-
- if(typeEditor==null && minetype!=null) {
-
- if(contains(minetype, "rst") ) {
- typeEditor="rst";
- document.getElementById('language').selectedIndex=1
- }
- else if(contains(minetype, "javascript")) {
- typeEditor="javascript";
- document.getElementById('language').selectedIndex=2
- }
- else if(contains(minetype, "html") ) {
- typeEditor="text/html";
-
-
- document.getElementById('language').selectedIndex=3
-
-
- }
- else if( contains(minetype, "xml") ) {
- typeEditor="xml";
-
-
- document.getElementById('language').selectedIndex=4
-
-
- }
- }
-
- if (typeEditor==null && format!=null){
-
-
- if (format==("rst")) {
- typeEditor="rst";
-
-
- document.getElementById('language').selectedIndex=1
-// var element = document.getElementById('language');
-// element.value = "rst";
-
- } else if(format==("javascript")) {
- typeEditor="javascript";
-
- document.getElementById('language').selectedIndex=2
-
- } else if(format==("html")) {
- typeEditor="text/html";
-
- document.getElementById('language').selectedIndex=3
-
- } else if(format==("xml")) {
- typeEditor="xml";
-
- document.getElementById('language').selectedIndex=4
-
- } else if(format==("java")) {
- typeEditor="text/x-java";
-
- document.getElementById('language').selectedIndex=5
-
- }
-
- }
-
-
-}
\ No newline at end of file
Deleted: trunk/src/main/webapp/upload.jsp
===================================================================
--- trunk/src/main/webapp/upload.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/upload.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,14 +0,0 @@
-<%@ taglib prefix="s" uri="/struts-tags"%>
-
-<p>Result : </p>
-
-
- <s:if test="badLogin">
- <p><font color="red">Bad username or password</font></p>
- </s:if>
- <s:elseif test="error">
- <p><font color="red">Erreur SVN</font></p>
- </s:elseif>
- <s:else>
- <p>File upload successful</p>
- </s:else>
\ No newline at end of file
Deleted: trunk/src/main/webapp/uploadForm.jsp
===================================================================
--- trunk/src/main/webapp/uploadForm.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/uploadForm.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,28 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=UTF-8"
- pageEncoding="UTF-8"%>
- <%@ taglib prefix="s" uri="/struts-tags"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>UploadFile</title>
-</head>
-<body>
-
- <form method="POST" id="uploadForm" action="doUpload" enctype="multipart/form-data">
- <label>Upload a picture : <input type="file" name="upload"/></label><br/>
- <label>Path on svn : <input type="text" name="svnPath" /></label><br/>
- <label>username : <input type="text" name="username" /></label><br/>
- <label>password : <input type="password" name="pw" /></label><br/>
-
- <s:if test="badLogin">
- <p><font color="red">Bad username or password</font></p>
- </s:if>
- <s:elseif test="error">
- <p><font color="red">Erreur SVN</font></p>
- </s:elseif>
- <input type="submit"/>
- </form>
-
-</body>
-</html>
\ No newline at end of file
Deleted: trunk/src/main/webapp/uploadSuccess.jsp
===================================================================
--- trunk/src/main/webapp/uploadSuccess.jsp 2011-07-08 10:23:16 UTC (rev 170)
+++ trunk/src/main/webapp/uploadSuccess.jsp 2011-07-12 12:40:41 UTC (rev 171)
@@ -1,15 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=UTF-8"
- pageEncoding="UTF-8"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Success</title>
-</head>
-<body>
-<p>File upload successful</p>
- <form>
- <input type="button" value="close" onclick="window.close()">
- </form>
-</body>
-</html>
\ No newline at end of file
1
0
r170 - in trunk/src/main: java/org/nuiton/scmwebeditor/actions webapp
by kcardineaud@users.nuiton.org 08 Jul '11
by kcardineaud@users.nuiton.org 08 Jul '11
08 Jul '11
Author: kcardineaud
Date: 2011-07-08 12:23:16 +0200 (Fri, 08 Jul 2011)
New Revision: 170
Url: http://nuiton.org/repositories/revision/scmwebeditor/170
Log:
Fix a problem with encoding of preview
Modified:
trunk/src/main/java/org/nuiton/scmwebeditor/actions/PreviewAction.java
trunk/src/main/webapp/ModificationViewer.jsp
trunk/src/main/webapp/Preview.jsp
Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/PreviewAction.java
===================================================================
--- trunk/src/main/java/org/nuiton/scmwebeditor/actions/PreviewAction.java 2011-07-08 07:40:02 UTC (rev 169)
+++ trunk/src/main/java/org/nuiton/scmwebeditor/actions/PreviewAction.java 2011-07-08 10:23:16 UTC (rev 170)
@@ -59,24 +59,23 @@
if(log.isDebugEnabled()) {
log.debug(newText);
}
-
+ XMLResponse="";
//Using jrst for generate html document
try {
XMLResponse = JRST.generate(JRST.TYPE_HTML, newText);
if(log.isDebugEnabled()) {
log.debug("RST generate");
}
+
} catch (Exception eee) {
if(log.isWarnEnabled()) {
log.warn("RST generate fail",eee);
}
- XMLResponse = "<h4>Parsing error, please read RST specification<h4>";
+ XMLResponse = "<h4>Parsing érror, please read RST specification<h4>";
return;
}
-
-
}
static public PreviewAction getAction() {
Modified: trunk/src/main/webapp/ModificationViewer.jsp
===================================================================
--- trunk/src/main/webapp/ModificationViewer.jsp 2011-07-08 07:40:02 UTC (rev 169)
+++ trunk/src/main/webapp/ModificationViewer.jsp 2011-07-08 10:23:16 UTC (rev 170)
@@ -10,7 +10,7 @@
<html>
<head>
<title>SCMWebEditor</title>
-
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script src="selectLanguage.js"></script>
@@ -41,7 +41,7 @@
<link rel="icon" href="img/ScmWebEditor_little.png" type="image/png">
<link rel="stylesheet" type="text/css" href="css/main.css">
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+
</head>
Modified: trunk/src/main/webapp/Preview.jsp
===================================================================
--- trunk/src/main/webapp/Preview.jsp 2011-07-08 07:40:02 UTC (rev 169)
+++ trunk/src/main/webapp/Preview.jsp 2011-07-08 10:23:16 UTC (rev 170)
@@ -1,5 +1,5 @@
<%@ taglib prefix="s" uri="/struts-tags"%>
-
+ <%@page contentType="text/html" pageEncoding="UTF-8"%>
<%--Title and div for rst preview--%>
<h3 id="prevtitle" >Preview :</h3>
1
0