loleaflet/src/control/Control.DocumentRepair.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit c6a9227254478ae13eacb0ff3614c963559c9bb2 Author: Andras Timar <andras.ti...@collabora.com> AuthorDate: Thu Sep 6 15:31:43 2018 +0200 Commit: Jan Holesovsky <ke...@collabora.com> CommitDate: Fri Sep 7 13:28:25 2018 +0200 loleaflet: don't use timeago, because it's hard to localize, use localized timestamps instead Change-Id: Iae5cab6fe7f9b92f9098b66be48278c4fb293002 Reviewed-on: https://gerrit.libreoffice.org/60088 Reviewed-by: Andras Timar <andras.ti...@collabora.com> Tested-by: Andras Timar <andras.ti...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/60089 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> diff --git a/loleaflet/src/control/Control.DocumentRepair.js b/loleaflet/src/control/Control.DocumentRepair.js index c27541d59..d2ecd4947 100644 --- a/loleaflet/src/control/Control.DocumentRepair.js +++ b/loleaflet/src/control/Control.DocumentRepair.js @@ -1,8 +1,7 @@ /* * L.Control.DocumentRepair. */ - -/* global $ _ _UNO */ +/* global _ _UNO */ L.Control.DocumentRepair = L.Control.extend({ options: { position: 'topright' @@ -76,10 +75,11 @@ L.Control.DocumentRepair = L.Control.extend({ // Show relative date by default, absolute one as tooltip. td = L.DomUtil.create('td', '', row); - var relativeDateTime = jQuery.timeago(dateTime.replace(/,.*/, 'Z')); + var d = new Date(dateTime.replace(/,.*/, 'Z')); + var dateOptions = { year: 'numeric', month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' }; var span = document.createElement('span'); span.title = dateTime; - span.appendChild(document.createTextNode(relativeDateTime)); + span.appendChild(document.createTextNode(d.toLocaleDateString(String.locale, dateOptions))); td.appendChild(span); L.DomEvent.on(row, 'click', this._onRowClick, this); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits