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 c5a01c058f2fe62dd66e13dfefbfc8656a8583e1 Author: Radu Cotescu <[email protected]> AuthorDate: Mon Mar 16 13:03:32 2015 +0000 SLING-4506 - Java APIs not consistently available in JavaScript * added getName() and getResourceType() for Resource in addition to name and resourceType properties git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/scripting/sightly/testing-content@1666983 13f79535-47bb-0310-9956-ffa450edef68 --- .../SLING-INF/apps/sightly/scripts/use/jsuse.html | 32 ++++++++++++++++++++++ .../SLING-INF/apps/sightly/scripts/use/jsuse.js | 26 ++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/src/main/resources/SLING-INF/apps/sightly/scripts/use/jsuse.html b/src/main/resources/SLING-INF/apps/sightly/scripts/use/jsuse.html new file mode 100644 index 0000000..62a16f9 --- /dev/null +++ b/src/main/resources/SLING-INF/apps/sightly/scripts/use/jsuse.html @@ -0,0 +1,32 @@ +<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ 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 JavaScript Use-API - Sling implementation</title> + </head> + <body> + <section data-sly-use.jsuse="jsuse.js"> + <div id="resource-name">${jsuse.resourceName}</div> + <div id="resource-getName">${jsuse.resourceGetName}</div> + <div id="resource-resourceType">${jsuse.resourceResourceType}</div> + <div id="resource-getResourceType">${jsuse.resourceGetResourceType}</div> + </section> + </body> +</html> \ No newline at end of file diff --git a/src/main/resources/SLING-INF/apps/sightly/scripts/use/jsuse.js b/src/main/resources/SLING-INF/apps/sightly/scripts/use/jsuse.js new file mode 100644 index 0000000..1cd9611 --- /dev/null +++ b/src/main/resources/SLING-INF/apps/sightly/scripts/use/jsuse.js @@ -0,0 +1,26 @@ +/******************************************************************************* + * 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. + ******************************************************************************/ +use(function () { + return { + resourceName: sightly.resource.name, + resourceGetName: sightly.resource.getName(), + resourceResourceType: sightly.resource.resourceType, + resourceGetResourceType: sightly.resource.getResourceType() + }; +}); -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
