Skip to content

Instantly share code, notes, and snippets.

@dnstommy
Created January 19, 2017 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dnstommy/448bd832c79cb28b77a26a3e28b35d50 to your computer and use it in GitHub Desktop.
Save dnstommy/448bd832c79cb28b77a26a3e28b35d50 to your computer and use it in GitHub Desktop.
Javascript needed to resize the dialog box for tabbed renderings in Sitecore
document.addEventListener('DOMContentLoaded', function(){
var parentDiv = parent.document.getElementsByClassName("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front ui-draggable ui-resizable");
if (parentDiv)
{
//console.log(all[0].style)
parentDiv[0].style.width = "1100px";
parentDiv[0].style.height = "600px";
}
var iFrame = parent.document.getElementById("scContentIframeId0");
if(iFrame)
iFrame.style.height = "600px";
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment