From f292709bab42748631b50df3b3af5b71fd8e4139 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sun, 30 Mar 2014 21:40:26 -0400 Subject: [PATCH] Add dialog resize button --- js/Common.js | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/js/Common.js b/js/Common.js index 8e5d854e3a..ec638debf4 100644 --- a/js/Common.js +++ b/js/Common.js @@ -418,14 +418,36 @@ CRM.validate = CRM.validate || { $('.crm-select2:not(.select2-offscreen, .select2-container)', e.target).crmSelect2(); $('.crm-form-entityref:not(.select2-offscreen, .select2-container)', e.target).crmEntityRef(); }) - // Modal dialogs should disable scrollbars .on('dialogopen', function(e) { - if ($(e.target).dialog('option', 'modal')) { - $(e.target).addClass('modal-dialog'); + var $el = $(e.target); + // Modal dialogs should disable scrollbars + if ($el.dialog('option', 'modal')) { + $el.addClass('modal-dialog'); $('body').css({overflow: 'hidden'}); } + $el.parent().find('.ui-dialog-titlebar-close').attr('title', ts('Close')); + // Add resize button + if ($el.parent().hasClass('crm-container')) { + $el.parent().find('.ui-dialog-titlebar').append($('