sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [sling-whiteboard] branch master updated: Updated method for the list to be less confusing, having sub-lists only override the results.
Date Thu, 01 Mar 2018 02:01:15 GMT
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


The following commit(s) were added to refs/heads/master by this push:
     new 5c1e874  Updated method for the list to be less confusing, having sub-lists only
override the results.
5c1e874 is described below

commit 5c1e874d6619c82f66acc57825e8c7c14597bc9e
Author: Dan Klco <daniel.klco@gmail.com>
AuthorDate: Wed Feb 28 18:01:06 2018 -0800

    Updated method for the list to be less confusing, having sub-lists only
    override the results.
---
 .../reference/components/general/list/edit.json    |   8 -
 .../{listitem/listitem.jsp => list/item.jsp}       |   8 +-
 .../reference/components/general/list/list.jsp     |   5 +-
 .../etc/clientlibs/reference/img/apache.png        | Bin 12022 -> 0 bytes
 .../etc/clientlibs/reference/img/sling.svg         |  19 --
 .../jcr_root/etc/clientlibs/reference/site.css     | 339 ---------------------
 6 files changed, 7 insertions(+), 372 deletions(-)

diff --git a/cms/ui/src/main/resources/jcr_root/apps/reference/components/general/list/edit.json
b/cms/ui/src/main/resources/jcr_root/apps/reference/components/general/list/edit.json
index b6f8450..607c520 100644
--- a/cms/ui/src/main/resources/jcr_root/apps/reference/components/general/list/edit.json
+++ b/cms/ui/src/main/resources/jcr_root/apps/reference/components/general/list/edit.json
@@ -45,14 +45,6 @@
 			"name": "includePagination@TypeHint",
 			"value": "Boolean"
 		},
