You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2018/05/26 18:42:08 UTC
[sling-whiteboard] branch master updated (f5c6c7b -> ffc7582)
This is an automated email from the ASF dual-hosted git repository.
dklco pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git.
from f5c6c7b Fixing an issue where the search found find un-published pages
new 957a5ae Removing childlist reference component
new d47c7fa Removing the listitemoptions which was only used by childlist
new ffc7582 Updating tags to be a configurable component
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../components/general/childlist/childlist.jsp | 32 --------------
.../components/general/childlist/edit.json | 49 ----------------------
.../components/general/list/listItemOptions.jsp | 32 --------------
.../general/{childlist.json => tags.json} | 2 +-
.../reference/components/general/tags/config.json | 34 +++++++++++++++
.../reference/components/general/tags/edit.json | 9 ++++
.../reference/components/general/tags/tags.jsp | 21 ++++++----
7 files changed, 58 insertions(+), 121 deletions(-)
delete mode 100644 cms/reference/src/main/resources/jcr_root/apps/reference/components/general/childlist/childlist.jsp
delete mode 100644 cms/reference/src/main/resources/jcr_root/apps/reference/components/general/childlist/edit.json
delete mode 100644 cms/reference/src/main/resources/jcr_root/apps/reference/components/general/list/listItemOptions.jsp
rename cms/reference/src/main/resources/jcr_root/apps/reference/components/general/{childlist.json => tags.json} (70%)
create mode 100644 cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/config.json
create mode 100644 cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/edit.json
--
To stop receiving notification emails like this one, please contact
dklco@apache.org.
[sling-whiteboard] 03/03: Updating tags to be a configurable
component
Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
commit ffc75824c36ccbeeb4bd88e8257e2c795296ac6c
Author: Dan Klco <dk...@apache.org>
AuthorDate: Sat May 26 14:42:01 2018 -0400
Updating tags to be a configurable component
---
.../apps/reference/components/general/tags.json | 5 ++++
.../reference/components/general/tags/config.json | 34 ++++++++++++++++++++++
.../reference/components/general/tags/edit.json | 9 ++++++
.../reference/components/general/tags/tags.jsp | 21 ++++++++-----
4 files changed, 62 insertions(+), 7 deletions(-)
diff --git a/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags.json b/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags.json
new file mode 100644
index 0000000..80df40a
--- /dev/null
+++ b/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags.json
@@ -0,0 +1,5 @@
+{
+ "jcr:primaryType": "sling:Component",
+ "componentType": "General",
+ "jcr:title": "Tags"
+}
\ No newline at end of file
diff --git a/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/config.json b/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/config.json
new file mode 100644
index 0000000..7111792
--- /dev/null
+++ b/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/config.json
@@ -0,0 +1,34 @@
+ {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/general/container",
+ "tagPage": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/fields/path",
+ "label": "Tag Page",
+ "name": "tagPage"
+ },
+ "listTag": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/fields/text",
+ "label": "List Tag",
+ "name": "listTag"
+ },
+ "listClass": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/fields/text",
+ "label": "List Class",
+ "name": "listClass"
+ },
+ "itemTag": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/fields/text",
+ "label": "Item Tag",
+ "name": "itemTag"
+ },
+ "itemClass": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/fields/text",
+ "label": "Item Class",
+ "name": "itemClass"
+ }
+}
\ No newline at end of file
diff --git a/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/edit.json b/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/edit.json
new file mode 100644
index 0000000..67a9d32
--- /dev/null
+++ b/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/edit.json
@@ -0,0 +1,9 @@
+ {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/slingform",
+ "button": "No Need to Edit",
+ "fields": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/general/container"
+ }
+}
\ No newline at end of file
diff --git a/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/tags.jsp b/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/tags.jsp
index 51dcd52..cd0ee3b 100644
--- a/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/tags.jsp
+++ b/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/tags.jsp
@@ -17,11 +17,18 @@
* under the License.
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
- <sling:adaptTo adaptable="${resource}" adaptTo="org.apache.sling.cms.core.models.PageManager" var="pageMgr" />
+<sling:adaptTo adaptable="${resource}" adaptTo="org.apache.sling.cms.core.models.PageManager" var="pageMgr" />
+<c:set var="config" value="${pageMgr.page.template.componentConfigs['reference/components/general/tags']}" scope="request" />
<c:set var="contentResource" value="${sling:getRelativeResource(page.resource,'jcr:content')}" />
-<c:forEach var="tagPath" items="${contentResource.valueMap['keywords']}">
- <c:set var="tag" value="${sling:getResource(resourceResolver,tagPath)}" />
- <a href="/tags.html${tag.path}.html" class="label">
- <sling:encode value="${tag.valueMap['jcr:title']}" default="${tag.name}" mode="HTML" />
- </a>
-</c:forEach>
+<c:set var="listTag" value="${config.listTag}" default="div" />
+<c:set var="itemTag" value="${config.itemTag}" default="span" />
+<${listTag} class="${config.listClass}">
+ <c:forEach var="tagPath" items="${contentResource.valueMap['keywords']}">
+ <c:set var="tag" value="${sling:getResource(resourceResolver,tagPath)}" />
+ <${itemTag} class="${config.itemClass}">
+ <a href="${config.tagPage}.html${tag.path}.html">
+ <sling:encode value="${tag.valueMap['jcr:title']}" default="${tag.name}" mode="HTML" />
+ </a>
+ </${itemTag}>
+ </c:forEach>
+</${listTag}>
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
dklco@apache.org.
[sling-whiteboard] 02/03: Removing the listitemoptions which was
only used by childlist
Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
commit d47c7faf719f3c48cce8297e8ba8b684e7226ce0
Author: Dan Klco <dk...@apache.org>
AuthorDate: Sat May 26 14:41:50 2018 -0400
Removing the listitemoptions which was only used by childlist
---
.../components/general/list/listItemOptions.jsp | 32 ----------------------
1 file changed, 32 deletions(-)
diff --git a/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/list/listItemOptions.jsp b/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/list/listItemOptions.jsp
deleted file mode 100644
index 2f2d4db..0000000
--- a/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/list/listItemOptions.jsp
+++ /dev/null
@@ -1,32 +0,0 @@
-<%-- /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */ --%>
- <%@include file="/libs/sling-cms/global.jsp"%>
-<option value="">Select Component</option>
-<c:set var="query" value="SELECT * FROM [sling:Component] WHERE [componentType]='ListItems'" />
-<c:forEach var="component" items="${sling:findResources(resourceResolver,query,'JCR-SQL2')}">
- <c:choose>
- <c:when test="${fn:startsWith(component.path,'/apps/')}">
- <c:set var="rt" value="${fn:substringAfter(component.path,'/apps/')}" />
- </c:when>
- <c:otherwise>
- <c:set var="rt" value="${fn:substringAfter(component.path,'/libs/')}" />
- </c:otherwise>
- </c:choose>
- <option value="${rt}" ${rt == editProperties.itemType ? 'selected' : ''}><sling:encode value="${component.valueMap['jcr:title']}" mode="HTML" /></option>
-</c:forEach>
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
dklco@apache.org.
[sling-whiteboard] 01/03: Removing childlist reference component
Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
commit 957a5ae38ade527dd3d7bd7c93b613faa477f4ab
Author: Dan Klco <dk...@apache.org>
AuthorDate: Sat May 26 14:41:32 2018 -0400
Removing childlist reference component
---
.../reference/components/general/childlist.json | 5 ---
.../components/general/childlist/childlist.jsp | 32 --------------
.../components/general/childlist/edit.json | 49 ----------------------
3 files changed, 86 deletions(-)
diff --git a/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/childlist.json b/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/childlist.json
deleted file mode 100644
index 44a79da..0000000
--- a/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/childlist.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "jcr:primaryType": "sling:Component",
- "componentType": "General",
- "jcr:title": "Child List"
-}
\ No newline at end of file
diff --git a/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/childlist/childlist.jsp b/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/childlist/childlist.jsp
deleted file mode 100644
index dc02188..0000000
--- a/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/childlist/childlist.jsp
+++ /dev/null
@@ -1,32 +0,0 @@
-<%-- /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */ --%>
-<%@include file="/libs/sling-cms/global.jsp"%>
-<c:if test="${not empty properties.itemType}">
- <c:set var="basePath" value="${not empty properties.basePath ? properties.basePath : resource.path} }" />
- <c:set var="limit" value="${not empty properties.limit ? properties.limit : 1000} }" />
- <c:set var="tag" value="${not empty properties.tag ? properties.tag : 'ul'} }" />
- <c:set var="class" value="${not empty properties.class ? properties.class : ''} }" />
- <${tag} class="${class}">
- <c:forEach var="child" items="${sling:listChildren(sling:getResource(resourceResolver,basePath))}" end="${limit}">
- <c:if test="${child.resourceType == 'sling:Page'}">
- <sling:include path="${child.path}" resourceType="${properties.itemType}" />
- </c:if>
- </c:forEach>
- </${tag}>
-</c:if>
\ No newline at end of file
diff --git a/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/childlist/edit.json b/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/childlist/edit.json
deleted file mode 100644
index a0a528b..0000000
--- a/cms/reference/src/main/resources/jcr_root/apps/reference/components/general/childlist/edit.json
+++ /dev/null
@@ -1,49 +0,0 @@
- {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/slingform",
- "button": "Save",
- "fields": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/general/container",
- "basePath": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/fields/path",
- "basePath": "/content",
- "label": "Base Path",
- "name": "basePath",
- "required": false,
- "titleProperty": "jcr:content/jcr:title",
- "type": "sling:Page"
- },
- "itemType": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/fields/select",
- "label": "Item Type",
- "name": "itemType",
- "optionsScript": "/apps/reference/components/general/list/listItemOptions.jsp",
- "required": true
- },
- "limit": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/fields/text",
- "label": "Limit",
- "name": "limit",
- "required": false,
- "type": "number"
- },
- "tag": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/fields/text",
- "label": "List Tag",
- "name": "tag",
- "required": false
- },
- "class": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/fields/text",
- "label": "List Class",
- "name": "class",
- "required": false
- }
- }
-}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
dklco@apache.org.