From 910a6c1110cb9c99b326920f582bb698d8bf3f02 Mon Sep 17 00:00:00 2001 From: Mukesh Ram Date: Fri, 6 Oct 2017 13:06:24 +0530 Subject: [PATCH] HW-390: Fixed iframe resizing issue --- ang/crmUi.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ang/crmUi.js b/ang/crmUi.js index ecfe172a99..473aa965cd 100644 --- a/ang/crmUi.js +++ b/ang/crmUi.js @@ -326,6 +326,7 @@ link: function (scope, elm, attrs) { var iframe = $(elm)[0]; iframe.setAttribute('width', '100%'); + iframe.setAttribute('height', '250px'); iframe.setAttribute('frameborder', '0'); var refresh = function () { @@ -355,6 +356,10 @@ iframe.setAttribute('height', '' + $(this).innerHeight() + 'px'); }); + $(elm).parent().on('dialogresize', function(e, ui) { + iframe.setAttribute('class', 'resized'); + }); + scope.$parent.$watch(attrs.crmUiIframe, refresh); } }; @@ -576,7 +581,6 @@ .directive('crmUiSelect', function ($parse, $timeout) { return { require: '?ngModel', - priority: 1, scope: { crmUiSelect: '=' }, @@ -612,6 +616,7 @@ element.crmSelect2(scope.crmUiSelect || {}); if (ngModel) { element.on('change', refreshModel); + $timeout(ngModel.$render); } } @@ -1011,7 +1016,7 @@ // If the CMS has already added title markup to the page, use it $('h1').not('.crm-container h1').each(function() { if (_.trim($(this).html()) === pageTitle) { - $(this).addClass('crm-page-title').html(newPageTitle); + $(this).html(newPageTitle); $el.hide(); } }); -- 2.25.1