branch develop updated (82cc628 -> f36de51)
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 82cc628 Add a message in french in the Git placeholders new f36de51 Make the autosave disabled when the interval is set to 0 in the configuration file 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 f36de51d626097e0197c3d3477900e566a0eb528 Author: Hugo PIGEON <hpigeon@codelutin.com> Date: Fri Jun 5 15:17:49 2015 +0200 Make the autosave disabled when the interval is set to 0 in the configuration file Summary of changes: .../org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfig.java | 11 ----------- .../nuiton/scmwebeditor/uiweb/ScmWebEditorConfigOption.java | 1 - .../org/nuiton/scmwebeditor/uiweb/actions/EditAction.java | 8 -------- swe-ui-web/src/main/resources/scmwebeditor.properties | 3 +-- .../src/main/webapp/WEB-INF/content/modificationViewer.jsp | 4 ++-- 5 files changed, 3 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 f36de51d626097e0197c3d3477900e566a0eb528 Author: Hugo PIGEON <hpigeon@codelutin.com> Date: Fri Jun 5 15:17:49 2015 +0200 Make the autosave disabled when the interval is set to 0 in the configuration file --- .../org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfig.java | 11 ----------- .../nuiton/scmwebeditor/uiweb/ScmWebEditorConfigOption.java | 1 - .../org/nuiton/scmwebeditor/uiweb/actions/EditAction.java | 8 -------- swe-ui-web/src/main/resources/scmwebeditor.properties | 3 +-- .../src/main/webapp/WEB-INF/content/modificationViewer.jsp | 4 ++-- 5 files changed, 3 insertions(+), 24 deletions(-) diff --git a/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfig.java b/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfig.java index e6aa683..dcb339d 100644 --- a/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfig.java +++ b/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfig.java @@ -99,17 +99,6 @@ public class ScmWebEditorConfig { return getConfig().getOption(ScmWebEditorConfigOption.COOKIES_PRIVATE_KEY.getKey()); } - public static boolean isAutoSaveEnabled() { - String readValue = getConfig().getOption(ScmWebEditorConfigOption.ENABLE_AUTO_SAVE.getKey()); - boolean returnValue = false; - - if (readValue.equals("true")) { - returnValue = true; - } - - return returnValue; - } - public static int getAutoSaveInterval() { String readValue = getConfig().getOption(ScmWebEditorConfigOption.AUTO_SAVE_INTERVAL.getKey()); return Integer.parseInt(readValue); diff --git a/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfigOption.java b/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfigOption.java index 17495ce..9df9acd 100644 --- a/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfigOption.java +++ b/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfigOption.java @@ -33,7 +33,6 @@ public enum ScmWebEditorConfigOption implements ConfigOptionDef { EDITABLE_FILES("swe.editableFiles", "description", "Files types that are editable", String.class, true, true), COOKIES_PRIVATE_KEY("swe.cookiePrivateKey", "Private key for cookies", null, String.class, true, true), LOCAL_REPOSITORIES_PATH("swe.localRepositoriesPath", "The path where the local repositories will be stored", "/var/local/swe", String.class, false, true), - ENABLE_AUTO_SAVE("swe.enableAutoSave", "Whether the automatic save is enabled", "true", Boolean.class, false, true), AUTO_SAVE_INTERVAL("swe.autoSaveInterval", "The time between two automatic saves in milliseconds", "300000", Integer.class, false, true), PROVIDERS("swe.provider.", "The SCMs that can be used", null, String.class, false, true); diff --git a/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/actions/EditAction.java b/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/actions/EditAction.java index a01f34c..449f11e 100644 --- a/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/actions/EditAction.java +++ b/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/actions/EditAction.java @@ -64,9 +64,6 @@ public class EditAction extends ScmWebEditorMainAction { /** the full path to the root of the repository */ protected String repositoryRoot; - /** equals true if the automatic save of the edited file is enabled */ - protected boolean autoSaveEnabled; - /** the interval between two automatic saves */ protected int autoSaveInterval; @@ -96,10 +93,6 @@ public class EditAction extends ScmWebEditorMainAction { public void setRepositoryRoot(String repositoryRoot) { this.repositoryRoot = repositoryRoot; } - public boolean isAutoSaveEnabled() { return autoSaveEnabled; } - - public void setAutoSaveEnabled(boolean autoSaveEnabled) { this.autoSaveEnabled = autoSaveEnabled; } - public int getAutoSaveInterval() { return autoSaveInterval; } public void setAutoSaveInterval(int autoSaveInterval) { this.autoSaveInterval = autoSaveInterval; } @@ -124,7 +117,6 @@ public class EditAction extends ScmWebEditorMainAction { */ public String execute() { - autoSaveEnabled = ScmWebEditorConfig.isAutoSaveEnabled(); autoSaveInterval = ScmWebEditorConfig.getAutoSaveInterval(); HttpSession session = request.getSession(); diff --git a/swe-ui-web/src/main/resources/scmwebeditor.properties b/swe-ui-web/src/main/resources/scmwebeditor.properties index 8038302..319f003 100644 --- a/swe-ui-web/src/main/resources/scmwebeditor.properties +++ b/swe-ui-web/src/main/resources/scmwebeditor.properties @@ -22,8 +22,7 @@ swe.editableFiles=text,xml,javascript,sh,x-tex,x-java swe.cookiePrivateKey=ZvcCyhfRTVZoQz3B/IpYdw== swe.localRepositoriesPath=/var/local/swe -swe.enableAutoSave=true -# the auto save interval is set in milliseconds +# the auto save interval is set in milliseconds, or equals 0 for no auto save swe.autoSaveInterval=30000 swe.provider.SVN=org.nuiton.scmwebeditor.svn.SvnProvider swe.provider.Git=org.nuiton.scmwebeditor.git.GitProvider \ No newline at end of file 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 6f9e19e..e451a35 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 @@ -132,7 +132,7 @@ <script type="text/javascript" src="js/editor.js"></script> - <s:if test="autoSaveEnabled"> + <s:if test="autoSaveInterval > 0"> <script type="text/javascript" src="js/autoSave.js"></script> <script type="text/javascript"> @@ -547,7 +547,7 @@ title="%{scm.saveAndContinueTitle}" > - <s:if test="autoSaveEnabled"> + <s:if test="autoSaveInterval > 0"> <s:submit id="Save" value="%{scm.submit}" onclick="removeLocalAutoSave(); return false;"/> </s:if> <s:else> -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm