r236 - in trunk/src/main: java/org/nuiton/scmwebeditor/actions resources webapp/WEB-INF/content webapp/css webapp/img/editor
Author: kcardineaud Date: 2011-08-19 17:43:34 +0200 (Fri, 19 Aug 2011) New Revision: 236 Url: http://nuiton.org/repositories/revision/scmwebeditor/236 Log: #261 Improve user interface - Add a new theme Added: trunk/src/main/webapp/css/uploadForm.css trunk/src/main/webapp/img/editor/head.png trunk/src/main/webapp/img/editor/save-quit-hover.png trunk/src/main/webapp/img/editor/save-quit-hover2.png trunk/src/main/webapp/img/editor/save-quit.png Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/ResetAction.java trunk/src/main/resources/log4j.properties trunk/src/main/webapp/WEB-INF/content/modificationViewer.jsp trunk/src/main/webapp/WEB-INF/content/save.jsp trunk/src/main/webapp/WEB-INF/content/uploadForm.jsp trunk/src/main/webapp/css/main.css Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/ResetAction.java =================================================================== --- trunk/src/main/java/org/nuiton/scmwebeditor/actions/ResetAction.java 2011-08-19 13:23:31 UTC (rev 235) +++ trunk/src/main/java/org/nuiton/scmwebeditor/actions/ResetAction.java 2011-08-19 15:43:34 UTC (rev 236) @@ -73,8 +73,8 @@ this.pw = pw; } - public void getErreur(String error) { - this.error = error; + public String getError() { + return error; } Modified: trunk/src/main/resources/log4j.properties =================================================================== --- trunk/src/main/resources/log4j.properties 2011-08-19 13:23:31 UTC (rev 235) +++ trunk/src/main/resources/log4j.properties 2011-08-19 15:43:34 UTC (rev 236) @@ -49,7 +49,7 @@ #log4j.appender.rolling.layout.ConversionPattern=%d{yyyy/MM/dd hh:mm:ss} %5p (%F:%L) %m%n # package level -#log4j.logger.org.nuiton.scmwebeditor.actions=DEBUG +#log4j.logger.org.nuiton.scmwebeditor.actions.SaveAction=DEBUG #log4j.logger.org.chorem.jtimer=DEBUG #log4j.logger.org.chorem.jtimer.ws=DEBUG Modified: trunk/src/main/webapp/WEB-INF/content/modificationViewer.jsp =================================================================== --- trunk/src/main/webapp/WEB-INF/content/modificationViewer.jsp 2011-08-19 13:23:31 UTC (rev 235) +++ trunk/src/main/webapp/WEB-INF/content/modificationViewer.jsp 2011-08-19 15:43:34 UTC (rev 236) @@ -66,9 +66,12 @@ <!-- 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" /> + + + <script src="js/cancelRedirect.js" type="text/javascript"></script> + <script src="js/pictureUpload.js" type="text/javascript"></script> - <link rel="icon" href="img/ScmWebEditor_little.png" type="image/png"> <link rel="stylesheet" type="text/css" href="css/main.css"> @@ -76,21 +79,183 @@ </head> <body> - <a title="ScmWebEditor Project Website" target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img width="150" height="120" src="img/editor/machine-a-ecrire.png" alt="ScmWebEditor logo"/></a> +<div id="wrapper"> + + <form method="POST" action="commit.action" id="editForm"> + + <div id="head"> +<!-- <a title="ScmWebEditor Project Website" target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img width="200" height="160" src="img/editor/machine-a-ecrire.png" alt="ScmWebEditor logo"/></a> --> - <center> - <h2><s:text name="scm.welcome"/></h2> + <h2 id="editorTitle" >SCMWebEditor</h2> + + +<!-- authentification --> + <div id="headLogin"> + + <div id="authDiv"> + <h3>Connexion</h3> + + <s:if test="username==null || pw==null" > + <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> + + <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}" /> + + </s:if> + <s:else > + <s:text name="scm.logAs" /> <s:property value="username" /> <br/> + </s:else> + + <div id="htmlcontentCommit"> + <%if (request.getAttribute("badLogin")!=null && request.getAttribute("badLogin").equals(true)) { %> + <p> + <font color="red"> + <s:text name="scm.badUsernameOrPassword"/> + </font> + </p> + <%} %> + </div> + + + </div> + + + <noscript> + <s:set id="scm.saveAndQuitTitle"> + <s:text name="scm.saveAndQuitTitle"/> + </s:set> + <s:submit + value="commit" + title="%{scm.saveAndQuitTitle}" + name="Save" + /> + </noscript> + + <div id="buttonList" > + + <!--BEGIN Save and continue --> + <s:url id="ajaxCommit" value="save.action" /> + + <s:set id="scm.saveAndContinueTitle"> + <s:text name="scm.saveAndContinueTitle"/> + </s:set> + <sj:a + onclick="loadChange()" + id="ajaxSaveButton" + formIds="editForm" + targets="htmlcontentCommit" + href="%{ajaxCommit}" + title="%{scm.saveAndContinueTitle}" + > + <div id="saveButton" ></div> + </sj:a> + <!--END Save and continue --> + + <!--BEGIN preview --> + <%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:a onclick="loadChange()" + id="ajaxPreviewButton" + formIds="editForm" + targets="htmlcontentPreview" + href="%{ajaxPreview}" + title="%{scm.preview}" + + > + <div id="previewButton" ></div> + </sj:a> + + <%}%> + <!--END preview --> + + <!--BEGIN reset --> + + <s:set id="scm.resetTitle"> + <s:text name="scm.resetTitle"/> + </s:set> + <sj:a + title="%{scm.resetTitle}" + formIds="editForm" + id="resetButton" + targets="htmlcontentCommit" + href="reset.action" + > + <div id="resetButton" ></div> + </sj:a> + + <!--END reset --> + + <!-- BEGIN save and exit --> + <s:set id="scm.saveAndQuitTitle"> + <s:text name="scm.saveAndQuitTitle"/> + </s:set> + + <s:a + href="javascript:document.getElementById('editForm').submit();" + title="%{scm.saveAndQuitTitle}" + name="Save" + > + <div id="saveAndQuitButton" ></div> + </s:a> + + <!-- END save and exit --> + + <!-- BEGIN exit --> + + <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:a + href="#" + title="%{scm.exitTitle}" + value="%{scm.exit}" + name="Cancel" + onclick="return cancelRedirect('%{scm.exitJavascript}',document.getElementById('ProjectUrl'));"> + <div id="exitButton" ></div> + </s:a> + + <!-- END exit --> + + </div> + </div> + + + + + </div> + + <% String typeEditor="null"; if (request.getAttribute("format")!=null && request.getAttribute("format").equals("rst")) { %> <h4><s:text name="scm.info.ProblemWithRst"/> <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html"><s:text name="scm.info.rstWebsite"/></a>.</h4> <% } %> - </center> + - <form method="POST" action="commit.action" id="editForm"> + <% if (request.getAttribute("format")!=null){ %> @@ -153,22 +318,13 @@ - <script src="js/cancelRedirect.js" type="text/javascript"></script> - <script src="js/pictureUpload.js" type="text/javascript"></script> + <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"> - <%if (request.getAttribute("badLogin")!=null && request.getAttribute("badLogin").equals(true)) { %> - <p> - <font color="red"> - <s:text name="scm.badUsernameOrPassword"/> - </font> - </p> - <%} %> - </div> + <s:set id="scm.commitMessage"> <s:text name="scm.commitMessage"/> @@ -180,30 +336,8 @@ <s:textarea cols="70" required="true" label="%{scm.commitMessage} " name="commitMessage" title="%{scm.commitMessageTitle}" ></s:textarea> <p> - <s:if test="username==null || pw==null" > - <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> - </s:if> - <s:else > - <s:text name="scm.logAs" /> <s:property value="username" /> <br/> - </s:else> + - - <input type="hidden" name="address" value="<%=request.getAttribute("address")%>"/> <input type="hidden" id="origText" name="origText" value="<%=request.getAttribute("OrigText")%>"/> <% if(request.getAttribute("lastText")!=null) { %> @@ -211,98 +345,22 @@ <% } %> <input type="hidden" name="scmEditorUrl" value="<%=request.getAttribute("scmEditorUrl")%>"/> - <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" - targets="htmlcontentCommit" - href="%{ajaxCommit}" - indicator="indicator" - button="true" - buttonIcon="ui-icon-refresh" - value="%{scm.saveAndContinue}" - title="%{scm.saveAndContinueTitle}" - > - </sj:submit> + - <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" - targets="htmlcontentPreview" - href="%{ajaxPreview}" - button="true" - buttonIcon="ui-icon-refresh" - 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="%{scm.resetTitle}" - formIds="editForm" - id="resetButton" - targets="resetResult" - value="%{scm.reset}" - button="true" - href="reset.action" - > - </sj:submit> - - <div id="resetResult"></div> - <% if(request.getAttribute("projectUrl")!=null) { %> - <input type="hidden" name="ProjectUrl" value="<%=request.getAttribute("projectUrl")%>" /> + <input type="hidden" id="ProjectUrl" value="<%=request.getAttribute("projectUrl")%>" /> <% } else { %> - <input type="hidden" name="ProjectUrl" value="checkout.action" /> + <input type="hidden" id="ProjectUrl" value="checkout.action" /> <% } %> - <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> @@ -355,10 +413,10 @@ <div id="targetContentUpload"></div> - + <div id="htmlcontentPreview"></div> - +</div> <p align="right">©2004-2009 CodeLutin</p> </body> </html> Modified: trunk/src/main/webapp/WEB-INF/content/save.jsp =================================================================== --- trunk/src/main/webapp/WEB-INF/content/save.jsp 2011-08-19 13:23:31 UTC (rev 235) +++ trunk/src/main/webapp/WEB-INF/content/save.jsp 2011-08-19 15:43:34 UTC (rev 236) @@ -28,14 +28,14 @@ <s:if test="result=='login'" > - <h4> <font color="red"><s:text name="scm.badUsernameOrPassword"/> <s:text name="scm.cannotSave"/></font> </h4> + <p> <font color="red"><s:text name="scm.badUsernameOrPassword"/><br/> <s:text name="scm.cannotSave"/></font> </p> </s:if> <s:elseif test="result=='error'" > - <h4> <s:text name="scm.cannotSave" /></h4> + <p> <s:text name="scm.cannotSave" /></p> </s:elseif> <s:elseif test="result=='errorRst'" > - <h4> <s:text name="scm.rstNotValidMessage" /> </h4> + <p> <s:text name="scm.rstNotValidMessage" /> </p> <s:url id="ajaxForceSave" action="save" /> <input type="hidden" name="force" value="true"/> @@ -58,7 +58,7 @@ </s:elseif> <s:elseif test="result=='fileModify'" > - <h4><s:text name="scm.fileModify" /> <s:text name="scm.by" /> <s:property value="headCommiter" /></h4> + <p><s:text name="scm.fileModify" /> <s:text name="scm.by" /> <s:property value="headCommiter" /></p> <s:set id="scm.showDiff" > <s:text name="scm.showDiff" /> @@ -91,15 +91,15 @@ </s:elseif> <s:elseif test="result=='errorPath'" > - <h4><s:text name="scm.cannotSave"/>, <s:text name="scm.pathError"/></h4> + <p><s:text name="scm.cannotSave"/>, <s:text name="scm.pathError"/></p> </s:elseif> <s:elseif test="result=='uselessSave'" > - <h4><s:text name="scm.uselessSave"/></h4> + <p><s:text name="scm.uselessSave"/></p> </s:elseif> <s:else> - <h4><s:text name="scm.lastChangeSave"/><s:property value="formatDate" /> </h4> + <p><s:text name="scm.lastChangeSave"/><s:property value="formatDate" /> </p> <s:set id="lastRevSet" value="newText" /> <s:hidden id="lastRev" value="%{lastRevSet}" /> <script type="text/javascript"> Modified: trunk/src/main/webapp/WEB-INF/content/uploadForm.jsp =================================================================== --- trunk/src/main/webapp/WEB-INF/content/uploadForm.jsp 2011-08-19 13:23:31 UTC (rev 235) +++ trunk/src/main/webapp/WEB-INF/content/uploadForm.jsp 2011-08-19 15:43:34 UTC (rev 236) @@ -37,9 +37,9 @@ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>UploadFile</title> <link rel="stylesheet" type="text/css" href="css/main.css"> +<link rel="stylesheet" type="text/css" href="css/uploadForm.css"> - </head> <body> @@ -59,10 +59,13 @@ <s:set id="scm.upload"> <s:text name="scm.upload"/> </s:set> - <center><h1><s:text name="%{scm.upload}" ></s:text></h1></center> + <form method="POST" id="uploadForm" action="doUpload.action" enctype="multipart/form-data"> + + <center><h1><s:text name="%{scm.upload}" ></s:text></h1></center> + <label><s:text name="scm.uploadFile" /> : <input type="file" name="upload"/></label><br/> <label><s:text name="scm.uploadPath" /> : <s:textfield size="50px" type="text" name="svnPath" id="svnPath" value="%{fileRoot}" /></label><br/> Modified: trunk/src/main/webapp/css/main.css =================================================================== --- trunk/src/main/webapp/css/main.css 2011-08-19 13:23:31 UTC (rev 235) +++ trunk/src/main/webapp/css/main.css 2011-08-19 15:43:34 UTC (rev 236) @@ -35,6 +35,10 @@ border:none; } +h3, p { + margin:0; +} + .wwlbl , .wwctrl { display:inline; } @@ -111,6 +115,119 @@ } +#wrapper { + background-image:url("../img/editor/head.png"); + background-repeat:no-repeat; +} + + +#head { + margin:auto; + height:190px; + background-image:url("../img/editor/machine-a-ecrire.png"); + background-repeat:no-repeat; + background-position:20px top; +} + +#headLogin { + position: relative; + bottom:31px; + left:556px; + margin:0; + background-image:url("../img/editor/post-it.png"); + background-repeat:no-repeat; + width:460px; + height:190px; +} + +#authDiv { + color:white; + float:right; + margin-right:30px; + text-align:center; + width:261px; +} + +#htmlcontentCommit { + height:77px +} + + +#buttonList { + width:170px; + height:32px; + position:relative; + left:169px; + top:147px; +} + + +/* Button */ + +#saveButton { + float:left; + background-image:url("../img/editor/save.png"); + height:33px; + width:33px; +} + +#saveButton:hover { + background-image:url("../img/editor/save-hover.png"); +} + +#previewButton { + float:left; + background-image:url("../img/editor/screen.png"); + height:33px; + width:33px; +} + +#previewButton:hover { + background-image:url("../img/editor/screen-hover.png"); +} + +#resetButton { + float:left; + background-image:url("../img/editor/recycle.png"); + height:33px; + width:33px; +} + +#resetButton:hover { + background-image:url("../img/editor/recycle-hover.png"); +} + +#saveAndQuitButton { + float:left; + background-image:url("../img/editor/save-quit.png"); + height:33px; + width:33px; +} + +#saveAndQuitButton:hover { + background-image:url("../img/editor/save-quit-hover.png"); +} + +#exitButton { + float:left; + background-image:url("../img/editor/shut-down.png"); + height:33px; + width:33px; +} + +#exitButton:hover { + background-image:url("../img/editor/shut-down-hover.png"); +} + +/* END Button */ + +#editorTitle { + margin:auto; + width:198px; + position:relative; + top:70px; +} + #uploadFormId { width:70%; margin:auto; @@ -119,6 +236,7 @@ text-align:left; } + .CodeMirror-scroll { height:500px; } Added: trunk/src/main/webapp/css/uploadForm.css =================================================================== --- trunk/src/main/webapp/css/uploadForm.css (rev 0) +++ trunk/src/main/webapp/css/uploadForm.css 2011-08-19 15:43:34 UTC (rev 236) @@ -0,0 +1,39 @@ +/* + * #%L + * ScmWebEditor + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ +@CHARSET "UTF-8"; + +body { + font-family: Verdana,Arial,Helvetica,sans-serif; + background-color: #b8b1b1; + width:700px; + margin:auto; +} + +#searchTree { + margin:auto; + display:block; + border : solid 1px black; + margin-right:15px; +} \ No newline at end of file Added: trunk/src/main/webapp/img/editor/head.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/webapp/img/editor/head.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/src/main/webapp/img/editor/save-quit-hover.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/webapp/img/editor/save-quit-hover.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/src/main/webapp/img/editor/save-quit-hover2.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/webapp/img/editor/save-quit-hover2.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/src/main/webapp/img/editor/save-quit.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/webapp/img/editor/save-quit.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream
participants (1)
-
kcardineaud@users.nuiton.org