-->"},{"isJavascriptWidget":false,"isHtmlWidget":true,"x":0.0,"y":43.0,"width":67.0,"height":37.0,"html":"|<\/div>/g, '\n');
eval.call(null, jsCode);
} else {
var customStyles = '';
if (widget.isHtmlWidget === true) {
customStyles += ' widget-type-htmldiv';
}
var $content =
$('
' +
widget.html +
'
');
// set iframe height for mobile devices
var iframe = $content.find('iframe');
if (iframe.length) {
function updateIframeHeight(iframe) {
$.cdh.helper.updateIframeHeightByContent(iframe);
}
iframe.load(function() {
var iframeLocal = $(this);
updateIframeHeight(iframeLocal);
$(window).resize(function() {
updateIframeHeight(iframeLocal);
});
$(window).on('orientationchange', function() {
updateIframeHeight(iframeLocal);
});
if (isFsaStorePage) {
var iframe = $('.dashboard-html-mobile-widget').find('iframe');
//apply height for iframe
iframe.height('3500px');
//apply height for iframe content
setTimeout(() => {
iframe.contents().find('html,body').css('height', '100%');
}, 1000);
}
});
} else {
$content.find('[data-skip-fix-widget-height]').css('height', '100%').parent()
.css('height', widget.height * 10);
}
var parent = null
if (widget.x < 50) {
parent = dashboardHtmlMobileWidgetsLeftCol;
usedLeftCol = true;
} else {
parent = dashboardHtmlMobileWidgetsRightCol;
usedRightCol = true;
}
if (parent)
parent.append($content);
}
});
if (usedLeftCol && !usedRightCol) {
dashboardHtmlMobileWidgetsTable.addClass('left-col-only');
dashboardHtmlMobileWidgetsRightCol.remove();
} else if (!usedLeftCol && usedRightCol) {
dashboardHtmlMobileWidgetsTable.addClass('right-col-only');
dashboardHtmlMobileWidgetsLeftCol.remove();
}
})