From b064760e0f95bca28bf492f3282014c7ad7c3cfe Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 27 Aug 2019 14:09:13 -0600 Subject: [PATCH] Etemplate - Make sure dialog is wide enough for the title --- api/js/etemplate/et2_widget_dialog.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/js/etemplate/et2_widget_dialog.js b/api/js/etemplate/et2_widget_dialog.js index e74d17c3fd..d3a637acd5 100644 --- a/api/js/etemplate/et2_widget_dialog.js +++ b/api/js/etemplate/et2_widget_dialog.js @@ -514,6 +514,15 @@ var et2_dialog = (function(){ "use strict"; return et2_widget.extend( } this.div.dialog(options); + + // Make sure dialog is wide enough for the title + // Arbitrary numbers that seem to work nicely. + var title_width = 20 + 10 * this.options.title.length; + if(this.div.width() < title_width) + { + // Auto-sizing chopped the title + this.div.dialog('option', 'width', title_width); + } } });}).call(this); et2_register_widget(et2_dialog, ["dialog"]);