-		"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
-		},
 		"tag": {
 			"jcr:primaryType": "nt:unstructured",
 			"sling:resourceType": "sling-cms/components/editor/fields/text",
diff --git a/cms/ui/src/main/resources/jcr_root/apps/reference/components/general/listitem/listitem.jsp
b/cms/ui/src/main/resources/jcr_root/apps/reference/components/general/list/item.jsp
similarity index 75%
rename from cms/ui/src/main/resources/jcr_root/apps/reference/components/general/listitem/listitem.jsp
rename to cms/ui/src/main/resources/jcr_root/apps/reference/components/general/list/item.jsp
index b062b4f..0f39089 100644
--- a/cms/ui/src/main/resources/jcr_root/apps/reference/components/general/listitem/listitem.jsp
+++ b/cms/ui/src/main/resources/jcr_root/apps/reference/components/general/list/item.jsp
@@ -19,14 +19,14 @@
  <%@include file="/libs/sling-cms/global.jsp"%>
 <li>
 	<c:choose>
-		<c:when test="${resource.resourceType == 'sling:File' || resource.resourceType == 'nt:file'}">
-			<c:set var="url" value="${resource.path }" />
+		<c:when test="${item.resourceType == 'sling:File' || item.resourceType == 'nt:file'}">
+			<c:set var="url" value="${item.path }" />
 		</c:when>
 		<c:otherwise>
-			<c:set var="url" value="${resource.path}.html" />
+			<c:set var="url" value="${item.path}.html" />
 		</c:otherwise>
 	</c:choose>
 	<a href="${url}">
-		<sling:encode value="${resource.valueMap['jcr:content/jcr:title']}" default="${resource.name}"
mode="HTML" />
+		<sling:encode value="${item.valueMap['jcr:content/jcr:title']}" default="${item.name}"
mode="HTML" />
 	</a>
 </li>
\ No newline at end of file
diff --git a/cms/ui/src/main/resources/jcr_root/apps/reference/components/general/list/list.jsp
b/cms/ui/src/main/resources/jcr_root/apps/reference/components/general/list/list.jsp
index a206720..f92b450 100644
--- a/cms/ui/src/main/resources/jcr_root/apps/reference/components/general/list/list.jsp
+++ b/cms/ui/src/main/resources/jcr_root/apps/reference/components/general/list/list.jsp
@@ -24,8 +24,9 @@
 <c:if test="${not empty properties.limit}">
 	<c:set var="list" value="${sling:adaptTo(slingRequest, 'org.apache.sling.cms.reference.models.ItemList')}"
scope="request"  />
 	<${tag} class="list ${clazz}">
-		<c:forEach var="item" items="${list.items}">
-			<sling:include path="${item.path}" resourceType="${properties.itemType}" />
+		<c:forEach var="it" items="${list.items}">
+			<c:set var="item" value="${it}" scope="request" />
+			<sling:call script="item.jsp" />
 		</c:forEach>
 		<c:if test="${properties.includePagination}">
 			<sling:call script="pagination.jsp" />
diff --git a/cms/ui/src/main/resources/jcr_root/etc/clientlibs/reference/img/apache.png b/cms/ui/src/main/resources/jcr_root/etc/clientlibs/reference/img/apache.png
deleted file mode 100644
index fc3f667..0000000
Binary files a/cms/ui/src/main/resources/jcr_root/etc/clientlibs/reference/img/apache.png
and /dev/null differ
diff --git a/cms/ui/src/main/resources/jcr_root/etc/clientlibs/reference/img/sling.svg b/cms/ui/src/main/resources/jcr_root/etc/clientlibs/reference/img/sling.svg
deleted file mode 100644
index ac3c0e7..0000000
--- a/cms/ui/src/main/resources/jcr_root/etc/clientlibs/reference/img/sling.svg
+++ /dev/null
@@ -1,19 +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.
--->
-<svg id="Sling_Logo" data-name="Sling Logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 768 392"><defs><linearGradient id="linear-gradient" x1="-8576.57"
y1="2068.26" x2="-8523.42" y2="2006.11" gradientTransform="matrix(-1, -0.01, -0.01, 1, -8384.13,
-1821.1)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f69923"/><stop
offset="0.31" stop-color="#f79a23"/><stop offset="0.84" stop-color="#e97826"/></linearGradient><linearGradie
[...]
\ No newline at end of file
diff --git a/cms/ui/src/main/resources/jcr_root/etc/clientlibs/reference/site.css b/cms/ui/src/main/resources/jcr_root/etc/clientlibs/reference/site.css
deleted file mode 100644
index 5f6e7b2..0000000
--- a/cms/ui/src/main/resources/jcr_root/etc/clientlibs/reference/site.css
+++ /dev/null
@@ -1,339 +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.
- */
-body {
-    background-color: #ffffff;
-    color: #3b3b3b;
-    font-family: Tahoma, Arial, sans-serif;
-    font-size: 10pt;
-    line-height: 140%
-}
-
-h1,h2,h3,h4,h5,h6 {
-    font-weight: normal;
-    color: #000000;
-    line-height: 100%;
-}
-
-.tocHeading {
-	font-size:120%;
-	font-weight:bold;
-}
-
-h1 {
-    font-size: 200%;
-    font-weight: bold;
-    border-bottom: solid #EEE 1px;
-    border-top: solid #EEE 1px;
-    padding-top:.2em;
-    padding-bottom:.2em;
-}
-
-h2 {
-    font-size: 200%;
-    margin-top: 1em;
-    font-weight: normal;
-    border-top: solid #e0e0e0 1px;
-    padding-top: 0.45em;
-}
-
-h1 a, h1 a:visited, h2 a, h2 a:visited, h3 a, h3 a:visited, h4 a, h4 a:visited {
-	color:black;
-	text-decoration:none;
-}
-
-h3 {
-    font-size: 150%
-}
-
-h4 {
-    font-size: 140%
-}
-
-h5 {
-    font-size: 130%
-}
-
-h6 {
-    font-size: 120%
-}
-
-a {
-    color: #1980af
-}
-
-a:visited {
-    color: #1980af
-}
-
-a:hover {
-    color: #1faae9
-}
-
-img {
-    max-width: 100%;
-    border: solid 1px #EEE;
-    margin-top: 0.5em;
-    margin-bottom: 0.5em;
-    padding: 0.5em
-}
-
-.title {
-    position: absolute;
-    left: 1px;
-    right: 1px;
-    top: 25px;
-    height: 81px;
-    background:
-        url(https://sling.apache.org/site/media.data/gradient.png)
-        repeat-x;
-    background-position: bottom;
-}
-
-.title img {
-    width: auto;
-    border: none;
-    margin-top: 0px;
-    margin-bottom: 0px;
-    padding: 0px;    
-}
-
-.logo {
-    position: absolute;
-    width: 15em;
-    height: 81px;
-    text-align: center;
-}
-
-.logo img {
-    height: 63px;
-}
-
-.header {
-    text-align: right;
-    margin-right: 20pt;
-}
-
-.menu {
-    border-top: 10px solid #f9bb00;
-    position: absolute;
-    top: 107px;
-    left: 1px;
-    width: 15em;
-    bottom: 0px;
-    padding: 0px;
-    background-color: #fcfcfc
-}
-
-.menu ul,.menu p {
-    background-color: #fdf5d9;
-    list-style: none;
-    padding-left: 4em;
-    margin-top: 0px;
-    padding-top: 2em;
-    padding-bottom: 2em;
-    margin-left: 0px;
-    color: #4a4a43
-}
-
-.menu p {
-    font-size: 90%;
-    margin: 0px;
-    padding: 1px;
-    padding-left: 1em;
-    padding-bottom: 1em;
-}
-
-.menu a {
-    text-decoration: none;
-    color: #4a4a43
-}
-
-.main {
-    position: absolute;
-    border-top: 10px solid #cde0ea;
-    top: 107px;
-    left: 15em;
-    right: 1px;
-    margin-left: 2px;
-    padding-right: 4em;
-    padding-left: 1em;
-    padding-top: 1em;
-}
-
-.preformatted {
-    color: black;
-    background-color: #eeeeee;
-    border: solid 1px black;
-    padding: 0.5em
-}
-
-.preformattedContent pre {
-    margin: 0em
-}
-
-table {
-    border-collapse: collapse;
-    margin: 5px;
-}
-
-th {
-    background-color: #FDF5D9;
-    border: 1px solid #DDD;
-    padding: 3px 4px;
-    text-align: left;
-    font-weight:bold;
-    font-size:90%;
-    padding: 3px 4px;
-}
-
-td {
-    border: 1px solid #DDD;
-    padding: 3px 4px;
-}
-
-.note
-{
-/*
-    background-color: #FFFFCE;
-    border: 1px solid #F0C000;
-*/
-    border: 1px solid #f0c000;
-	background: #ffffce url('icons/warning.gif') no-repeat 5px 5px;
-	text-align: left;
-	margin-top: 5px;
-	margin-bottom: 5px;
-	padding: 5px 5px 5px 28px;
-}
-
-.warning
-{
-/*
-    background-color: #FFCCCC;
-    border: 1px solid #CC0000;
-*/
-    border: 1px solid #f0c000;
-	background: #ffffce url('icons/forbidden.gif') no-repeat 5px 5px;
-	text-align: left;
-	margin-top: 5px;
-	margin-bottom: 5px;
-	padding: 5px 5px 5px 28px;
-}
-
-.info
-{
-/*
-    background-color: #D8E4F1;
-    border: 1px solid #3C78B5;
-*/
-    border: 1px solid #3c78b5;
-	background: #D8E4F1 url('icons/information.gif') no-repeat 5px 5px;
-	text-align: left;
-	margin-top: 5px;
-	margin-bottom: 5px;
-	padding: 5px 5px 5px 28px;
-}
-
-.tip
-{
-/*
-    background-color: #DDFFDD;
-    border: 1px solid #009900;
-*/
-	border: 1px solid #090;
-	background: #dfd url('/res/icons/check.gif') no-repeat 5px 5px;
-	text-align: left;
-	margin-top: 5px;
-	margin-bottom: 5px;
-	padding: 5px 5px 5px 28px;
-}
-
-/** Last modification information at the botton of each page */
-.timestamp {
-    margin-top: 30px;
-    font-size: 80%;
-    text-align: right;
-}
-
-.footer {
-    font-size: 80%;
-    font-style: italic;
-    margin-top: 10px;
-    text-align: left;
-}
-
-blockquote {
-    font-style: italic;
-    margin: 0;
-    padding-left: 1em;
-    border-left: 1px solid black;
-}
-
-pre {
-    color: black;
-    background-color: #f0f0f0;
-    border: solid 1px #f5f5f5;
-    margin-top: 0.5em;
-    margin-bottom: 0.5em;
-    padding: 0.5em;
-    width: 100%;
-}
-
-.draft {
-	font-size:150%;
-	font-weight:bold;
-    color:blue;
-    text-align:center;
-}
-
-.footer {
-    padding-top: 1em; 
-}
-
-.badge {
-    border-radius: 2px;
-    background-color: #EEE;
-    text-align: center;
-    padding-left: 3px;
-    padding-right: 3px;
-	margin-left: 3px;
-}
-
-.pagenav {
-    overflow:hidden
-    font-size: 70%;
-    clear:both;
-    padding-bottom:1em;
-}
-
-.breadcrumbs {
-    float:left;
-}
-
-.tags {
-    float:right;
-}
-
-.tags a {
-    background-color: #EEE;
-	padding: 0.2em;
-    margin-left: 0.2em;
-	text-decoration: none;
-}
-
-.allTagsLink {
-    padding-right:0.5em;
-}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
dklco@apache.org.

Mime
View raw message