[Libreoffice-commits] online.git: loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Apr 17 13:10:45 UTC 2019


 loleaflet/src/control/Toolbar.js |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 065d2487cc6d26ec7efbde6f1e1177616b0b7cd7
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Apr 17 09:04:03 2019 +0200
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Apr 17 15:10:28 2019 +0200

    About dialog: Add link to website
    
    Can be modified by setting brandProductURL in branding.js
    
    Change-Id: I6181f4f0d7c0f7e6cd9ab447d95f451711bfd561
    Reviewed-on: https://gerrit.libreoffice.org/70859
    Reviewed-by: Jan Holesovsky <kendy 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/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 3a2a2ddd2..b33e2433d 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -3,7 +3,7 @@
  * Toolbar handler
  */
 
-/* global $ window vex brandProductName _ */
+/* global $ window vex sanitizeUrl brandProductName brandProductURL _ */
 L.Map.include({
 
 	// a mapping of uno commands to more readable toolbar items
@@ -265,9 +265,13 @@ L.Map.include({
 		} else {
 			productName = (typeof brandProductName !== 'undefined') ? brandProductName : 'LibreOffice Online';
 		}
+		var productURL = (typeof brandProductURL !== 'undefined') ? brandProductURL : 'https://libreoffice.org';
 		content.find('#product-name').text(productName);
 		var productString = _('This version of %productName is powered by');
-		content.find('#product-string').text(productString.replace('%productName', productName));
+		var productNameWithURL = '<a href="' + sanitizeUrl.sanitizeUrl(productURL) +
+								 '" target="_blank">' + productName + '</a>';
+		content.find('#product-string').html(productString.replace('%productName', productNameWithURL));
+
 		var w;
 		var iw = window.innerWidth;
 		if (iw < 768) {


More information about the Libreoffice-commits mailing list