--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/logo/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/page/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/page/clientlib/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/page/clientlib/css.txt:
--------------------------------------------------------------------------------
1 |
2 | style.css
3 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/page/clientlib/style.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Adobe Systems Incorporated
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | .page__main {
18 | position: relative;
19 | max-width: 940px;
20 | margin: 0 auto;
21 | padding: 0 1em 1em;
22 | background-color: #fff;
23 | box-shadow: 0 0 9px 1px rgba(0,0,0,.2);
24 | -moz-box-shadow: 0 0 9px 1px -moz-rgba(0,0,0,.2);
25 | -webkit-box-shadow: 0 0 9px 1px rgba(0,0,0,.2);
26 | zoom: 100%;
27 | }
28 |
29 | .page__logo {
30 | display: inline-block;
31 | }
32 |
33 | .page__topnav {
34 | position: absolute;
35 | top: 20px;
36 | right: 1em;
37 | }
38 |
39 | .page__title h1 {
40 | color: #025c1f;
41 | text-transform: uppercase;
42 | }
43 |
44 | /* Scale down too wide images from the parsys */
45 | .page__par img {
46 | max-width: 100%;
47 | }
48 |
49 | .page__copyright {
50 | margin-bottom: 0;
51 | }
52 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/page/page.html:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/page/partials/footlibs.html:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/page/partials/head.html:
--------------------------------------------------------------------------------
1 |
16 |
17 | ${currentPage.title || currentPage.name}
18 |
19 |
20 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/page/partials/head.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Adobe Systems Incorporated
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | // Server-side JavaScript for the head.html logic
18 | use(function () {
19 | var WCMUtils = Packages.com.day.cq.wcm.commons.WCMUtils;
20 | var resourceResolver = resource.getResourceResolver();
21 |
22 | return {
23 | keywords: WCMUtils.getKeywords(currentPage, false),
24 | favIcon: resourceResolver.getResource(currentDesign.getPath() + "/favicon.ico")
25 | };
26 | });
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/page/partials/headlibs.html:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/page/partials/main.html:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
28 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/page/partials/main.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Adobe Systems Incorporated
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | // Server-side JavaScript for the main.html logic
18 | use(function () {
19 | var Calendar = Packages.java.util.Calendar;
20 | var currentYear = Calendar.getInstance().get(Calendar.YEAR);
21 |
22 | return {
23 | year: currentYear
24 | };
25 | });
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/topnav/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/topnav/clientlib/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/topnav/clientlib/css.txt:
--------------------------------------------------------------------------------
1 |
2 | style.css
3 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/topnav/clientlib/style.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Adobe Systems Incorporated
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | .topnav {
18 | float: right;
19 | list-style: none;
20 | }
21 | .topnav__item {
22 | float: left;
23 | margin-left: 15px;
24 | }
25 | .topnav__item--selected {
26 | font-weight: bold;
27 | }
28 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/topnav/topnav.html:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/components/structure/topnav/topnav.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Adobe Systems Incorporated
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | // Server-side JavaScript for the topnav logic
18 | use(function () {
19 | var items = [];
20 | var root = currentPage.getAbsoluteParent(1);
21 | var currentNavPath = currentPage.getAbsoluteParent(2).getPath();
22 | var it = root.listChildren(new Packages.com.day.cq.wcm.api.PageFilter());
23 |
24 | while (it.hasNext()) {
25 | var page = it.next();
26 |
27 | // No strict comparison, because the types returned from the Java APIs
28 | // don't strictly match the JavaScript types
29 | var selected = (page.getPath() == currentNavPath);
30 |
31 | items.push({
32 | page: page,
33 | selected : selected
34 | });
35 | }
36 |
37 | return {
38 | items: items
39 | };
40 | });
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/i18n/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/i18n/fr.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
11 |
12 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/templates/page-content/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
11 |
14 |
17 |
20 |
23 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/apps/aem-touch-ui-validation/templates/page-home/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
11 |
14 |
17 |
20 |
23 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
8 |
9 |
13 |
17 |
19 |
20 |
27 |
28 |
29 |
30 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/_jcr_content/page/logo/image:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nateyolles/aem-touch-ui-validation/8e72da05b403c348250b10b695dac7553228d268/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/_jcr_content/page/logo/image
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/_jcr_content/page/logo/image.dir/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-all/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-all/README.md:
--------------------------------------------------------------------------------
1 |
2 | This client library should be left empty: it's purpose is to list all client libraries that the site requires. This allows to manage flexibly what is to be included in which order, as well as to accelerate the site by concatenating everything into one file.
3 |
4 | Another reason why this client library is playing an essential role is that in production, access to /apps should be blocked by the dispatcher, therefore no client library located under /apps can be directly accessed anymore.
5 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-all/css.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nateyolles/aem-touch-ui-validation/8e72da05b403c348250b10b695dac7553228d268/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-all/css.txt
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-all/js.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nateyolles/aem-touch-ui-validation/8e72da05b403c348250b10b695dac7553228d268/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-all/js.txt
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-site/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-site/README.md:
--------------------------------------------------------------------------------
1 |
2 | This client library should contain general styles and scripts. Everything specific to components should be placed in client libraries below the corresponding components.
3 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-site/css.txt:
--------------------------------------------------------------------------------
1 |
2 | style.css
3 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-site/js.txt:
--------------------------------------------------------------------------------
1 |
2 | script.js
3 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-site/script.js:
--------------------------------------------------------------------------------
1 | /** a JS file that shall be included */
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-site/style.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Adobe Systems Incorporated
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | body {
18 | margin: 0;
19 | padding: 0;
20 | font-family: sans-serif;
21 | font-size: 0.875em;
22 | line-height: 1.2;
23 | background-color: #d3d3d3;
24 | }
25 |
26 | a {
27 | text-decoration: none;
28 | color: #025c1f;
29 | }
30 | a:hover {
31 | text-decoration: underline;
32 | }
33 |
34 | img {
35 | vertical-align: top;
36 | }
37 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-touch-ui-validation/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-touch-ui-validation/css.txt:
--------------------------------------------------------------------------------
1 | #base=css
2 |
3 | autocomplete.css
4 | colorpicker.css
5 | multifield.css
6 | pathbrowser.css
7 | radiogroup.css
8 | autocomplete.css
9 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-touch-ui-validation/css/autocomplete.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Nate Yolles
3 | *
4 | * https://github.com/nateyolles/aem-touch-ui-validation
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | .js-coral-Autocomplete-textfield.is-invalid ~ .coral-InputGroup-button > .coral-Button {
19 | border: solid 1px #e14132;
20 | }
21 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-touch-ui-validation/css/colorpicker.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Nate Yolles
3 | *
4 | * https://github.com/nateyolles/aem-touch-ui-validation
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | .coral-ColorPicker .marker-colorpicker {
19 | display: none;
20 | }
21 |
22 | .coral-ColorPicker.is-invalid button {
23 | border: solid 1px #e14132;
24 | }
25 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-touch-ui-validation/css/multifield.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Nate Yolles
3 | *
4 | * https://github.com/nateyolles/aem-touch-ui-validation
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | .coral-Multifield.is-invalid {
19 | border: solid 1px #e14132;
20 | }
21 |
22 | .coral-Multifield .marker-multifield {
23 | display: none;
24 | }
25 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-touch-ui-validation/css/pathbrowser.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Nate Yolles
3 | *
4 | * https://github.com/nateyolles/aem-touch-ui-validation
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | .js-coral-pathbrowser-input.is-invalid + .coral-InputGroup-button > .coral-Button {
19 | border: solid 1px #e14132;
20 | }
21 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-touch-ui-validation/css/radiogroup.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Nate Yolles
3 | *
4 | * https://github.com/nateyolles/aem-touch-ui-validation
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | .coral-RadioGroup.is-invalid {
19 | border: solid 1px #e14132;
20 | }
21 |
22 | .coral-RadioGroup .marker {
23 | display: none;
24 | }
25 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-touch-ui-validation/js.txt:
--------------------------------------------------------------------------------
1 | #base=js
2 |
3 | customEvents.js
4 | utils.js
5 | autocomplete.js
6 | colorpicker.js
7 | multifield.js
8 | pathbrowser.js
9 | radiogroup.js
10 | textfield.js
11 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-touch-ui-validation/js/autocomplete.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Nate Yolles
3 | *
4 | * https://github.com/nateyolles/aem-touch-ui-validation
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | /**
20 | * Validation for Granite Touch UI autocomplete and userPicker.
21 | *
22 | * Additional properties for granite/ui/components/foundation/form/userPicker
23 | * are:
24 | *
25 | * {Boolean}required
26 | * Is field required
27 | * defaults to false
28 | *
29 | *
35 | */
36 | (function(ns, window, document, $, Granite, undefined) {
37 | 'use strict';
38 |
39 | var USER_PICKER_SELECTOR = '.coral-Autocomplete';
40 |
41 | $.validator.register({
42 | selector: '.marker-userpicker',
43 | validate: function(el) {
44 | var required,
45 | value;
46 |
47 | required = el.attr('aria-required');
48 | value = el.val();
49 |
50 | if (required && !value) {
51 | return Granite.I18n.get('Please fill out this field.');
52 | } else {
53 | el.setCustomValidity(null);
54 | el.updateErrorUI();
55 | }
56 | }
57 | });
58 |
59 | /**
60 | * Copy required attribute from the container to the form element and create a
61 | * click event handler when a Granite UI dialog loads.
62 | */
63 | $(document).on('foundation-contentloaded', function(e) {
64 | var $dialog,
65 | $userPickers;
66 |
67 | $dialog = $(e.target);
68 | $userPickers = $dialog.find(USER_PICKER_SELECTOR);
69 |
70 | $userPickers.each(function() {
71 | var $userPicker,
72 | $input,
73 | required;
74 |
75 | $userPicker = $(this);
76 | $input = $userPicker.find('input[type="text"]');
77 | required = ns.utils.getAttribute($userPicker, 'aria-required', false);
78 |
79 | if (required) {
80 | $input.attr('aria-required', 'true')
81 | .addClass('marker-userpicker');
82 |
83 | /* Revalidate on autocomplete selection */
84 | $input.closest('.coral-Form-field')
85 | .click(function(){
86 | $input.checkValidity();
87 | });
88 | }
89 | });
90 | });
91 |
92 | })(window.aemTouchUIValidation = window.aemTouchUIValidation || {}, window, document, Granite.$, Granite);
93 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-touch-ui-validation/js/customEvents.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Nate Yolles
3 | *
4 | * https://github.com/nateyolles/aem-touch-ui-validation
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | /**
20 | * Trigger jQuery event 'stylechange' when a jQuery object's style attribute
21 | * changes.
22 | */
23 | (function() {
24 | var originalCss= $.fn.css;
25 |
26 | $.fn.css = function() {
27 | var event = new $.Event('stylechange');
28 | $(this).trigger(event);
29 | return originalCss.apply(this, arguments);
30 | }
31 | })();
32 |
--------------------------------------------------------------------------------
/demo/ui.apps/src/main/content/jcr_root/etc/designs/aem-touch-ui-validation/clientlib-touch-ui-validation/js/utils.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Nate Yolles
3 | *
4 | * https://github.com/nateyolles/aem-touch-ui-validation
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | /**
20 | * AEM Touch UI Validation library common utilities
21 | */
22 | (function(ns, window, document, $, Granite, undefined) {
23 | 'use strict';
24 |
25 | ns.utils = {
26 | /**
27 | * Is a string not null, undefined, blank or empty
28 | *
29 | * @param {String} The string to test
30 | * @return {Boolean} Is string not null, undefined, blank or empty
31 | * @function
32 | */
33 | isNotBlank: function(str) {
34 | return typeof str !== 'undefined' && str !== null && str.trim() !== '';
35 | },
36 |
37 | /**
38 | * Get a data attribute from a jQuery object
39 | *
40 | * If the data attribute is undefined, return the default value.
41 | *
42 | * @param {jQuery} A jQuery object
43 | * @param {String} Data attribute to retrieve from the jQuery object
44 | * @param {String} Default value if data attribute is undefined
45 | * @return {String|Number} The data attribute or default value
46 | * @function
47 | */
48 | getDataAttribute: function($el, property, defaultVal) {
49 | var value = $el.data(property);
50 |
51 | return value === undefined ? defaultVal : value;
52 | },
53 |
54 | /**
55 | * Get a attribute from a jQuery object
56 | *
57 | * If the attribute is undefined, return the default value.
58 | *
59 | * @param {jQuery} A jQuery object
60 | * @param {String} Attribute to retrieve from the jQuery object
61 | * @param {String} Default value if attribute is undefined
62 | * @return {String|Number} The attribute or default value
63 | * @function
64 | */
65 | getAttribute: function($el, property, defaultVal) {
66 | var value = $el.attr(property);
67 |
68 | return value === undefined ? defaultVal : value;
69 | },
70 |
71 | /**
72 | * Get the validation error HTML as a jQuery object
73 | *
74 | * @return {jQuery} The validation error HTML as a jQuery object
75 | * @function
76 | */
77 | getFieldErrorEl: function() {
78 | return $("").clone();
79 | }
80 | };
81 |
82 | })(window.aemTouchUIValidation = window.aemTouchUIValidation || {}, window, document, Granite.$, Granite);
83 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/aem-touch-ui-validation.ui.apps-1.0-SNAPSHOT.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nateyolles/aem-touch-ui-validation/8e72da05b403c348250b10b695dac7553228d268/demo/ui.apps/target/aem-touch-ui-validation.ui.apps-1.0-SNAPSHOT.zip
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/content/colctrl/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/content/colctrl/clientlib/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/content/colctrl/clientlib/css.txt:
--------------------------------------------------------------------------------
1 | style.css
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/content/colctrl/clientlib/style.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Adobe Systems Incorporated
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /* Column Control component */
18 | @media (min-width: 600px) {
19 | .parsys_column {
20 | margin: 0;
21 | }
22 | .cq-colctrl-lt0-c0,
23 | .cq-colctrl-lt0-c1 {
24 | float: left;
25 | width: 48%;
26 | }
27 | .cq-colctrl-lt0-c0 {
28 | margin-right: 2%;
29 | }
30 | .cq-colctrl-lt0-c1 {
31 | margin-left: 2%;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/content/colorpicker/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/content/colorpicker/_cq_dialog/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
9 |
12 |
13 |
16 |
17 |
22 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/content/colorpicker/colorpicker.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/logo/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/page/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/page/clientlib/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/page/clientlib/css.txt:
--------------------------------------------------------------------------------
1 |
2 | style.css
3 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/page/clientlib/style.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Adobe Systems Incorporated
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | .page__main {
18 | position: relative;
19 | max-width: 940px;
20 | margin: 0 auto;
21 | padding: 0 1em 1em;
22 | background-color: #fff;
23 | box-shadow: 0 0 9px 1px rgba(0,0,0,.2);
24 | -moz-box-shadow: 0 0 9px 1px -moz-rgba(0,0,0,.2);
25 | -webkit-box-shadow: 0 0 9px 1px rgba(0,0,0,.2);
26 | zoom: 100%;
27 | }
28 |
29 | .page__logo {
30 | display: inline-block;
31 | }
32 |
33 | .page__topnav {
34 | position: absolute;
35 | top: 20px;
36 | right: 1em;
37 | }
38 |
39 | .page__title h1 {
40 | color: #025c1f;
41 | text-transform: uppercase;
42 | }
43 |
44 | /* Scale down too wide images from the parsys */
45 | .page__par img {
46 | max-width: 100%;
47 | }
48 |
49 | .page__copyright {
50 | margin-bottom: 0;
51 | }
52 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/page/page.html:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/page/partials/footlibs.html:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/page/partials/head.html:
--------------------------------------------------------------------------------
1 |
16 |
17 | ${currentPage.title || currentPage.name}
18 |
19 |
20 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/page/partials/head.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Adobe Systems Incorporated
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | // Server-side JavaScript for the head.html logic
18 | use(function () {
19 | var WCMUtils = Packages.com.day.cq.wcm.commons.WCMUtils;
20 | var resourceResolver = resource.getResourceResolver();
21 |
22 | return {
23 | keywords: WCMUtils.getKeywords(currentPage, false),
24 | favIcon: resourceResolver.getResource(currentDesign.getPath() + "/favicon.ico")
25 | };
26 | });
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/page/partials/headlibs.html:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/page/partials/main.html:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
28 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/page/partials/main.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Adobe Systems Incorporated
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | // Server-side JavaScript for the main.html logic
18 | use(function () {
19 | var Calendar = Packages.java.util.Calendar;
20 | var currentYear = Calendar.getInstance().get(Calendar.YEAR);
21 |
22 | return {
23 | year: currentYear
24 | };
25 | });
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/topnav/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/topnav/clientlib/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/topnav/clientlib/css.txt:
--------------------------------------------------------------------------------
1 |
2 | style.css
3 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/topnav/clientlib/style.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Adobe Systems Incorporated
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | .topnav {
18 | float: right;
19 | list-style: none;
20 | }
21 | .topnav__item {
22 | float: left;
23 | margin-left: 15px;
24 | }
25 | .topnav__item--selected {
26 | font-weight: bold;
27 | }
28 |
--------------------------------------------------------------------------------
/demo/ui.apps/target/classes/apps/aem-touch-ui-validation/components/structure/topnav/topnav.html:
--------------------------------------------------------------------------------
1 |
16 |