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));
I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Adobe Experience Manager
ReplyDelete, kindly contact us http://www.maxmunus.com/contact
MaxMunus Offer World Class Virtual Instructor led training on Adobe Experience Manager . We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
For Demo Contact us:
Name : Arunkumar U
Email : arun@maxmunus.com
Skype id: training_maxmunus
Contact No.-+91-9738507310
Company Website –http://www.maxmunus.com
$(document).on("dialog-ready", function() {.... JavaScript code does not fire if the touch UI dialog is in full-screen mode. Is there a different hook for full-screen touch UI dialog that is equivalent to dialog-ready ?
ReplyDelete