[Libreoffice-commits] online.git: Branch 'libreoffice-5-3' - loleaflet/src

Tor Lillqvist tml at collabora.com
Thu Mar 23 09:23:13 UTC 2017


 loleaflet/src/admin/Util.js |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 8f5907082e3f8c731e09ebc937a204e1173549a3
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Dec 5 17:17:15 2016 +0200

    Display leading zero of minutes or seconds properly
    
    Change-Id: I1784dd685358456f98158c30050b12b76f9ebb18
    Reviewed-on: https://gerrit.libreoffice.org/35561
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/loleaflet/src/admin/Util.js b/loleaflet/src/admin/Util.js
index acc5db57..35f6c81f 100644
--- a/loleaflet/src/admin/Util.js
+++ b/loleaflet/src/admin/Util.js
@@ -38,9 +38,17 @@ var Util = Base.extend({
 		}
 
 		if (hrs) {
-			res = hrs + ':' + mins + _(' hrs');
+			if (mins < 10) {
+				res = hrs + ':0' + mins + _(' hrs');
+			} else {
+				res = hrs + ':' + mins + _(' hrs');
+			}
 		} else if (mins) {
-			res = mins + ':' + secs + _(' mins');
+			if (secs < 10) {
+				res = mins + ':0' + secs + _(' mins');
+			} else {
+				res = mins + ':' + secs + _(' mins');
+			}
 		} else if (secs) {
 			res = secs + _(' s');
 		} else {


More information about the Libreoffice-commits mailing list