Goal
A simple dialog-ready event listener fired when a Touch UI dialog is opened (listener top aligns field labels)
Package Install
Product
Extension
Solution
1) Login to CRXDE Lite, create folder (nt:folder) /apps/touch-ui-sample-dialog-ready
2) Create clientlib (type cq:ClientLibraryFolder) /apps/touch-ui-sample-dialog-ready/clientlib and set a property categories of String type to cq.authoring.dialog
3) Create file ( type nt:file ) /apps/touch-ui-sample-dialog-ready/clientlib/js.txt, add the following
labels.js
4) Create file ( type nt:file ) /apps/touch-ui-sample-dialog-ready/clientlib/labels.js, add the following code
(function ($, $document) {
"use strict";
$document.on("dialog-ready", function() {
$(".coral-Form-fieldlabel").css("float", "none");
});
})($, $(document));