branch feature/sync updated (a774a64 -> b8e6eb5)
This is an automated email from the git hooks/post-receive script. New change to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git from a774a64 saving synchronisation time when update successful new 49c2fb6 added an error message if the update isn't done, asking to check for url new b8e6eb5 removed a useless comment The 2 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 b8e6eb543920741171683febf42eb0ed6adb2b9a Author: servantie <servantie.c@gmail.com> Date: Fri May 20 17:47:10 2016 +0200 removed a useless comment commit 49c2fb6ab0f70b4b00bf34a710ec16c2ff84dcbc Author: servantie <servantie.c@gmail.com> Date: Fri May 20 11:41:53 2016 +0200 added an error message if the update isn't done, asking to check for url Summary of changes: .../jtimer/ui/report/TimerTaskUpdaterView.java | 20 +++++++++++++++++++- .../report/resources/TimerTaskUpdaterView.properties | 6 ++++++ .../resources/TimerTaskUpdaterView_fr.properties | 6 ++++++ 3 files changed, 31 insertions(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 49c2fb6ab0f70b4b00bf34a710ec16c2ff84dcbc Author: servantie <servantie.c@gmail.com> Date: Fri May 20 11:41:53 2016 +0200 added an error message if the update isn't done, asking to check for url --- .../chorem/jtimer/ui/report/TimerTaskUpdaterView.java | 19 +++++++++++++++++++ .../report/resources/TimerTaskUpdaterView.properties | 6 ++++++ .../resources/TimerTaskUpdaterView_fr.properties | 6 ++++++ 3 files changed, 31 insertions(+) diff --git a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java index 4b72b27..078f67f 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java @@ -22,6 +22,7 @@ */ package org.chorem.jtimer.ui.report; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.jtimer.JTimer; @@ -174,6 +175,16 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener panelOption.add(checkIncludesAnnotations, new GridBagConstraints(1, 1, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(1, 1, 1, 1), 0, 0)); + JLabel lastUpdateLabel = new JLabel(getResourceMap().getString("lastUpdateLabel")); + //if there has been an update before, display its date + LocalDateTime lastSyncTime = task.getLastSync(); + if (lastSyncTime != null) { + JLabel lastUpdate = new JLabel(lastSyncTime.toLocalDate().toString()); + panelOption.add(lastUpdateLabel, new GridBagConstraints(1, 2, 1, 1, 0, 0, + GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(2, 1, 1, 1), 0, 0)); + panelOption.add(lastUpdate, new GridBagConstraints(2, 2, 1, 1, 0, 0, + GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(1, 2, 1, 1), 0, 0)); + } configComponent.add(panelGeneral); @@ -449,6 +460,14 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener if (hasUpdated) { core.getData().editTaskLastSync(task, LocalDateTime.now()); } + else { + log.error("Update error, wrong URL?"); + String message = getResourceMap().getString("action.updateError"); + String title = getResourceMap().getString("action.updateErrorTitle"); + JOptionPane.showMessageDialog(this.getMainComponent(), message, title, + JOptionPane.ERROR_MESSAGE); + + } } @Override diff --git a/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView.properties b/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView.properties index 8268439..9546d72 100644 --- a/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView.properties +++ b/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView.properties @@ -25,6 +25,9 @@ updateOptions=Options updateFrom=From : updateTo=To : +lastUpdateLabel=Last Sync at: + + pickCurrentMonth.Action.text = Select current month pickCurrentMonth.Action.shortDescription = Select current month @@ -51,3 +54,6 @@ sendUpdate.Action.shortDescription = Send update closeView.Action.text = &Close closeView.Action.icon = dialog-close.png closeView.Action.shortDescription = Close + +action.updateError = Update failed, check URL ? +action.updateErrorTitle = Update error diff --git a/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView_fr.properties b/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView_fr.properties index 3f3eacc..d5c7b71 100644 --- a/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView_fr.properties +++ b/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView_fr.properties @@ -26,6 +26,9 @@ updateOptions=Options updateFrom=De : updateTo=\u00C0 : +lastUpdateLabel=Derni\u00E8re mise \u00E0 jour : + + pickCurrentMonth.Action.text = Selectionner le mois courant pickCurrentMonth.Action.shortDescription = Selectionner le mois courant @@ -51,3 +54,6 @@ sendUpdate.Action.shortDescription = Envoyer la mise \u00C0 jour closeView.Action.text = &Fermer closeView.Action.icon = dialog-close.png closeView.Action.shortDescription = Fermer + +action.updateError = Erreur de mise \u00E0 jour, v\u00E9rifier l'URL ? +action.updateErrorTitle = Erreur de mise \u00E0 jour \ No newline at end of file -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit b8e6eb543920741171683febf42eb0ed6adb2b9a Author: servantie <servantie.c@gmail.com> Date: Fri May 20 17:47:10 2016 +0200 removed a useless comment --- src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java index 078f67f..606b5e8 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java @@ -456,7 +456,6 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener } } } - //if all has gone well, update SyncTime (todo:save information) if (hasUpdated) { core.getData().editTaskLastSync(task, LocalDateTime.now()); } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm