Goal
Sample code to open the Page Properties dialog (not component dialog) in Full screen by default
Demo | Package Install
Solution
1) Login to CRXDE Lite (http://localhost:4502/crx/de) and create folder /apps/eaem-open-page-props-dialog-full-screen
2) Create node /apps/eaem-open-page-props-dialog-full-screen/clientlib of type cq:ClientLibraryFolder and add a String property categories with value cq.authoring.dialog and dependencies to underscore
3) Create file (nt:file) /apps/eaem-open-page-props-dialog-full-screen/clientlib/js.txt and add
open-fullscreen.js
4) Create file (nt:file) /apps/eaem-open-page-props-dialog-full-screen/clientlib/open-fullscreen.js and add the following code
(function ($, $document, gAuthor) {
if(!gAuthor){
return;
}
$document.on('dialog-ready', openPagePropertiesFullScreen);
function openPagePropertiesFullScreen(){
var currentDialog = gAuthor.DialogFrame.currentDialog;
//if the current dialog is page properties
if(currentDialog instanceof gAuthor.actions.PagePropertiesDialog){
$('form.cq-dialog').find(".cq-dialog-layouttoggle").click();
}
}
}(jQuery, jQuery(document), Granite.author));