branch develop updated (f32eba1 -> 987233f)
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 f32eba1 Make the date shorter in the form to view the file history new 987233f Add the display of the last automatic save 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 987233f9c7adfeb422a7ed98a00501ebcb414ec9 Author: Hugo PIGEON <hpigeon@codelutin.com> Date: Fri Jun 5 16:49:06 2015 +0200 Add the display of the last automatic save Summary of changes: .../i18n/scmwebeditor-ui-web_en_GB.properties | 6 ++-- .../i18n/scmwebeditor-ui-web_fr_FR.properties | 6 ++-- .../webapp/WEB-INF/content/fileNotEditable.jsp | 4 +-- .../webapp/WEB-INF/content/modificationViewer.jsp | 7 ++++- swe-ui-web/src/main/webapp/css/main.css | 4 +++ swe-ui-web/src/main/webapp/js/autoSave.js | 35 ++++++++++++++++++++++ 6 files changed, 55 insertions(+), 7 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 987233f9c7adfeb422a7ed98a00501ebcb414ec9 Author: Hugo PIGEON <hpigeon@codelutin.com> Date: Fri Jun 5 16:49:06 2015 +0200 Add the display of the last automatic save --- .../i18n/scmwebeditor-ui-web_en_GB.properties | 6 ++-- .../i18n/scmwebeditor-ui-web_fr_FR.properties | 6 ++-- .../webapp/WEB-INF/content/fileNotEditable.jsp | 4 +-- .../webapp/WEB-INF/content/modificationViewer.jsp | 7 ++++- swe-ui-web/src/main/webapp/css/main.css | 4 +++ swe-ui-web/src/main/webapp/js/autoSave.js | 35 ++++++++++++++++++++++ 6 files changed, 55 insertions(+), 7 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 7cfc935..4c160c6 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 @@ -28,8 +28,9 @@ scm.exit=Exit scm.exitJavascript=Exit ScmWebEditor? scm.exitJavascriptChanges=Exit ScmWebEditor without saving? All modification will be lost. scm.exitTitle=Exit ScmWebEditor without saving. +scm.file=The file scm.fileModify=File modify while editing. -scm.fileNotEditable=This file is not editable. +scm.fileNotEditable=File not editable scm.fileRevision=File revision\: scm.fileToMove=File to move\: scm.forceSave=Force save @@ -38,6 +39,7 @@ scm.homepage=the homepage scm.info.ProblemWithRst=For any problem with RestructuredText visit scm.info.rstWebsite=RST documentation website scm.language=Language +scm.lastAutoSave=Last automatic save\: scm.lastChangeSave=Last change save scm.logAs=You are log as \: scm.loginAutoSaveFile=Login for the automatic save @@ -59,7 +61,7 @@ scm.moveFileTitle=Move a file on the repository scm.mustBeLog=You must be login to see this repository. scm.newDirectoryName=Name of the new directory\: scm.no=No -scm.notEditable=File not editable +scm.notEditable=is not editable. scm.openAnotherFile=Open another file scm.outConnection.branches=List of branches scm.outConnection.enterRepo=Please enter your repository address. 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 97a475c..499e101 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 @@ -28,8 +28,9 @@ scm.exit=Quitter scm.exitJavascript=Quitter ScmWebEditor ? scm.exitJavascriptChanges=Quitter ScmWebEditor sans sauvegarder ? Toutes les modifications seront perdues. scm.exitTitle=Quitter ScmWebEditor sans sauvegarder. +scm.file=Le fichier scm.fileModify=Fichier modifié pendant l'édition. -scm.fileNotEditable=Ce fichier n'est pas éditable. +scm.fileNotEditable=Fichier non éditable scm.fileRevision=Révision du fichier \: scm.fileToMove=Fichier à déplacer \: scm.forceSave=Forcer la sauvegarde @@ -38,6 +39,7 @@ scm.homepage=la page d'accueil scm.info.ProblemWithRst=Si vous rencontrez des problèmes avec RestructuredText, visitez le scm.info.rstWebsite=site de la documentation RST scm.language=Langage +scm.lastAutoSave=Dernière sauvegarde automatique \: scm.lastChangeSave=Dernière sauvegarde effectuée scm.logAs=Connecté en tant que \: scm.loginAutoSaveFile=Connexion pour la sauvegarde automatique @@ -59,7 +61,7 @@ scm.moveFileTitle=Déplacer un fichier au sein du dépôt scm.mustBeLog=Vous devez vous identifier pour parcourir ce dépôt. scm.newDirectoryName=Nom du nouveau répertoire \: scm.no=Non -scm.notEditable=Fichier non éditable +scm.notEditable=n'est pas éditable. scm.openAnotherFile=Ouvrir un autre fichier scm.outConnection.branches=Liste des branches scm.outConnection.enterRepo=Entrez l'adresse de votre dépôt. diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/fileNotEditable.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/fileNotEditable.jsp index 070af09..dfee9ce 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/fileNotEditable.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/fileNotEditable.jsp @@ -29,7 +29,7 @@ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <title><s:text name="scm.notEditable"/></title> + <title><s:text name="scm.fileNotEditable"/></title> <link rel="icon" href="img/machine-a-ecrire_little.png" type="image/png"> <link rel="stylesheet" type="text/css" href="css/main.css"> </head> @@ -37,7 +37,7 @@ <a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt"/></a> -<p><s:text name="scm.fileNotEditable"/></p> +<p><s:text name="scm.file"/> <s:property value="address"/> <s:text name="scm.notEditable"/></p> <p><s:text name="scm.canDownload"/> <s:if test="fileDirectlyAccessible"> 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 e451a35..0a6327b 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 @@ -445,6 +445,11 @@ </div> </s:if> + <s:if test="autoSaveInterval > 0"> + <div id="lastAutoSave"> + <s:text name="scm.lastAutoSave"/> <span id="lastAutoSaveTime"></span> + </div> + </s:if> <label><s:text name="scm.language"/> <select id="language" name="langageSelection" @@ -633,7 +638,7 @@ <div id="popinBackground"></div> -<s:if test="autoSaveEnabled"> +<s:if test="autoSaveInterval > 0"> <script type="text/javascript"> var address = document.getElementById("address").value; diff --git a/swe-ui-web/src/main/webapp/css/main.css b/swe-ui-web/src/main/webapp/css/main.css index 1e9ef1c..e0d8d3a 100644 --- a/swe-ui-web/src/main/webapp/css/main.css +++ b/swe-ui-web/src/main/webapp/css/main.css @@ -523,4 +523,8 @@ ul#repositoryButtons li, ul#repositoryButtonsImg li { #revisionsList { width: 100%; +} + +#lastAutoSave { + display: none; } \ No newline at end of file diff --git a/swe-ui-web/src/main/webapp/js/autoSave.js b/swe-ui-web/src/main/webapp/js/autoSave.js index 228d9a5..0a3a978 100644 --- a/swe-ui-web/src/main/webapp/js/autoSave.js +++ b/swe-ui-web/src/main/webapp/js/autoSave.js @@ -28,6 +28,40 @@ function autoSave() { var text = editor.getValue(); localStorage.setItem(address, text); + + document.getElementById("lastAutoSave").style.display = "block"; + + var currentDate = new Date(); + + var day = currentDate.getDate(); + if (day < 10) { + day = "0" + day; + } + + var month = currentDate.getMonth() + 1; + if (month < 10) { + month = "0" + month; + } + + var year = currentDate.getFullYear(); + + var hours = currentDate.getHours(); + if (hours < 10) { + hours = "0" + hours; + } + + var minutes = currentDate.getMinutes(); + if (minutes < 10) { + minutes = "0" + minutes; + } + + var seconds = currentDate.getSeconds(); + if (seconds < 10) { + seconds = "0" + seconds; + } + + document.getElementById("lastAutoSaveTime").innerHTML = day + "/" + month + "/" + year + " " + hours + ":" + + minutes + ":" + seconds; } } @@ -35,4 +69,5 @@ function removeLocalAutoSave() { var address = document.getElementById("address").value; localStorage.removeItem(address); + document.getElementById("lastAutoSave").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