From 32eff8dd6b15df9f541e2988a596876c95f45e84 Mon Sep 17 00:00:00 2001 From: Pranav Kant Date: Tue, 27 Mar 2018 15:13:41 +0200 Subject: [PATCH] lokdialog: Don't show the title bar when no title was provided. Change-Id: If08dc81e88d35a924d10695a38b138f6403e58bd Reviewed-on: https://gerrit.libreoffice.org/51955 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky --- loleaflet/css/loleaflet.css | 4 ++++ loleaflet/src/control/Control.LokDialog.js | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css index eae3e4f63..bcaf442f5 100644 --- a/loleaflet/css/loleaflet.css +++ b/loleaflet/css/loleaflet.css @@ -347,6 +347,10 @@ body { text-indent: 1px; } +.lokdialog_container.lokdialog_notitle .ui-dialog-titlebar { + display: none; +} + .lokdialog_container.ui-dialog.ui-widget-content { padding: 0px; overflow: visible; diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 19e936970..61c73abbc 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -246,6 +246,10 @@ L.Control.LokDialog = L.Control.extend({ L.DomEvent.on(dialogCanvas, 'contextmenu', L.DomEvent.preventDefault); + var dialogClass = 'lokdialog_container'; + if (!title) + dialogClass += ' lokdialog_notitle'; + var that = this; $(dialogContainer).dialog({ minWidth: width, @@ -254,7 +258,7 @@ L.Control.LokDialog = L.Control.extend({ modal: false, closeOnEscape: true, resizable: false, - dialogClass: 'lokdialog_container', + dialogClass: dialogClass, close: function() { that._onDialogClose(that._toRawDlgId(strDlgId), true); }