Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何将CSS类添加到CQ对话框_Javascript_Css_Dialog_Aem - Fatal编程技术网

Javascript 如何将CSS类添加到CQ对话框

Javascript 如何将CSS类添加到CQ对话框,javascript,css,dialog,aem,Javascript,Css,Dialog,Aem,我想在“myBookmark”字段中添加CSS定义和CSS类(见下文)。有什么建议吗 (打开页面属性时将出现此选项卡。) )并使用clientlibs()添加了一个css文件 这些备选方案不符合我的需要 BenediktExtJS小部件的类可以通过开箱即用的配置属性添加:cls。看 实际的CSS规则应该像您在客户端库中提到的那样放置。您只需确保clientlib已附加到打开对话框的页面。您可以绑定到wcm.edit(CQ用于显示对话框),也可以创建自己的类别(例如css.test),然后包

我想在“myBookmark”字段中添加CSS定义和CSS类(见下文)。有什么建议吗

(打开页面属性时将出现此选项卡。)


)并使用clientlibs()添加了一个css文件

这些备选方案不符合我的需要


Benedikt

ExtJS小部件的类可以通过开箱即用的配置属性添加:
cls
。看



实际的CSS规则应该像您在客户端库中提到的那样放置。您只需确保clientlib已附加到打开对话框的页面。您可以绑定到
wcm.edit
(CQ用于显示对话框),也可以创建自己的类别(例如
css.test
),然后包含自己的客户端库:

,您可以在此处找到相应的属性:

可以通过“id”定义DOM元素“id”属性,通过“cls”定义“class”属性

此外,通常还有一个“style”属性,允许设置原始CSS定义

<?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>
...
 <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">