You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:12:07 UTC
[sling-org-apache-sling-scripting-sightly-testing-content] 06/17:
SLING-4402 - The selector manipulation options for data-sly-resource should
accept string arrays
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.scripting.sightly.testing-content-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing-content.git
commit 83710698904cfe7d5b6a81ce41285e0f4125ac00
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Mon Feb 16 14:59:12 2015 +0000
SLING-4402 - The selector manipulation options for data-sly-resource should accept string arrays
* implemented support for using string arrays in the options for data-sly-resource
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/scripting/sightly/testing-content@1660131 13f79535-47bb-0310-9956-ffa450edef68
---
.../scripts/includedresource/includedresource.html | 20 +++++++++++++++
.../apps/sightly/scripts/resource/resource.html | 30 ++++++++++++++++++++++
src/main/resources/SLING-INF/sightly.json | 8 ++++++
3 files changed, 58 insertions(+)
diff --git a/src/main/resources/SLING-INF/apps/sightly/scripts/includedresource/includedresource.html b/src/main/resources/SLING-INF/apps/sightly/scripts/includedresource/includedresource.html
new file mode 100644
index 0000000..023dd40
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sightly/scripts/includedresource/includedresource.html
@@ -0,0 +1,20 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<span class="path">path: ${resource.path}</span><br>
+<span class="selectors">selectors: ${request.requestPathInfo.selectorString}</span>
\ No newline at end of file
diff --git a/src/main/resources/SLING-INF/apps/sightly/scripts/resource/resource.html b/src/main/resources/SLING-INF/apps/sightly/scripts/resource/resource.html
new file mode 100644
index 0000000..b0d75ac
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sightly/scripts/resource/resource.html
@@ -0,0 +1,30 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Sightly data-sly-resource - Sling implementation</title>
+</head>
+<body>
+<div id="selectors" data-sly-resource="${'/sightly/includedresource' @ selectors=['a', 'b']}"></div>
+<div id="selectors-remove-c" data-sly-resource="${'/sightly/includedresource.a.b.c' @ selectors=['a', 'b']}"></div>
+<div id="removeselectors-remove-b" data-sly-resource="${'/sightly/includedresource.a.b.c' @ removeSelectors=['b']}"></div>
+<div id="addselectors" data-sly-resource="${'/sightly/includedresource' @ addSelectors=['a', 'b', 'c']}"></div>
+</body>
+</html>
\ No newline at end of file
diff --git a/src/main/resources/SLING-INF/sightly.json b/src/main/resources/SLING-INF/sightly.json
index 5374050..b9f57d2 100644
--- a/src/main/resources/SLING-INF/sightly.json
+++ b/src/main/resources/SLING-INF/sightly.json
@@ -4,5 +4,13 @@
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "/apps/sightly/scripts/use",
"jcr:title": "SUCCESS"
+ },
+ "resource": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "/apps/sightly/scripts/resource"
+ },
+ "includedresource": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "/apps/sightly/scripts/includedresource"
}
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.