changeset 9118267a616e in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=9118267a616e
description:
        Convert forgotten format_datetime call to unique format

        issue9922
diffstat:

 src/tab.js        |  5 ++---
 src/view/graph.js |  4 ++--
 src/window.js     |  4 ++--
 3 files changed, 6 insertions(+), 7 deletions(-)

diffs (57 lines):

diff -r 238f007f890e -r 9118267a616e src/tab.js
--- a/src/tab.js        Sun Feb 21 19:38:25 2021 +0100
+++ b/src/tab.js        Sun Feb 28 16:22:59 2021 +0100
@@ -928,8 +928,7 @@
                     value = (value || {})[name] || '/';
                     if (value && value.isDateTime) {
                         value = Sao.common.format_datetime(
-                            Sao.common.date_format(),
-                            '%H:%M:%S',
+                            Sao.common.date_format() + ' %H:%M:%S',
                             value);
                     }
                     message += label + ' ' + value + '\n';
@@ -990,7 +989,7 @@
                     this.screen.context.date_format);
                 var time_format = '%H:%M:%S.%f';
                 var revision_label = ' @ ' + Sao.common.format_datetime(
-                    date_format, time_format, revision);
+                    date_format + ' ' + time_format, revision);
                 label = Sao.common.ellipsize(
                     this.name, 80 - revision_label.length) + revision_label;
                 title = this.name + revision_label;
diff -r 238f007f890e -r 9118267a616e src/view/graph.js
--- a/src/view/graph.js Sun Feb 21 19:38:25 2021 +0100
+++ b/src/view/graph.js Sun Feb 28 16:22:59 2021 +0100
@@ -191,8 +191,8 @@
                 if (type == 'datetime') {
                     c3_config.data.xFormat = '%Y-%m-%d %H:%M:%S';
                     format_func = function(dt) {
-                        return Sao.common.format_datetime(date_format,
-                                time_format, moment(dt));
+                        return Sao.common.format_datetime(
+                            date_format + ' ' + time_format, moment(dt));
                     };
                 } else {
                     c3_config.data.xFormat = '%Y-%m-%d';
diff -r 238f007f890e -r 9118267a616e src/window.js
--- a/src/window.js     Sun Feb 21 19:38:25 2021 +0100
+++ b/src/window.js     Sun Feb 28 16:22:59 2021 +0100
@@ -121,7 +121,7 @@
                             this.screen.context.date_format);
                         var time_format = '%H:%M:%S.%f';
                         var revision_label = ' @ ' + 
Sao.common.format_datetime(
-                            date_format, time_format, revision);
+                            date_format + ' ' + time_format, revision);
                         label = Sao.common.ellipsize(
                             this.title, 80 - revision_label.length) +
                             revision_label;
@@ -929,7 +929,7 @@
                 this.select.append(jQuery('<option/>', {
                     value: revision.valueOf(),
                     text: Sao.common.format_datetime(
-                        date_format, time_format, revision) + ' ' + name,
+                        date_format + ' ' + time_format, revision) + ' ' + 
name,
                 }));
             }.bind(this));
             this.el.modal('show');

Reply via email to