javascript - How to add CSS class to CQ dialog box -


i want add css definition and css class field "mybookmark" (see below). suggestions?

(this tab occur when opening page properties.)

<?xml version="1.0" encoding="utf-8"?> <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"     jcr:primarytype="cq:panel"     title="interactions">   <items jcr:primarytype="cq:widgetcollection">     <share       jcr:primarytype="cq:widget"      title="share"      xtype="dialogfieldset"      collapsed="{boolean}false"      collapsible="{boolean}true">      <items jcr:primarytype="cq:widgetcollection">         <mybookmark jcr:primarytype="cq:widget" type="select" xtype="selection"             defaultvalue=""             fieldlabel="share button"             name="./share" >               <options jcr:primarytype="cq:widgetcollection">                 <alignment1 jcr:primarytype="nt:unstructured" text="(inherit)" />                 <alignment2 jcr:primarytype="nt:unstructured" text="hide"   value="hide"/>                 <alignment3 jcr:primarytype="nt:unstructured" text="show"   value="show"/>               </options>           </mybookmark>      </items>     </share> ... 

for now, working cq:listeners inside dialog add css via js (http://dev.day.com/docs/en/cq/current/developing/components.html) , added css file using clientlibs (http://blogs.adobe.com/mtg/2011/11/building-components-in-adobe-cq-5-part-1-a-tutorial-on-clientlibs-using-jquery-ui.html)

those alternatives did not fit needs.

benedikt

the class extjs widget can addded through out of box configuration property: cls. see cq5 widgets api documentation.

 <items jcr:primarytype="cq:widgetcollection">     <mybookmark          jcr:primarytype="cq:widget"          cls="myclassname"         defaultvalue=""         fieldlabel="share button"         name="./share"         type="select"         xtype="selection">           <options jcr:primarytype="cq:widgetcollection"> 

the actual css rule should put mentioned in client library. need make sure clientlib being attached page open dialog. can either bind wcm.edit (which used cq diplay dialogs) or can create own category (e.g. css.test) , include clientlib own: <cq:includeclientlib css="css.test" />


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -