branch develop updated (62b4b1e -> 0592127)
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 62b4b1e The home page's field is now of URL type to avoid errors new 0592127 Apply the new editor's style to the image viewer 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 0592127d25bb49015297a42c7a73dac0f6b083dd Author: Hugo PIGEON <hpigeon@codelutin.com> Date: Fri Jun 12 18:02:47 2015 +0200 Apply the new editor's style to the image viewer Summary of changes: .../i18n/scmwebeditor-ui-web_en_GB.properties | 2 +- .../i18n/scmwebeditor-ui-web_fr_FR.properties | 2 +- .../main/webapp/WEB-INF/content/imageViewer.jsp | 397 ++++++++++++++------- .../webapp/WEB-INF/content/modificationViewer.jsp | 1 + .../src/main/webapp/WEB-INF/content/reset.jsp | 2 +- swe-ui-web/src/main/webapp/css/main.css | 4 +- swe-ui-web/src/main/webapp/js/editor.js | 12 - .../src/main/webapp/js/popin.js | 22 +- 8 files changed, 276 insertions(+), 166 deletions(-) copy swe-scm-api/src/main/java/org/nuiton/scmwebeditor/api/RepositoryNotFoundException.java => swe-ui-web/src/main/webapp/js/popin.js (67%) -- 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 0592127d25bb49015297a42c7a73dac0f6b083dd Author: Hugo PIGEON <hpigeon@codelutin.com> Date: Fri Jun 12 18:02:47 2015 +0200 Apply the new editor's style to the image viewer --- .../i18n/scmwebeditor-ui-web_en_GB.properties | 2 +- .../i18n/scmwebeditor-ui-web_fr_FR.properties | 2 +- .../main/webapp/WEB-INF/content/imageViewer.jsp | 397 ++++++++++++++------- .../webapp/WEB-INF/content/modificationViewer.jsp | 1 + .../src/main/webapp/WEB-INF/content/reset.jsp | 2 +- swe-ui-web/src/main/webapp/css/main.css | 4 +- swe-ui-web/src/main/webapp/js/editor.js | 12 - swe-ui-web/src/main/webapp/js/popin.js | 34 ++ 8 files changed, 300 insertions(+), 154 deletions(-) diff --git a/swe-ui-web/src/main/resources/i18n/scmwebeditor-ui-web_en_GB.properties b/swe-ui-web/src/main/resources/i18n/scmwebeditor-ui-web_en_GB.properties index 6b19237..df0755c 100644 --- a/swe-ui-web/src/main/resources/i18n/scmwebeditor-ui-web_en_GB.properties +++ b/swe-ui-web/src/main/resources/i18n/scmwebeditor-ui-web_en_GB.properties @@ -26,7 +26,6 @@ scm.createDirectoryTitle=Create a new directory on the repository scm.destinationDirectory=Destination directory\: scm.directories=Directories scm.directoryToRemove=Directory to remove\: -scm.displayedImage=Displayed image\: scm.edit=Edit scm.exit=Exit scm.exitJavascript=Exit ScmWebEditor? @@ -43,6 +42,7 @@ scm.forceSave=Force save scm.formTransferred=You should be transferred automatically to the form page. If not please scm.help=Help scm.homepage=the homepage +scm.image=Image\: scm.info.ProblemWithMd=For any problem with Markdown visit scm.info.ProblemWithRst=For any problem with RestructuredText visit scm.info.mdFile=Information about Markdown files diff --git a/swe-ui-web/src/main/resources/i18n/scmwebeditor-ui-web_fr_FR.properties b/swe-ui-web/src/main/resources/i18n/scmwebeditor-ui-web_fr_FR.properties index 5ab6372..af0120a 100644 --- a/swe-ui-web/src/main/resources/i18n/scmwebeditor-ui-web_fr_FR.properties +++ b/swe-ui-web/src/main/resources/i18n/scmwebeditor-ui-web_fr_FR.properties @@ -26,7 +26,6 @@ scm.createDirectoryTitle=Créer un nouveau répertoire sur le dépôt scm.destinationDirectory=Répertoire de destination \: scm.directories=Répertoires scm.directoryToRemove=Répertoire à supprimer \: -scm.displayedImage=Image affichée \: scm.edit=Édition scm.exit=Quitter scm.exitJavascript=Quitter ScmWebEditor ? @@ -43,6 +42,7 @@ scm.forceSave=Forcer la sauvegarde scm.formTransferred=Vous devriez être redirigé vers la page du formulaire. si non scm.help=Aide scm.homepage=la page d'accueil +scm.image=Image \: scm.info.ProblemWithMd=Si vous rencontrez des problèmes avec Markdown, visitez le scm.info.ProblemWithRst=Si vous rencontrez des problèmes avec RestructuredText, visitez le scm.info.mdFile=Information sur les fichiers Markdown diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/imageViewer.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/imageViewer.jsp index 7feb6f5..0ea9986 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/imageViewer.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/imageViewer.jsp @@ -38,8 +38,10 @@ <script src="js/popup.js" type="text/javascript"></script> <link rel="icon" href="img/edit-icon.png" type="image/png"> + <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> <link rel="stylesheet" type="text/css" href="css/main.css"> + <script type="text/javascript" src="js/popin.js"></script> <script type="text/javascript" src="js/editor.js"></script> <script type="text/javascript"> @@ -80,166 +82,287 @@ <div id="head"> -<div id="flagEdit"> - - <ul class="flags"> - <li> - <s:if - test="%{#session['WW_TRANS_I18N_LOCALE'] != null && #session['WW_TRANS_I18N_LOCALE'].language == 'en'}"> - <img src="img/flag-i18n-uk.png"/> - </s:if> - <s:else> - <s:a action="edit.action" namespace="/"> - <s:param name="address"><s:property value="address"/></s:param> - <s:param name="scmType"><s:property value="scmType"/></s:param> - <s:param name="selectedBranch"><s:property value="selectedBranch"/></s:param> - <s:param name="repositoryRoot"><s:property value="repositoryRoot"/></s:param> - <s:param name="request_locale">en_GB</s:param> + <div id="flagEdit"> + + <ul class="flags"> + <li> + <s:if + test="%{#session['WW_TRANS_I18N_LOCALE'] != null && #session['WW_TRANS_I18N_LOCALE'].language == 'en'}"> <img src="img/flag-i18n-uk.png"/> - </s:a> - </s:else> - </li> - <li> - <s:if - test="%{#session['WW_TRANS_I18N_LOCALE'] == null || #session['WW_TRANS_I18N_LOCALE'].language == 'fr'}"> - <img src="img/flag-i18n-fr.png"/> - </s:if> - <s:else> - <s:a action="edit.action" namespace="/"> - <s:param name="address"><s:property value="address"/></s:param> - <s:param name="scmType"><s:property value="scmType"/></s:param> - <s:param name="selectedBranch"><s:property value="selectedBranch"/></s:param> - <s:param name="repositoryRoot"><s:property value="repositoryRoot"/></s:param> - <s:param name="request_locale">fr_FR</s:param> + </s:if> + <s:else> + <s:a action="edit.action" namespace="/"> + <s:param name="address"><s:property value="address"/></s:param> + <s:param name="scmType"><s:property value="scmType"/></s:param> + <s:param name="selectedBranch"><s:property value="selectedBranch"/></s:param> + <s:param name="repositoryRoot"><s:property value="repositoryRoot"/></s:param> + <s:param name="request_locale">en_GB</s:param> + <img src="img/flag-i18n-uk.png"/> + </s:a> + </s:else> + </li> + <li> + <s:if + test="%{#session['WW_TRANS_I18N_LOCALE'] == null || #session['WW_TRANS_I18N_LOCALE'].language == 'fr'}"> <img src="img/flag-i18n-fr.png"/> - </s:a> - </s:else> - </li> + </s:if> + <s:else> + <s:a action="edit.action" namespace="/"> + <s:param name="address"><s:property value="address"/></s:param> + <s:param name="scmType"><s:property value="scmType"/></s:param> + <s:param name="selectedBranch"><s:property value="selectedBranch"/></s:param> + <s:param name="repositoryRoot"><s:property value="repositoryRoot"/></s:param> + <s:param name="request_locale">fr_FR</s:param> + <img src="img/flag-i18n-fr.png"/> + </s:a> + </s:else> + </li> + + </ul> - </ul> + </div> + + + <!-- <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> --> + + <h1 id="editorTitle">SCMWebEditor</h1> + + <p id="fileRevision"> + <s:text name="scm.image"/> <s:property value="address"/> + <s:text name="scm.atRevision"/> <span id="numrevisionDiv"><s:property value="numRevision"/></span> + </p> + + <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" class="indicator" id="resetIndicator"/> + + <s:if test="scmSupportsBranches"> + <p id="workingBranch"> + <s:text name="scm.modificationViewer.branch"/> <s:property value="selectedBranch"></s:property> + </p> + </s:if> </div> +<div id="editBody"> -<!-- <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> --> + <!-- BEGIN menu --> + <ul id="sweMenu" class="buttonsGroup"> + + <li> + + <div class="menuDescription"> + + <p><s:text name="scm.files"/></p> + + <!-- Buttons for the files operations --> + + <s:set id="scm.upload"> + <s:text name="scm.upload"/> + </s:set> + <s:set id="scm.uploadTitle"> + <s:text name="scm.uploadTitle"/> + </s:set> + + <s:set id="scm.removeFile"> + <s:text name="scm.removeFile"/> + </s:set> + <s:set id="scm.removeFileTitle"> + <s:text name="scm.removeFileTitle"/> + </s:set> + + <s:set id="scm.moveFile"> + <s:text name="scm.moveFile"/> + </s:set> + <s:set id="scm.moveFileTitle"> + <s:text name="scm.moveFileTitle"/> + </s:set> + + <s:set name="address"> + <s:property value="address"/> + </s:set> + + <ul id="repositoryButtons" class="buttonsGroup"> + <li> + <s:a + href="#" + title="%{scm.uploadTitle}" + onClick="javascript:open_popup('doUploadFile.action', 'upload', getElementById('address').value, '%{scmType}');" + name="uploadButton"> + + <span class="fa-stack fa-lg"> + <i class="fa fa-file fa-stack-2x"></i> + <i class="fa fa-plus fa-stack-1x fa-inverse"></i> + </span> + + </s:a> + </li> + <li> + <s:a + href="#" + title="%{scm.removeFileTitle}" + onClick="javascript:open_popup('doRemoveFile.action', 'remove', getElementById('address').value, '%{scmType}');" + name="removeButton"> + + <span class="fa-stack fa-lg"> + <i class="fa fa-file fa-stack-2x"></i> + <i class="fa fa-minus fa-stack-1x fa-inverse"></i> + </span> + + </s:a> + </li> + <li> + <s:a + href="#" + title="%{scm.moveFileTitle}" + onClick="javascript:open_popup('doMoveFile.action', 'move file',getElementById('address').value,'%{scmType}');" + name="moveFileButton"> + + <span class="fa-stack fa-lg"> + <i class="fa fa-file fa-stack-2x"></i> + <i class="fa fa-arrows fa-stack-1x fa-inverse"></i> + </span> -<h1 id="editorTitle">SCMWebEditor</h1> + </s:a> + </li> + </ul> -<s:set id="openAnotherFile"> - <s:text name="scm.openAnotherFile"/> -</s:set> + </div> -<s:submit id="openAnotherFileImg" value="%{openAnotherFile}" onclick="openPopin('openFilePopin'); return false;"/> + </li> - <div id="buttonList"> + <li> + + <div class="menuDescription"> + + <p><s:text name="scm.directories"/></p> - <!-- BEGIN exit --> + <!-- Buttons for the directories operations --> - <s:if test="projectUrl != null"> - <s:hidden key="projectUrl" label=''/> - </s:if> - <s:else> - <s:hidden id="projectUrl" value="checkout.action"/> - </s:else> + <s:set id="scm.createDirectory"> + <s:text name="scm.createDirectory"/> + </s:set> + <s:set id="scm.createDirectoryTitle"> + <s:text name="scm.createDirectoryTitle"/> + </s:set> + + <s:set id="scm.removeDirectory"> + <s:text name="scm.removeDirectory"/> + </s:set> + <s:set id="scm.removeDirectoryTitle"> + <s:text name="scm.removeDirectoryTitle"/> + </s:set> + + <ul id="directoryButtons" class="buttonsGroup"> + <li> + <s:a + href="#" + title="%{scm.createDirectoryTitle}" + onClick="javascript:open_popup('doCreateDirectory.action', 'create directory',getElementById('address').value,'%{scmType}');" + name="createDirectoryButton"> + + <span class="fa-stack fa-lg"> + <i class="fa fa-folder fa-stack-2x"></i> + <i class="fa fa-plus fa-stack-1x fa-inverse"></i> + </span> + + </s:a> + </li> + <li> + <s:a + href="#" + title="%{scm.removeDirectoryTitle}" + onClick="javascript:open_popup('doRemoveDirectory.action', 'remove directory',getElementById('address').value,'%{scmType}');" + name="removeDirectoryButton"> + + <span class="fa-stack fa-lg"> + <i class="fa fa-folder fa-stack-2x"></i> + <i class="fa fa-minus fa-stack-1x fa-inverse"></i> + </span> + + </s:a> + </li> + </ul> + + </div> + </li> - <s:set id="scm.exitTitle"> - <s:text name="scm.exitTitle"/> - </s:set> - <s:set id="scm.exitJavascript"> - <s:text name="scm.exitJavascript"/> - </s:set> + <li> - <s:a - href="checkout.action" - title="%{scm.exitTitle}" - value="%{scm.exit}" - name="Cancel"> - <div id="exitButton"></div> - </s:a> + <div class="menuDescription"> - <!-- END exit --> + <p><s:text name="scm.shortcuts"/></p> - </div> + <ul id="fileViewButtons" class="buttonsGroup"> + <li> + <s:set id="openAnotherFile"> + <s:text name="scm.openAnotherFile"/> + </s:set> - <!-- Buttons for the actions on the repository --> - - <s:set id="scm.upload"> - <s:text name="scm.upload"/> - </s:set> - <s:set id="scm.uploadTitle"> - <s:text name="scm.uploadTitle"/> - </s:set> - - <s:set id="scm.removeFile"> - <s:text name="scm.removeFile"/> - </s:set> - <s:set id="scm.removeFileTitle"> - <s:text name="scm.removeFileTitle"/> - </s:set> - - <s:set id="scm.createDirectory"> - <s:text name="scm.createDirectory"/> - </s:set> - <s:set id="scm.createDirectoryTitle"> - <s:text name="scm.createDirectoryTitle"/> - </s:set> - - <s:set id="scm.removeDirectory"> - <s:text name="scm.removeDirectory"/> - </s:set> - <s:set id="scm.removeDirectoryTitle"> - <s:text name="scm.removeDirectoryTitle"/> - </s:set> - - <s:set id="scm.moveFile"> - <s:text name="scm.moveFile"/> - </s:set> - <s:set id="scm.moveFileTitle"> - <s:text name="scm.moveFileTitle"/> - </s:set> - - <s:set name="address"> - <s:property value="address"/> - </s:set> - - <ul id="repositoryButtonsImg" class="buttonsGroup"> - <li> - <s:submit name="uploadButton" value="%{scm.upload}" title="%{scm.uploadTitle}" - onClick="javascript:open_popup('doUploadFile.action', 'upload', getElementById('address').value, '%{scmType}'); return false;"/> - </li> - <li> - <s:submit name="removeButton" value="%{scm.removeFile}" title="%{scm.removeFileTitle}" - onClick="javascript:open_popup('doRemoveFile.action', 'remove', getElementById('address').value, '%{scmType}'); return false;"/> - </li> - <li> - <s:submit name="createDirectoryButton" value="%{scm.createDirectory}" title="%{scm.createDirectoryTitle}" - onClick="javascript:open_popup('doCreateDirectory.action', 'create directory',getElementById('address').value,'%{scmType}'); return false;"/> - </li> - <li> - <s:submit name="removeDirectoryButton" value="%{scm.removeDirectory}" title="%{scm.removeDirectoryTitle}" - onClick="javascript:open_popup('doRemoveDirectory.action', 'remove directory',getElementById('address').value,'%{scmType}'); return false;"/> - </li> - <li> - <s:submit name="moveFileButton" value="%{scm.moveFile}" title="%{scm.moveFileTitle}" - onClick="javascript:open_popup('doMoveFile.action', 'move file',getElementById('address').value,'%{scmType}'); return false;"/> - </li> - </ul> + <s:a + id="openAnotherFile" + href="#" + title="%{openAnotherFile}" + onClick="javascript:openPopin('openFilePopin');"> -</div> + <span class="fa-stack fa-lg"> + <i class="fa fa-folder-open fa-2x"></i> + </span> -<div id="editBody"> + </s:a> + </li> + </ul> - <p> - <s:text name="scm.displayedImage"/> <s:property value="address"/> - <s:text name="scm.atRevision"/> <span id="numrevisionDiv"><s:property - value="numRevision"/></span> + </div> - <s:if test="scmSupportsBranches"> - <br/> - <s:text name="scm.modificationViewer.branch"/> <s:property value="selectedBranch"></s:property> - </s:if> - </p> + </li> + + + <li> + + <div class="menuDescription"> + + <p><s:text name="scm.edit"/></p> + + <ul id="contentButtons" class="buttonsGroup"> + + <!-- BEGIN exit --> + <li> + <s:if test="projectUrl != null"> + <s:hidden key="projectUrl" label=''/> + </s:if> + <s:else> + <s:hidden id="projectUrl" value="checkout.action"/> + </s:else> + + + <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="checkout.action" + title="%{scm.exitTitle}" + value="%{scm.exit}" + name="Cancel"> + + <span id="exitButton" class="fa-stack fa-lg"> + <i class="fa fa-times fa-2x"></i> + </span> + </s:a> + </li> + <!-- END exit --> + + </ul> + + </div> + + </li> + + </ul> + <!-- END menu --> <s:if test="filesDirectlyAccessible"> 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 b48f147..54aaf9a 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 @@ -56,6 +56,7 @@ </script> <script type="text/javascript" src="js/selectLanguage.js"></script> + <script type="text/javascript" src="js/popin.js"></script> <!-- Code mirror --> <script src="webjars/codemirror/5.1/lib/codemirror.js" type="text/javascript"></script> 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 f8ad618..ccb736a 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,7 @@ <s:else> <script type="text/javascript"> - document.getElementById("resetIndicator").style = "none"; + document.getElementById("resetIndicator").style.display = "none"; editor.mirror.setValue(document.getElementById('valueOfLastRevision').value); var numrev = "<s:property value="numRevision" />"; diff --git a/swe-ui-web/src/main/webapp/css/main.css b/swe-ui-web/src/main/webapp/css/main.css index 98d5b61..11ae4de 100644 --- a/swe-ui-web/src/main/webapp/css/main.css +++ b/swe-ui-web/src/main/webapp/css/main.css @@ -504,8 +504,8 @@ ul.buttonsGroup li { #sweBrowseMenu .fa-plus, #sweBrowseMenu .fa-minus, #sweBrowseMenu .fa-arrows { position: relative; - left: 4px; - top: 6px; + left: 3px; + top: 5px; color: #FFF; } diff --git a/swe-ui-web/src/main/webapp/js/editor.js b/swe-ui-web/src/main/webapp/js/editor.js index b1f4a8b..0470484 100644 --- a/swe-ui-web/src/main/webapp/js/editor.js +++ b/swe-ui-web/src/main/webapp/js/editor.js @@ -28,18 +28,6 @@ function loadChange() { document.getElementById('newTextId').value = editor.getValue(); } -/* Opens the popin */ -function openPopin(popinId) { - document.getElementById(popinId).style.display = "block"; - document.getElementById("popinBackground").style.display = "block"; -} - -/* Closes the popin */ -function closePopin(popinId) { - document.getElementById(popinId).style.display = "none"; - document.getElementById("popinBackground").style.display = "none"; -} - /* Exits the edit page if asked */ function checkExit() { if (exitAfterCommit) { diff --git a/swe-ui-web/src/main/webapp/js/popin.js b/swe-ui-web/src/main/webapp/js/popin.js new file mode 100644 index 0000000..caf63c1 --- /dev/null +++ b/swe-ui-web/src/main/webapp/js/popin.js @@ -0,0 +1,34 @@ +/* + * #%L + * ScmWebEditor + * %% + * Copyright (C) 2009 - 2015 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% + */ + + +/* Opens the popin */ +function openPopin(popinId) { + document.getElementById(popinId).style.display = "block"; + document.getElementById("popinBackground").style.display = "block"; +} + +/* Closes the popin */ +function closePopin(popinId) { + document.getElementById(popinId).style.display = "none"; + document.getElementById("popinBackground").style.display = "none"; +} \ No newline at end of file -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm