-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #156 from justinedelson/feature/definition-list-co…
…mponent Adding a simple definition list component
- Loading branch information
Showing
7 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
...rc/main/content/jcr_root/apps/acs-commons/components/content/definition-list/.content.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | ||
jcr:description="Definition List composed of terms and definitions." | ||
jcr:primaryType="cq:Component" | ||
jcr:title="Definition List" | ||
sling:resourceSuperType="foundation/components/parbase" | ||
componentGroup="General"/> |
37 changes: 37 additions & 0 deletions
37
.../content/jcr_root/apps/acs-commons/components/content/definition-list/definition-list.jsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<%-- | ||
#%L | ||
ACS AEM Commons Package | ||
%% | ||
Copyright (C) 2014 Adobe | ||
%% | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
#L% | ||
--%> | ||
<%@include file="/libs/foundation/global.jsp" %> | ||
<%@ taglib prefix="wcmmode" uri="http://www.adobe.com/consulting/acs-aem-commons/wcmmode" %><% | ||
%><%@ taglib prefix="widgets" uri="http://www.adobe.com/consulting/acs-aem-commons/widgets" %><% | ||
%><%@ taglib prefix="xss" uri="http://www.adobe.com/consulting/acs-aem-commons/xss" %> | ||
<c:set var="definitions" value="${widgets:getMultiFieldPanelValues(resource, 'definitions')}"/> | ||
<c:choose> | ||
<c:when test="${empty definitions}"> | ||
<wcmmode:edit><img class="cq-dl-placeholder cq-block-placeholder" src="/etc/designs/default/0.gif"/></wcmmode:edit> | ||
</c:when> | ||
<c:otherwise> | ||
<dl> | ||
<c:forEach items="${definitions}" var="definition"> | ||
<dt>${xss:encodeForHTML(xssAPI, definition['term'])}</dt> | ||
<dd>${xss:encodeForHTML(xssAPI, definition['definition'])}</dt> | ||
</c:forEach> | ||
</dl> | ||
</c:otherwise> | ||
</c:choose> |
50 changes: 50 additions & 0 deletions
50
.../src/main/content/jcr_root/apps/acs-commons/components/content/definition-list/dialog.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?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:Dialog" | ||
title="Definition List" | ||
width="600" | ||
xtype="dialog"> | ||
<items | ||
jcr:primaryType="cq:Widget" | ||
xtype="tabpanel"> | ||
<items jcr:primaryType="cq:WidgetCollection"> | ||
<tab1 | ||
jcr:primaryType="cq:Panel" | ||
title="Definitions"> | ||
<items jcr:primaryType="cq:WidgetCollection"> | ||
<definitions | ||
jcr:primaryType="cq:Widget" | ||
fieldLabel="Definitions" | ||
name="./definitions" | ||
orderable="{Boolean}true" | ||
xtype="multifield"> | ||
<fieldConfig | ||
jcr:primaryType="cq:Widget" | ||
xtype="multifieldpanel"> | ||
<items jcr:primaryType="cq:WidgetCollection"> | ||
<term | ||
jcr:primaryType="cq:Widget" | ||
fieldLabel="Term" | ||
key="term" | ||
width="250" | ||
xtype="textfield"/> | ||
<definition | ||
jcr:primaryType="cq:Widget" | ||
fieldLabel="Definition" | ||
key="definition" | ||
width="250" | ||
xtype="textarea"/> | ||
</items> | ||
</fieldConfig> | ||
</definitions> | ||
<typehint | ||
jcr:primaryType="cq:Widget" | ||
ignoreValue="{Boolean}true" | ||
name="./definitions@TypeHint" | ||
value="String[]" | ||
xtype="hidden"/> | ||
</items> | ||
</tab1> | ||
</items> | ||
</items> | ||
</jcr:root> |
Binary file added
BIN
+628 Bytes
...n/content/jcr_root/apps/acs-commons/components/content/definition-list/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+3.62 KB
..._root/apps/acs-commons/widgets/source/images/placeholders/cq-dl-placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.77 KB
..._root/apps/acs-commons/widgets/source/images/placeholders/cq-ul-placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.