I am trying to change the default size of the "Select a Rendering" Dialog.
it would be ok if I change the size of every dialog box, not just this one.
I've tried to override the css, but I was not able to change the dialog size.
If you want to override it for all dialogs, you can change it in file:
sitecore\shell\Controls\JqueryModalDialogs.html
Find
`function showModalDialog`
and when dialogOptions
variable is initialized, use any value you want for width
property:
var dialogOptions = {
closeText: top.scForm.translate("Close"),
modal: true,
draggable: !isMobileBrowser(),
height: dialogHeight,
width: YOUR_VALUE_HERE, // HERE <------
resizable: isResizable,
dialogClass: isClosable ? '' : 'no-close',
title: '',
open: function () {
contentIframe.dialog('widget').css('opacity', 0.001);
},
close: function () {
window.top.dialogClose();
},
beforeClose: modifiedHandling
};
You can check url
parameter first and change width of the dialog only when it's Select Rendering
dialog.
Remember that Sitecore caches scripts heavily, so best open new private tab after or start developer tools and check "Disable Cache" option.