branch develop updated (a6a25f3 -> ed7aad7)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository scmwebeditor. See http://git.nuiton.org/scmwebeditor.git from a6a25f3 Improve code quality new ed7aad7 Fix the "reset" feature The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit ed7aad7ff65c48f737680eaa888da20e6c1a2232 Author: Hugo PIGEON <hpigeon@codelutin.com> Date: Wed Jun 3 11:34:54 2015 +0200 Fix the "reset" feature Summary of changes: .../nuiton/scmwebeditor/uiweb/actions/ResetAction.java | 18 ++++++------------ .../main/webapp/WEB-INF/content/modificationViewer.jsp | 5 ++++- .../src/main/webapp/WEB-INF/content/outConnection.jsp | 2 +- .../webapp/WEB-INF/content/popups/createBranchForm.jsp | 2 +- .../WEB-INF/content/popups/createDirectoryForm.jsp | 2 +- .../webapp/WEB-INF/content/popups/moveFileForm.jsp | 2 +- .../WEB-INF/content/popups/removeDirectoryForm.jsp | 2 +- .../webapp/WEB-INF/content/popups/removeFileForm.jsp | 2 +- .../webapp/WEB-INF/content/popups/uploadFileForm.jsp | 2 +- .../main/webapp/WEB-INF/content/privateScmRedirect.jsp | 2 +- swe-ui-web/src/main/webapp/WEB-INF/content/reset.jsp | 3 ++- swe-ui-web/src/main/webapp/css/main.css | 4 ++-- 12 files changed, 22 insertions(+), 24 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository scmwebeditor. See http://git.nuiton.org/scmwebeditor.git commit ed7aad7ff65c48f737680eaa888da20e6c1a2232 Author: Hugo PIGEON <hpigeon@codelutin.com> Date: Wed Jun 3 11:34:54 2015 +0200 Fix the "reset" feature --- .../nuiton/scmwebeditor/uiweb/actions/ResetAction.java | 18 ++++++------------ .../main/webapp/WEB-INF/content/modificationViewer.jsp | 5 ++++- .../src/main/webapp/WEB-INF/content/outConnection.jsp | 2 +- .../webapp/WEB-INF/content/popups/createBranchForm.jsp | 2 +- .../WEB-INF/content/popups/createDirectoryForm.jsp | 2 +- .../webapp/WEB-INF/content/popups/moveFileForm.jsp | 2 +- .../WEB-INF/content/popups/removeDirectoryForm.jsp | 2 +- .../webapp/WEB-INF/content/popups/removeFileForm.jsp | 2 +- .../webapp/WEB-INF/content/popups/uploadFileForm.jsp | 2 +- .../main/webapp/WEB-INF/content/privateScmRedirect.jsp | 2 +- swe-ui-web/src/main/webapp/WEB-INF/content/reset.jsp | 3 ++- swe-ui-web/src/main/webapp/css/main.css | 4 ++-- 12 files changed, 22 insertions(+), 24 deletions(-) diff --git a/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/actions/ResetAction.java b/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/actions/ResetAction.java index 2e33065..51390f3 100644 --- a/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/actions/ResetAction.java +++ b/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/actions/ResetAction.java @@ -31,6 +31,7 @@ import org.nuiton.scmwebeditor.uiweb.ScmWebEditorConfig; import javax.naming.AuthenticationException; import java.io.File; import java.io.IOException; +import java.text.Normalizer; /** * Deletes all the changes made to the edited file @@ -87,19 +88,12 @@ public class ResetAction extends AbstractScmWebEditorAction { // getting the repository unique identifier if it is possible String repositoryId = scmConn.getRepositoryId(); if (repositoryId == null) { - repositoryId = address; - } - - if (username == null && pw == null) { - if (getScmSession().getUsername(repositoryId) != null && getScmSession().getPassword(repositoryId) != null) { - // getting the authntication information from the session - username = getScmSession().getUsername(repositoryId); - pw = getScmSession().getPassword(repositoryId); - } else { - username = null; - pw = null; - } + repositoryId = address.replace(' ', '_'); + repositoryId = Normalizer.normalize(repositoryId, Normalizer.Form.NFD).replaceAll("[\u0300-\u036F]", ""); } + String[] usernamePw = getUsernamePwFromSession(repositoryId, username, pw); + username = usernamePw[0]; + pw = usernamePw[1]; try { File originalFile = scmConn.getFileContent(address, username, pw); diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/modificationViewer.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/modificationViewer.jsp index cd7c0f8..516fcd4 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/modificationViewer.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/modificationViewer.jsp @@ -247,10 +247,11 @@ </s:set> <sj:a title="%{scm.resetTitle}" - formIds="editForm" + formIds="editForm,commitForm" id="resetButton" targets="htmlcontentCommit" href="reset.action" + onclick="document.getElementById('resetIndicator').style.display = 'inline';" > <div id="resetButton"></div> </sj:a> @@ -300,6 +301,8 @@ <!-- END exit --> + <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" class="indicator" id="resetIndicator"/> + </div> <!-- Buttons for the actions on the repository --> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/outConnection.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/outConnection.jsp index 8010540..37c6f0e 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/outConnection.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/outConnection.jsp @@ -119,7 +119,7 @@ > </sj:submit> - <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" id="loadingIndicator"/> + <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" class="indicator" id="loadingIndicator"/> </p> </center> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/popups/createBranchForm.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/popups/createBranchForm.jsp index 0a161b0..117a1e2 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/popups/createBranchForm.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/popups/createBranchForm.jsp @@ -71,7 +71,7 @@ <p><font color="red"><s:text name="scm.repoError"/></font></p> </s:elseif> <s:else> - <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" id="loadingIndicator"/> + <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" class="indicator" id="loadingIndicator"/> </s:else> <input type="submit" onclick="document.getElementById('loadingIndicator').style.display = 'block'"/> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/popups/createDirectoryForm.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/popups/createDirectoryForm.jsp index cdd7302..a8733f9 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/popups/createDirectoryForm.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/popups/createDirectoryForm.jsp @@ -123,7 +123,7 @@ <p><font color="red"><s:text name="scm.repoError"/></font></p> </s:elseif> <s:else> - <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" id="loadingIndicator"/> + <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" class="indicator" id="loadingIndicator"/> </s:else> <input type="submit" onclick="document.getElementById('loadingIndicator').style.display = 'block'"/> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/popups/moveFileForm.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/popups/moveFileForm.jsp index 9b36f7c..a9316b0 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/popups/moveFileForm.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/popups/moveFileForm.jsp @@ -148,7 +148,7 @@ <p><font color="red"><s:text name="scm.repoError"/></font></p> </s:elseif> <s:else> - <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" id="loadingIndicator"/> + <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" class="indicator" id="loadingIndicator"/> </s:else> <input type="submit" onclick="document.getElementById('loadingIndicator').style.display = 'block'"/> </form> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/popups/removeDirectoryForm.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/popups/removeDirectoryForm.jsp index 1a85629..06c8b7d 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/popups/removeDirectoryForm.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/popups/removeDirectoryForm.jsp @@ -130,7 +130,7 @@ <p><font color="red"><s:text name="scm.repoError"/></font></p> </s:elseif> <s:else> - <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" id="loadingIndicator"/> + <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" class="indicator" id="loadingIndicator"/> </s:else> <input type="submit"/> </form> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/popups/removeFileForm.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/popups/removeFileForm.jsp index 04a5b36..f1fe9ad 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/popups/removeFileForm.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/popups/removeFileForm.jsp @@ -131,7 +131,7 @@ <p><font color="red"><s:text name="scm.repoError"/></font></p> </s:elseif> <s:else> - <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" id="loadingIndicator"/> + <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" class="indicator" id="loadingIndicator"/> </s:else> <input type="submit"/> </form> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/popups/uploadFileForm.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/popups/uploadFileForm.jsp index a9ca7ad..930367a 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/popups/uploadFileForm.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/popups/uploadFileForm.jsp @@ -124,7 +124,7 @@ <p><font color="red"><s:text name="scm.repoError"/></font></p> </s:elseif> <s:else> - <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" id="loadingIndicator"/> + <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" class="indicator" id="loadingIndicator"/> </s:else> <input type="submit" onclick="document.getElementById('loadingIndicator').style.display = 'block'"/> </form> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/privateScmRedirect.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/privateScmRedirect.jsp index 7b05e6f..7ccf0b2 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/privateScmRedirect.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/privateScmRedirect.jsp @@ -78,7 +78,7 @@ <s:submit type="button" value="%{scm.exit}" name="exitLogin" onclick="return cancelRedirect('%{scm.exitJavascript}',document.getElementById('ProjectUrl'));"/> - <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" id="loadingIndicator"/> + <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" class="indicator" id="loadingIndicator"/> </form> <p>©2004-2015 CodeLutin</p> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/reset.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/reset.jsp index b3a2f1a..f8ad618 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/reset.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/reset.jsp @@ -36,7 +36,8 @@ <s:else> <script type="text/javascript"> - editor.setValue(document.getElementById('valueOfLastRevision').value); + document.getElementById("resetIndicator").style = "none"; + editor.mirror.setValue(document.getElementById('valueOfLastRevision').value); var numrev = "<s:property value="numRevision" />"; if (numrev != null) { diff --git a/swe-ui-web/src/main/webapp/css/main.css b/swe-ui-web/src/main/webapp/css/main.css index f5c6b5d..613fe13 100644 --- a/swe-ui-web/src/main/webapp/css/main.css +++ b/swe-ui-web/src/main/webapp/css/main.css @@ -222,7 +222,7 @@ ul.flags li { #buttonList { - width:170px; + width:200px; height:32px; position:relative; bottom:20px; @@ -455,7 +455,7 @@ ul.flags li { text-decoration: none; } -#loadingIndicator { +.indicator { display: none; } -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm