[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-0' - loleaflet/src
Andras Timar
andras.timar at collabora.com
Mon Dec 19 12:56:53 UTC 2016
loleaflet/src/core/Socket.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit a1045b0687f0aba053d0d168041c483a23e14c8a
Author: Andras Timar <andras.timar at collabora.com>
Date: Thu Dec 15 12:54:37 2016 +0100
loleaflet: put link to git hashes beginning with 0 in About box
Change-Id: I3e981e72f69af45776f7ecccb10a0beda56f7c1f
(cherry picked from commit 73f2c278aa224ffcd8d07bad162c720a90294f39)
Signed-off-by: Andras Timar <andras.timar at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/32128
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 010a795..f25b580 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -165,7 +165,7 @@ L.Socket = L.Class.extend({
// This must be the first message, unless we reconnect.
var loolwsdVersionObj = JSON.parse(textMsg.substring(textMsg.indexOf('{')));
var h = loolwsdVersionObj.Hash;
- if (parseInt(h,16).toString(16) === h.toLowerCase()) {
+ if (parseInt(h,16).toString(16) === h.toLowerCase().replace(/^0+/, '')) {
h = '<a target="_blank" href="https://gerrit.libreoffice.org/gitweb?p=online.git;a=log;h=' + h + '">' + h + '</a>';
$('#loolwsd-version').html(loolwsdVersionObj.Version + ' (git hash: ' + h + ')');
}
@@ -181,7 +181,7 @@ L.Socket = L.Class.extend({
else if (textMsg.startsWith('lokitversion ')) {
var lokitVersionObj = JSON.parse(textMsg.substring(textMsg.indexOf('{')));
var h = lokitVersionObj.BuildId.substring(0, 7);
- if (parseInt(h,16).toString(16) === h.toLowerCase()) {
+ if (parseInt(h,16).toString(16) === h.toLowerCase().replace(/^0+/, '')) {
h = '<a target="_blank" href="https://gerrit.libreoffice.org/gitweb?p=core.git;a=log;h=' + h + '">' + h + '</a>';
}
$('#lokit-version').html(lokitVersionObj.ProductName + ' ' +
More information about the Libreoffice-commits
mailing list