You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2019/08/07 11:44:20 UTC
[myfaces-tobago] branch master updated (d38ee2c -> d7767b6)
This is an automated email from the ASF dual-hosted git repository.
lofwyr pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git.
from d38ee2c less logging
new 6f8aa63 TOBAGO-1633: TS refactoring
new d7767b6 Splitting the select-components into 6 files: one per tag
The 2 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:
.../internal/renderkit/renderer/StarsRenderer.java | 4 +-
.../tobago/renderkit/html/HtmlElements.java | 4 +-
.../renderkit/html/HtmlElementsUnitTest.java | 10 +-
tobago-theme/tobago-theme-standard/pom.xml | 5 +
.../src/main/npm/package.json | 2 +-
.../src/main/npm/ts/tobago-all.ts | 7 +-
...opover.ts => tobago-select-boolean-checkbox.ts} | 23 +-
...-popover.ts => tobago-select-boolean-toggle.ts} | 23 +-
...o-popover.ts => tobago-select-many-checkbox.ts} | 23 +-
.../src/main/npm/ts/tobago-select-many-shuttle.ts | 78 +++++++
...ago-popover.ts => tobago-select-one-listbox.ts} | 31 +--
.../src/main/npm/ts/tobago-select-one-radio.ts | 64 ++++++
.../src/main/npm/ts/tobago-select.ts | 217 -------------------
.../src/main/npm/ts/tobago-stars.ts | 240 ++++++++++-----------
.../src/main/resources/META-INF/tobago-config.xml | 4 +-
15 files changed, 342 insertions(+), 393 deletions(-)
copy tobago-theme/tobago-theme-standard/src/main/npm/ts/{tobago-popover.ts => tobago-select-boolean-checkbox.ts} (62%)
copy tobago-theme/tobago-theme-standard/src/main/npm/ts/{tobago-popover.ts => tobago-select-boolean-toggle.ts} (63%)
copy tobago-theme/tobago-theme-standard/src/main/npm/ts/{tobago-popover.ts => tobago-select-many-checkbox.ts} (63%)
create mode 100644 tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-many-shuttle.ts
copy tobago-theme/tobago-theme-standard/src/main/npm/ts/{tobago-popover.ts => tobago-select-one-listbox.ts} (52%)
create mode 100644 tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-one-radio.ts
delete mode 100644 tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select.ts
[myfaces-tobago] 01/02: TOBAGO-1633: TS refactoring
Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
commit 6f8aa6377d57b1f401de6cb7b3830e3a7c2d604f
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Wed Aug 7 13:17:23 2019 +0200
TOBAGO-1633: TS refactoring
First PoC of "Custom Elements"
---
.../internal/renderkit/renderer/StarsRenderer.java | 4 +-
.../tobago/renderkit/html/HtmlElements.java | 4 +-
.../renderkit/html/HtmlElementsUnitTest.java | 10 +-
tobago-theme/tobago-theme-standard/pom.xml | 5 +
.../src/main/npm/ts/tobago-stars.ts | 240 ++++++++++-----------
.../src/main/resources/META-INF/tobago-config.xml | 2 +
6 files changed, 140 insertions(+), 125 deletions(-)
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/StarsRenderer.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/StarsRenderer.java
index 1bfa00f..700a46b 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/StarsRenderer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/StarsRenderer.java
@@ -58,7 +58,7 @@ public class StarsRenderer extends MessageLayoutRendererBase {
? (String) stars.getSubmittedValue() : String.valueOf(value);
final String hiddenInputValue = required && "0".equals(sliderValue) ? null : sliderValue;
- writer.startElement(HtmlElements.DIV);
+ writer.startElement(HtmlElements.TOBAGO_STARS);
writer.writeIdAttribute(fieldId);
writer.writeClassAttribute(
TobagoClass.STARS,
@@ -121,7 +121,7 @@ public class StarsRenderer extends MessageLayoutRendererBase {
@Override
protected void encodeEndField(FacesContext facesContext, UIComponent component) throws IOException {
final TobagoResponseWriter writer = getResponseWriter(facesContext);
- writer.endElement(HtmlElements.DIV);
+ writer.endElement(HtmlElements.TOBAGO_STARS);
}
@Override
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlElements.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlElements.java
index b811917..0b239a9 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlElements.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlElements.java
@@ -131,7 +131,9 @@ public enum HtmlElements {
UL("ul"),
VAR("var"),
VIDEO("video"),
- WBR("wbr", Qualifier.VOID);
+ WBR("wbr", Qualifier.VOID),
+
+ TOBAGO_STARS("tobago-stars");
private final String value;
private final boolean voidElement;
diff --git a/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/html/HtmlElementsUnitTest.java b/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/html/HtmlElementsUnitTest.java
index 590dc31..e89a13f 100644
--- a/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/html/HtmlElementsUnitTest.java
+++ b/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/html/HtmlElementsUnitTest.java
@@ -34,8 +34,14 @@ public class HtmlElementsUnitTest {
final HtmlElements element = (HtmlElements) field.get(null);
final String value = element.getValue();
- Assertions.assertEquals(value, element.name().toLowerCase(), "Check to lower: '" + element + "'");
- Assertions.assertEquals(value.toUpperCase(), element.name(), "Check to upper: '" + element + "'");
+ Assertions.assertEquals(
+ value,
+ element.name().toLowerCase().replaceAll("_", "-"),
+ "Check to lower: '" + element + "'");
+ Assertions.assertEquals(
+ value.toUpperCase().replaceAll("-", "_"),
+ element.name(),
+ "Check to upper: '" + element + "'");
}
}
diff --git a/tobago-theme/tobago-theme-standard/pom.xml b/tobago-theme/tobago-theme-standard/pom.xml
index 1a7b324..32b1e71 100644
--- a/tobago-theme/tobago-theme-standard/pom.xml
+++ b/tobago-theme/tobago-theme-standard/pom.xml
@@ -85,6 +85,11 @@
<version>2.22.2</version>
</dependency>
<dependency>
+ <groupId>org.webjars.npm</groupId>
+ <artifactId>webcomponents__custom-elements</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.myfaces.tobago</groupId>
<artifactId>tobago-pack-typeahead</artifactId>
<version>${project.version}</version>
diff --git a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-stars.ts b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-stars.ts
index 22c6bdd..29d0e09 100644
--- a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-stars.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-stars.ts
@@ -15,148 +15,148 @@
* limitations under the License.
*/
-import {Listener, Phase} from "./tobago-listener";
-import {DomUtils, Tobago4Utils} from "./tobago-utils";
-
-class Stars {
-
- static init(element: HTMLElement) {
- for (const star of DomUtils.selfOrQuerySelectorAll(element, ".tobago-stars")) {
- const hiddenInput = star.querySelector("input[type=hidden]") as HTMLInputElement;
- const container = star.querySelector(".tobago-stars-container") as HTMLElement;
- const tooltip = container.querySelector(".tobago-stars-tooltip") as HTMLElement;
- const selected = container.querySelector(".tobago-stars-selected") as HTMLElement;
- const unselected = container.querySelector(".tobago-stars-unselected") as HTMLElement;
- const preselected = container.querySelector(".tobago-stars-preselected") as HTMLElement;
- const slider = container.querySelector(".tobago-stars-slider") as HTMLInputElement;
-
- const readonly = slider.readOnly;
- const disabled = slider.disabled;
- const required = slider.required;
-
- const max = parseInt(slider.max);
- const placeholder = parseInt(slider.placeholder);
-
- if (parseInt(slider.min) === 0) {
- slider.style["left"] = "-" + (100 / max) + "%";
- slider.style["width"] = 100 + (100 / max) + "%";
- }
+class Stars extends HTMLElement {
- const currentValue = parseInt(hiddenInput.value);
- if (currentValue > 0) {
- const percentValue = 100 * currentValue / max;
- selected.style["width"] = percentValue + "%";
- unselected.style["left"] = percentValue + "%";
- unselected.style["width"] = 100 - percentValue + "%";
- } else if (placeholder) {
- selected.classList.add("tobago-placeholder");
- const placeholderValue = 100 * placeholder / max;
- selected.style["width"] = placeholderValue + "%";
- unselected.style["left"] = placeholderValue + "%";
- unselected.style["width"] = 100 - placeholderValue + "%";
- }
+ constructor() {
+ super();
+ }
- if (!readonly && !disabled) {
- /* preselectMode is a Workaround for IE11: fires change event instead of input event */
- let preselectMode = false;
- slider.addEventListener('mousedown', function (event) {
- preselectMode = true;
- });
- slider.addEventListener('mouseup', function (event) {
- preselectMode = false;
- selectStars();
- });
+ connectedCallback() {
+ const hiddenInput = this.querySelector("input[type=hidden]") as HTMLInputElement;
+ const container = this.querySelector(".tobago-stars-container") as HTMLElement;
+ const tooltip = container.querySelector(".tobago-stars-tooltip") as HTMLElement;
+ const selected = container.querySelector(".tobago-stars-selected") as HTMLElement;
+ const unselected = container.querySelector(".tobago-stars-unselected") as HTMLElement;
+ const preselected = container.querySelector(".tobago-stars-preselected") as HTMLElement;
+ const slider = container.querySelector(".tobago-stars-slider") as HTMLInputElement;
+
+ const readonly = slider.readOnly;
+ const disabled = slider.disabled;
+ const required = slider.required;
+
+ const max = parseInt(slider.max);
+ const placeholder = parseInt(slider.placeholder);
+
+ if (parseInt(slider.min) === 0) {
+ slider.style["left"] = "-" + (100 / max) + "%";
+ slider.style["width"] = 100 + (100 / max) + "%";
+ }
- slider.addEventListener('input', function (event) {
- preselectStars();
- });
- slider.addEventListener('touchend', function (event) {
- /* Workaround for mobile devices. TODO: fire AJAX request for 'touchend' */
- // slider.trigger("change");
- slider.dispatchEvent(new Event("change"));
- });
- slider.addEventListener('change', function (event) {
- if (preselectMode) {
- preselectStars();
- } else {
- selectStars();
- }
- });
-
- slider.addEventListener('touchstart', touchstart);
- slider.addEventListener('touchmove', touchstart);
- }
+ const currentValue = parseInt(hiddenInput.value);
+ if (currentValue > 0) {
+ const percentValue = 100 * currentValue / max;
+ selected.style["width"] = percentValue + "%";
+ unselected.style["left"] = percentValue + "%";
+ unselected.style["width"] = 100 - percentValue + "%";
+ } else if (placeholder) {
+ selected.classList.add("tobago-placeholder");
+ const placeholderValue = 100 * placeholder / max;
+ selected.style["width"] = placeholderValue + "%";
+ unselected.style["left"] = placeholderValue + "%";
+ unselected.style["width"] = 100 - placeholderValue + "%";
+ }
- // XXX current issue: on ios-Safari select 5 stars and than click on 1 star doesn't work on labeled component.
- function touchstart(event: TouchEvent) {
- /* Workaround for Safari browser on iPhone */
- const target = event.currentTarget as HTMLInputElement;
- const sliderValue = (parseInt(target.max) / target.offsetWidth) * (event.touches[0].pageX - slider.offsetLeft);
- if (sliderValue > parseInt(target.max)) {
- slider.value = target.max;
- } else if (sliderValue < parseInt(target.min)) {
- slider.value = target.min;
+ if (!readonly && !disabled) {
+ /* preselectMode is a Workaround for IE11: fires change event instead of input event */
+ let preselectMode = false;
+ slider.addEventListener('mousedown', function (event) {
+ preselectMode = true;
+ });
+ slider.addEventListener('mouseup', function (event) {
+ preselectMode = false;
+ selectStars();
+ });
+
+ slider.addEventListener('input', function (event) {
+ preselectStars();
+ });
+ slider.addEventListener('touchend', function (event) {
+ /* Workaround for mobile devices. TODO: fire AJAX request for 'touchend' */
+ // slider.trigger("change");
+ slider.dispatchEvent(new Event("change"));
+ });
+ slider.addEventListener('change', function (event) {
+ if (preselectMode) {
+ preselectStars();
} else {
- slider.value = String(sliderValue);
+ selectStars();
}
- preselectStars();
+ });
+
+ slider.addEventListener('touchstart', touchstart);
+ slider.addEventListener('touchmove', touchstart);
+ }
+
+ // XXX current issue: on ios-Safari select 5 stars and than click on 1 star doesn't work on labeled component.
+ function touchstart(event: TouchEvent) {
+ /* Workaround for Safari browser on iPhone */
+ const target = event.currentTarget as HTMLInputElement;
+ const sliderValue = (parseInt(target.max) / target.offsetWidth) * (event.touches[0].pageX - slider.offsetLeft);
+ if (sliderValue > parseInt(target.max)) {
+ slider.value = target.max;
+ } else if (sliderValue < parseInt(target.min)) {
+ slider.value = target.min;
+ } else {
+ slider.value = String(sliderValue);
}
+ preselectStars();
+ }
+
+ function preselectStars() {
+ tooltip.classList.add("show");
- function preselectStars() {
- tooltip.classList.add("show");
+ if (parseInt(slider.value) > 0) {
+ tooltip.classList.remove("trash");
+ tooltip.textContent = (5 * (parseInt(slider.value)) / max).toFixed(2);
- if (parseInt(slider.value) > 0) {
- tooltip.classList.remove("trash");
- tooltip.textContent = (5 * (parseInt(slider.value)) / max).toFixed(2);
+ preselected.classList.add("show");
+ preselected.style["width"] = (100 * parseInt(slider.value) / max) + "%";
+ } else {
+ tooltip.textContent = "";
+ tooltip.classList.add("trash");
+ if (placeholder) {
preselected.classList.add("show");
- preselected.style["width"] = (100 * parseInt(slider.value) / max) + "%";
+ preselected.style["width"] = (100 * placeholder / max) + "%";
} else {
- tooltip.textContent = "";
- tooltip.classList.add("trash");
-
- if (placeholder) {
- preselected.classList.add("show");
- preselected.style["width"] = (100 * placeholder / max) + "%";
- } else {
- preselected.classList.remove("show");
- }
+ preselected.classList.remove("show");
}
}
+ }
- function selectStars() {
- tooltip.classList.remove("show");
- preselected.classList.remove("show");
+ function selectStars() {
+ tooltip.classList.remove("show");
+ preselected.classList.remove("show");
- if (parseInt(slider.value) > 0) {
- selected.classList.remove("tobago-placeholder");
+ if (parseInt(slider.value) > 0) {
+ selected.classList.remove("tobago-placeholder");
- const percentValue = 100 * parseInt(slider.value) / max;
- selected.style["width"] = percentValue + "%";
- unselected.style["left"] = percentValue + "%";
- unselected.style["width"] = 100 - percentValue + "%";
+ const percentValue = 100 * parseInt(slider.value) / max;
+ selected.style["width"] = percentValue + "%";
+ unselected.style["left"] = percentValue + "%";
+ unselected.style["width"] = 100 - percentValue + "%";
- hiddenInput.value = slider.value;
+ hiddenInput.value = slider.value;
+ } else {
+ if (placeholder) {
+ selected.classList.add("tobago-placeholder");
+ const placeholderValue = 100 * placeholder / max;
+ selected.style["width"] = placeholderValue + "%";
+ unselected.style["left"] = placeholderValue + "%";
+ unselected.style["width"] = 100 - placeholderValue + "%";
} else {
- if (placeholder) {
- selected.classList.add("tobago-placeholder");
- const placeholderValue = 100 * placeholder / max;
- selected.style["width"] = placeholderValue + "%";
- unselected.style["left"] = placeholderValue + "%";
- unselected.style["width"] = 100 - placeholderValue + "%";
- } else {
- selected.classList.remove("tobago-placeholder");
- selected.style["width"] = "";
- unselected.style["left"] = "";
- unselected.style["width"] = "";
- }
-
- hiddenInput.value = required ? "" : slider.value;
+ selected.classList.remove("tobago-placeholder");
+ selected.style["width"] = "";
+ unselected.style["left"] = "";
+ unselected.style["width"] = "";
}
+
+ hiddenInput.value = required ? "" : slider.value;
}
}
}
}
-Listener.register(Stars.init, Phase.DOCUMENT_READY);
-Listener.register(Stars.init, Phase.AFTER_UPDATE);
+document.addEventListener("DOMContentLoaded", function (event) {
+ window.customElements.define('tobago-stars', Stars);
+});
diff --git a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
index 353e177..5f3f5c1 100644
--- a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
+++ b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
@@ -38,6 +38,7 @@
<versioned>true</versioned>
<resources production="true">
<includes>
+ <script name="/webjars/webcomponents__custom-elements/1.2.1/custom-elements.min.js"/>
<script name="/webjars/jquery/3.4.1/jquery.min.js"/>
<script name="/webjars/tether/1.4.0/js/tether.min.js"/>
<script name="/webjars/popper.js/1.14.3/umd/popper.min.js"/>
@@ -55,6 +56,7 @@
</resources>
<resources production="false">
<includes>
+ <script name="/webjars/webcomponents__custom-elements/1.2.1/externs/custom-elements.js"/>
<script name="/webjars/jquery/3.4.1/jquery.js"/>
<script name="/webjars/tether/1.4.0/js/tether.js"/>
<script name="/webjars/popper.js/1.14.3/umd/popper.js"/>
[myfaces-tobago] 02/02: Splitting the select-components into 6
files: one per tag
Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
commit d7767b6339a4943474280bd186327f89281153ab
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Wed Aug 7 13:44:09 2019 +0200
Splitting the select-components into 6 files: one per tag
issue: TOBAGO-1633: TS refactoring
---
.../src/main/npm/package.json | 2 +-
.../src/main/npm/ts/tobago-all.ts | 7 +-
...go-all.ts => tobago-select-boolean-checkbox.ts} | 44 ++---
...bago-all.ts => tobago-select-boolean-toggle.ts} | 44 ++---
...obago-all.ts => tobago-select-many-checkbox.ts} | 44 ++---
.../src/main/npm/ts/tobago-select-many-shuttle.ts | 78 ++++++++
.../src/main/npm/ts/tobago-select-one-listbox.ts | 45 +++++
.../src/main/npm/ts/tobago-select-one-radio.ts | 64 ++++++
.../src/main/npm/ts/tobago-select.ts | 217 ---------------------
.../src/main/resources/META-INF/tobago-config.xml | 2 +-
10 files changed, 255 insertions(+), 292 deletions(-)
diff --git a/tobago-theme/tobago-theme-standard/src/main/npm/package.json b/tobago-theme/tobago-theme-standard/src/main/npm/package.json
index b396faf..fe0d72b 100644
--- a/tobago-theme/tobago-theme-standard/src/main/npm/package.json
+++ b/tobago-theme/tobago-theme-standard/src/main/npm/package.json
@@ -24,7 +24,7 @@
"css-prefix": "postcss --config postcss.config.js --replace \"css/*.css\" \"!css/*.min.css\"",
"css-minify": "cleancss --level 1 --source-map --source-map-inline-sources --output css/tobago.min.css css/tobago.css",
"ts-compile": "tsc",
- "js-minify": "uglifyjs --compress typeofs=false,drop_console=true --mangle --source-map includeSources --output js/tobago.min.js js/tobago-myfaces.js js/tobago-deltaspike.js js/tobago-polyfill.js js/tobago-listener.js js/tobago-core.js js/tobago-dropdown.js js/tobago-calendar.js js/tobago-command.js js/tobago-file.js js/tobago-focus.js js/tobago-header-footer.js js/tobago-in.js js/tobago-jsf.js js/tobago-overlay.js js/tobago-panel.js js/tobago-popover.js js/tobago-popup.js js/tobago- [...]
+ "js-minify": "uglifyjs --compress typeofs=false,drop_console=true --mangle --source-map includeSources --output js/tobago.min.js js/tobago-myfaces.js js/tobago-deltaspike.js js/tobago-polyfill.js js/tobago-listener.js js/tobago-core.js js/tobago-dropdown.js js/tobago-calendar.js js/tobago-command.js js/tobago-file.js js/tobago-focus.js js/tobago-header-footer.js js/tobago-in.js js/tobago-jsf.js js/tobago-overlay.js js/tobago-panel.js js/tobago-popover.js js/tobago-popup.js js/tobago- [...]
"test": "jest"
},
"devDependencies": {
diff --git a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-all.ts b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-all.ts
index a3f884a..1813a8f 100644
--- a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-all.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-all.ts
@@ -30,7 +30,12 @@ import "./tobago-panel";
import "./tobago-popover";
import "./tobago-popup";
import "./tobago-reload";
-import "./tobago-select";
+import "./tobago-select-boolean-checkbox";
+import "./tobago-select-boolean-toggle";
+import "./tobago-select-many-checkbox";
+import "./tobago-select-many-shuttle";
+import "./tobago-select-one-listbox";
+import "./tobago-select-one-radio";
import "./tobago-sheet";
import "./tobago-split-layout";
import "./tobago-stars";
diff --git a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-all.ts b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-boolean-checkbox.ts
similarity index 50%
copy from tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-all.ts
copy to tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-boolean-checkbox.ts
index a3f884a..ae105e9 100644
--- a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-all.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-boolean-checkbox.ts
@@ -15,27 +15,23 @@
* limitations under the License.
*/
-import "./tobago-listener";
-import "./tobago-core";
-import "./tobago-dropdown";
-import "./tobago-calendar";
-import "./tobago-command";
-import "./tobago-file";
-import "./tobago-focus";
-import "./tobago-header-footer";
-import "./tobago-in";
-import "./tobago-jsf";
-import "./tobago-overlay";
-import "./tobago-panel";
-import "./tobago-popover";
-import "./tobago-popup";
-import "./tobago-reload";
-import "./tobago-select";
-import "./tobago-sheet";
-import "./tobago-split-layout";
-import "./tobago-stars";
-import "./tobago-suggest";
-import "./tobago-tab";
-import "./tobago-tree";
-import "./tobago-tree-listbox";
-import "./tobago-utils";
+import {Listener, Phase} from "./tobago-listener";
+import {Tobago4Utils} from "./tobago-utils";
+
+class SelectBooleanCheckbox {
+
+ static init = function (elements) {
+ elements = elements.jQuery ? elements : jQuery(elements); // fixme jQuery -> ES5
+ var checkboxes = Tobago4Utils.selectWithJQuery(elements, ".tobago-selectBooleanCheckbox input[readonly]");
+ checkboxes.each(function () {
+ // Save the initial state to restore it, when the user tries to manipulate it.
+ var initial = jQuery(this).is(":checked");
+ jQuery(this).click(function () {
+ jQuery(this).prop("checked", initial);
+ });
+ });
+ };
+}
+
+Listener.register(SelectBooleanCheckbox.init, Phase.DOCUMENT_READY);
+Listener.register(SelectBooleanCheckbox.init, Phase.AFTER_UPDATE);
diff --git a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-all.ts b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-boolean-toggle.ts
similarity index 51%
copy from tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-all.ts
copy to tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-boolean-toggle.ts
index a3f884a..2330270 100644
--- a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-all.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-boolean-toggle.ts
@@ -15,27 +15,23 @@
* limitations under the License.
*/
-import "./tobago-listener";
-import "./tobago-core";
-import "./tobago-dropdown";
-import "./tobago-calendar";
-import "./tobago-command";
-import "./tobago-file";
-import "./tobago-focus";
-import "./tobago-header-footer";
-import "./tobago-in";
-import "./tobago-jsf";
-import "./tobago-overlay";
-import "./tobago-panel";
-import "./tobago-popover";
-import "./tobago-popup";
-import "./tobago-reload";
-import "./tobago-select";
-import "./tobago-sheet";
-import "./tobago-split-layout";
-import "./tobago-stars";
-import "./tobago-suggest";
-import "./tobago-tab";
-import "./tobago-tree";
-import "./tobago-tree-listbox";
-import "./tobago-utils";
+import {Listener, Phase} from "./tobago-listener";
+import {Tobago4Utils} from "./tobago-utils";
+
+class SelectBooleanToggle {
+
+ static init = function (elements) {
+ elements = elements.jQuery ? elements : jQuery(elements); // fixme jQuery -> ES5
+ var toggles = Tobago4Utils.selectWithJQuery(elements, ".tobago-selectBooleanToggle input[readonly]");
+ toggles.each(function () {
+ // Save the initial state to restore it, when the user tries to manipulate it.
+ var initial = jQuery(this).is(":checked");
+ jQuery(this).click(function () {
+ jQuery(this).prop("checked", initial);
+ });
+ });
+ };
+}
+
+Listener.register(SelectBooleanToggle.init, Phase.DOCUMENT_READY);
+Listener.register(SelectBooleanToggle.init, Phase.AFTER_UPDATE);
diff --git a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-all.ts b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-many-checkbox.ts
similarity index 51%
copy from tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-all.ts
copy to tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-many-checkbox.ts
index a3f884a..7a584cc 100644
--- a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-all.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-many-checkbox.ts
@@ -15,27 +15,23 @@
* limitations under the License.
*/
-import "./tobago-listener";
-import "./tobago-core";
-import "./tobago-dropdown";
-import "./tobago-calendar";
-import "./tobago-command";
-import "./tobago-file";
-import "./tobago-focus";
-import "./tobago-header-footer";
-import "./tobago-in";
-import "./tobago-jsf";
-import "./tobago-overlay";
-import "./tobago-panel";
-import "./tobago-popover";
-import "./tobago-popup";
-import "./tobago-reload";
-import "./tobago-select";
-import "./tobago-sheet";
-import "./tobago-split-layout";
-import "./tobago-stars";
-import "./tobago-suggest";
-import "./tobago-tab";
-import "./tobago-tree";
-import "./tobago-tree-listbox";
-import "./tobago-utils";
+import {Listener, Phase} from "./tobago-listener";
+import {Tobago4Utils} from "./tobago-utils";
+
+class SelectManyCheckbox {
+
+ static init = function (elements) {
+ elements = elements.jQuery ? elements : jQuery(elements); // fixme jQuery -> ES5
+ var checkboxes = Tobago4Utils.selectWithJQuery(elements, ".tobago-selectManyCheckbox input[readonly]");
+ checkboxes.each(function () {
+ // Save the initial state to restore it, when the user tries to manipulate it.
+ var initial = jQuery(this).is(":checked");
+ jQuery(this).click(function () {
+ jQuery(this).prop("checked", initial);
+ });
+ });
+ };
+}
+
+Listener.register(SelectManyCheckbox.init, Phase.DOCUMENT_READY);
+Listener.register(SelectManyCheckbox.init, Phase.AFTER_UPDATE);
diff --git a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-many-shuttle.ts b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-many-shuttle.ts
new file mode 100644
index 0000000..2ed8781
--- /dev/null
+++ b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-many-shuttle.ts
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+import {Listener, Phase} from "./tobago-listener";
+import {Tobago4Utils} from "./tobago-utils";
+
+class SelectManyShuttle {
+
+ static init = function (elements) {
+ elements = elements.jQuery ? elements : jQuery(elements); // fixme jQuery -> ES5
+ var shuttles = Tobago4Utils.selectWithJQuery(elements, ".tobago-selectManyShuttle:not(.tobago-selectManyShuttle-disabled)");
+
+ shuttles.find(".tobago-selectManyShuttle-unselected").dblclick(function () {
+ SelectManyShuttle.moveSelectedItems(jQuery(this).parents(".tobago-selectManyShuttle"), true, false);
+ });
+
+ shuttles.find(".tobago-selectManyShuttle-selected").dblclick(function () {
+ SelectManyShuttle.moveSelectedItems(jQuery(this).parents(".tobago-selectManyShuttle"), false, false);
+ });
+
+ shuttles.find(".tobago-selectManyShuttle-addAll").click(function () {
+ SelectManyShuttle.moveSelectedItems(jQuery(this).parents(".tobago-selectManyShuttle"), true, true);
+ });
+
+ shuttles.find(".tobago-selectManyShuttle-add").click(function () {
+ SelectManyShuttle.moveSelectedItems(jQuery(this).parents(".tobago-selectManyShuttle"), true, false);
+ });
+
+ shuttles.find(".tobago-selectManyShuttle-removeAll").click(function () {
+ SelectManyShuttle.moveSelectedItems(jQuery(this).parents(".tobago-selectManyShuttle"), false, true);
+ });
+
+ shuttles.find(".tobago-selectManyShuttle-remove").click(function () {
+ SelectManyShuttle.moveSelectedItems(jQuery(this).parents(".tobago-selectManyShuttle"), false, false);
+ });
+ };
+
+ static moveSelectedItems = function ($shuttle, direction, all) {
+ var $unselected = $shuttle.find(".tobago-selectManyShuttle-unselected");
+ var $selected = $shuttle.find(".tobago-selectManyShuttle-selected");
+ var count = $selected.children().length;
+ var $source = direction ? $unselected : $selected;
+ var $target = direction ? $selected : $unselected;
+ var $shifted = $source.find(all ? "option:not(:disabled)" : "option:selected").remove().appendTo($target);
+
+ // synchronize the hidden select
+ var $hidden = $shuttle.find(".tobago-selectManyShuttle-hidden");
+ var $hiddenOptions = $hidden.find("option");
+ // todo: may be optimized: put values in a hash map?
+ $shifted.each(function () {
+ var $option = jQuery(this);
+ $hiddenOptions.filter("[value='" + $option.val() + "']").prop("selected", direction);
+ });
+
+ if (count !== $selected.children().length) {
+ var e = jQuery.Event("change");
+ // trigger an change event for command facets
+ $hidden.trigger(e);
+ }
+ };
+}
+
+Listener.register(SelectManyShuttle.init, Phase.DOCUMENT_READY);
+Listener.register(SelectManyShuttle.init, Phase.AFTER_UPDATE);
diff --git a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-one-listbox.ts b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-one-listbox.ts
new file mode 100644
index 0000000..c211860
--- /dev/null
+++ b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-one-listbox.ts
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ */
+
+import {Listener, Phase} from "./tobago-listener";
+import {Tobago4Utils} from "./tobago-utils";
+
+class SelectOneListbox {
+
+ static init = function (elements) {
+ elements = elements.jQuery ? elements : jQuery(elements); // fixme jQuery -> ES5
+ var selects = Tobago4Utils.selectWithJQuery(elements, ".tobago-selectOneListbox");
+ var notRequired = selects.not(".tobago-selectOneListbox-markup-required");
+ notRequired
+ .change(function () {
+ var element = jQuery(this);
+ if (element.data("tobago-old-value") == undefined) {
+ element.data("tobago-old-value", -1);
+ }
+ }).click(function () {
+ var element = jQuery(this);
+ if (element.data("tobago-old-value") == undefined
+ || element.data("tobago-old-value") == element.prop("selectedIndex")) {
+ element.prop("selectedIndex", -1);
+ }
+ element.data("tobago-old-value", element.prop("selectedIndex"));
+ });
+ };
+}
+
+Listener.register(SelectOneListbox.init, Phase.DOCUMENT_READY);
+Listener.register(SelectOneListbox.init, Phase.AFTER_UPDATE);
diff --git a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-one-radio.ts b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-one-radio.ts
new file mode 100644
index 0000000..abd8358
--- /dev/null
+++ b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select-one-radio.ts
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ */
+
+import {Listener, Phase} from "./tobago-listener";
+import {Tobago4Utils} from "./tobago-utils";
+
+class SelectOneRadio {
+
+ static init = function (elements) {
+ elements = elements.jQuery ? elements : jQuery(elements); // fixme jQuery -> ES5
+ var selectOneRadios = Tobago4Utils.selectWithJQuery(elements, ".tobago-selectOneRadio");
+ selectOneRadios.each(function () {
+ var ul = jQuery(this);
+ var id = ul.closest("[id]").attr("id");
+ var radios = jQuery('input[name="' + id.replace(/([:\.])/g, '\\$1') + '"]');
+ radios.each(function () {
+ var selectOneRadio = jQuery(this);
+ selectOneRadio.data("tobago-old-value", selectOneRadio.prop("checked"));
+ });
+ radios.click(function () {
+ var selectOneRadio = jQuery(this);
+ var readonly = selectOneRadio.prop("readonly");
+ var required = selectOneRadio.prop("required");
+ if (!required && !readonly) {
+ if (selectOneRadio.data("tobago-old-value") == selectOneRadio.prop("checked")) {
+ selectOneRadio.prop("checked", false);
+ }
+ selectOneRadio.data("tobago-old-value", selectOneRadio.prop("checked"));
+ }
+ if (readonly) {
+ radios.each(function () {
+ var radio = jQuery(this);
+ radio.prop("checked", radio.data("tobago-old-value"));
+ });
+ } else {
+ radios.each(function () {
+ if (this.id != selectOneRadio.get(0).id) {
+ var radio = jQuery(this);
+ radio.prop("checked", false);
+ radio.data("tobago-old-value", radio.prop("checked"));
+ }
+ });
+ }
+ });
+ });
+ };
+}
+
+Listener.register(SelectOneRadio.init, Phase.DOCUMENT_READY);
+Listener.register(SelectOneRadio.init, Phase.AFTER_UPDATE);
diff --git a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select.ts b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select.ts
deleted file mode 100644
index 47f48fa..0000000
--- a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-select.ts
+++ /dev/null
@@ -1,217 +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.
- */
-
-// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-import {Listener, Phase} from "./tobago-listener";
-import {Tobago4Utils} from "./tobago-utils";
-
-class SelectManyShuttle {
-
- static init = function (elements) {
- elements = elements.jQuery ? elements : jQuery(elements); // fixme jQuery -> ES5
- var shuttles = Tobago4Utils.selectWithJQuery(elements, ".tobago-selectManyShuttle:not(.tobago-selectManyShuttle-disabled)");
-
- shuttles.find(".tobago-selectManyShuttle-unselected").dblclick(function () {
- SelectManyShuttle.moveSelectedItems(jQuery(this).parents(".tobago-selectManyShuttle"), true, false);
- });
-
- shuttles.find(".tobago-selectManyShuttle-selected").dblclick(function () {
- SelectManyShuttle.moveSelectedItems(jQuery(this).parents(".tobago-selectManyShuttle"), false, false);
- });
-
- shuttles.find(".tobago-selectManyShuttle-addAll").click(function () {
- SelectManyShuttle.moveSelectedItems(jQuery(this).parents(".tobago-selectManyShuttle"), true, true);
- });
-
- shuttles.find(".tobago-selectManyShuttle-add").click(function () {
- SelectManyShuttle.moveSelectedItems(jQuery(this).parents(".tobago-selectManyShuttle"), true, false);
- });
-
- shuttles.find(".tobago-selectManyShuttle-removeAll").click(function () {
- SelectManyShuttle.moveSelectedItems(jQuery(this).parents(".tobago-selectManyShuttle"), false, true);
- });
-
- shuttles.find(".tobago-selectManyShuttle-remove").click(function () {
- SelectManyShuttle.moveSelectedItems(jQuery(this).parents(".tobago-selectManyShuttle"), false, false);
- });
- };
-
- static moveSelectedItems = function ($shuttle, direction, all) {
- var $unselected = $shuttle.find(".tobago-selectManyShuttle-unselected");
- var $selected = $shuttle.find(".tobago-selectManyShuttle-selected");
- var count = $selected.children().length;
- var $source = direction ? $unselected : $selected;
- var $target = direction ? $selected : $unselected;
- var $shifted = $source.find(all ? "option:not(:disabled)" : "option:selected").remove().appendTo($target);
-
- // synchronize the hidden select
- var $hidden = $shuttle.find(".tobago-selectManyShuttle-hidden");
- var $hiddenOptions = $hidden.find("option");
- // todo: may be optimized: put values in a hash map?
- $shifted.each(function () {
- var $option = jQuery(this);
- $hiddenOptions.filter("[value='" + $option.val() + "']").prop("selected", direction);
- });
-
- if (count !== $selected.children().length) {
- var e = jQuery.Event("change");
- // trigger an change event for command facets
- $hidden.trigger(e);
- }
- };
-}
-
-Listener.register(SelectManyShuttle.init, Phase.DOCUMENT_READY);
-Listener.register(SelectManyShuttle.init, Phase.AFTER_UPDATE);
-
-// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-class SelectOneRadio {
-
- static init = function (elements) {
- elements = elements.jQuery ? elements : jQuery(elements); // fixme jQuery -> ES5
- var selectOneRadios = Tobago4Utils.selectWithJQuery(elements, ".tobago-selectOneRadio");
- selectOneRadios.each(function () {
- var ul = jQuery(this);
- var id = ul.closest("[id]").attr("id");
- var radios = jQuery('input[name="' + id.replace(/([:\.])/g, '\\$1') + '"]');
- radios.each(function () {
- var selectOneRadio = jQuery(this);
- selectOneRadio.data("tobago-old-value", selectOneRadio.prop("checked"));
- });
- radios.click(function () {
- var selectOneRadio = jQuery(this);
- var readonly = selectOneRadio.prop("readonly");
- var required = selectOneRadio.prop("required");
- if (!required && !readonly) {
- if (selectOneRadio.data("tobago-old-value") == selectOneRadio.prop("checked")) {
- selectOneRadio.prop("checked", false);
- }
- selectOneRadio.data("tobago-old-value", selectOneRadio.prop("checked"));
- }
- if (readonly) {
- radios.each(function () {
- var radio = jQuery(this);
- radio.prop("checked", radio.data("tobago-old-value"));
- });
- } else {
- radios.each(function () {
- if (this.id != selectOneRadio.get(0).id) {
- var radio = jQuery(this);
- radio.prop("checked", false);
- radio.data("tobago-old-value", radio.prop("checked"));
- }
- });
- }
- });
- });
- };
-}
-
-Listener.register(SelectOneRadio.init, Phase.DOCUMENT_READY);
-Listener.register(SelectOneRadio.init, Phase.AFTER_UPDATE);
-
-// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-class SelectOneListbox {
-
- static init = function (elements) {
- elements = elements.jQuery ? elements : jQuery(elements); // fixme jQuery -> ES5
- var selects = Tobago4Utils.selectWithJQuery(elements, ".tobago-selectOneListbox");
- var notRequired = selects.not(".tobago-selectOneListbox-markup-required");
- notRequired
- .change(function () {
- var element = jQuery(this);
- if (element.data("tobago-old-value") == undefined) {
- element.data("tobago-old-value", -1);
- }
- }).click(function () {
- var element = jQuery(this);
- if (element.data("tobago-old-value") == undefined
- || element.data("tobago-old-value") == element.prop("selectedIndex")) {
- element.prop("selectedIndex", -1);
- }
- element.data("tobago-old-value", element.prop("selectedIndex"));
- });
- };
-}
-
-Listener.register(SelectOneListbox.init, Phase.DOCUMENT_READY);
-Listener.register(SelectOneListbox.init, Phase.AFTER_UPDATE);
-
-// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-class SelectBooleanCheckbox {
-
- static init = function (elements) {
- elements = elements.jQuery ? elements : jQuery(elements); // fixme jQuery -> ES5
- var checkboxes = Tobago4Utils.selectWithJQuery(elements, ".tobago-selectBooleanCheckbox input[readonly]");
- checkboxes.each(function () {
- // Save the initial state to restore it, when the user tries to manipulate it.
- var initial = jQuery(this).is(":checked");
- jQuery(this).click(function () {
- jQuery(this).prop("checked", initial);
- });
- });
- };
-}
-
-Listener.register(SelectBooleanCheckbox.init, Phase.DOCUMENT_READY);
-Listener.register(SelectBooleanCheckbox.init, Phase.AFTER_UPDATE);
-
-// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-class SelectBooleanToggle {
-
- static init = function (elements) {
- elements = elements.jQuery ? elements : jQuery(elements); // fixme jQuery -> ES5
- var toggles = Tobago4Utils.selectWithJQuery(elements, ".tobago-selectBooleanToggle input[readonly]");
- toggles.each(function () {
- // Save the initial state to restore it, when the user tries to manipulate it.
- var initial = jQuery(this).is(":checked");
- jQuery(this).click(function () {
- jQuery(this).prop("checked", initial);
- });
- });
- };
-}
-
-Listener.register(SelectBooleanToggle.init, Phase.DOCUMENT_READY);
-Listener.register(SelectBooleanToggle.init, Phase.AFTER_UPDATE);
-
-// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-class SelectManyCheckbox {
-
- static init = function (elements) {
- elements = elements.jQuery ? elements : jQuery(elements); // fixme jQuery -> ES5
- var checkboxes = Tobago4Utils.selectWithJQuery(elements, ".tobago-selectManyCheckbox input[readonly]");
- checkboxes.each(function () {
- // Save the initial state to restore it, when the user tries to manipulate it.
- var initial = jQuery(this).is(":checked");
- jQuery(this).click(function () {
- jQuery(this).prop("checked", initial);
- });
- });
- };
-}
-
-Listener.register(SelectManyCheckbox.init, Phase.DOCUMENT_READY);
-Listener.register(SelectManyCheckbox.init, Phase.AFTER_UPDATE);
-
-// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
index 5f3f5c1..948a1eb 100644
--- a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
+++ b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
@@ -84,7 +84,7 @@
<script name="/tobago/standard/tobago-bootstrap/${project.version}/js/tobago-popover.js"/>
<script name="/tobago/standard/tobago-bootstrap/${project.version}/js/tobago-popup.js"/>
<script name="/tobago/standard/tobago-bootstrap/${project.version}/js/tobago-reload.js"/>
- <script name="/tobago/standard/tobago-bootstrap/${project.version}/js/tobago-select.js"/>
+ <script name="/tobago/standard/tobago-bootstrap/${project.version}/js/tobago-select-....js"/>
<script name="/tobago/standard/tobago-bootstrap/${project.version}/js/tobago-sheet.js"/>
<script name="/tobago/standard/tobago-bootstrap/${project.version}/js/tobago-split-layout.js"/>
<script name="/tobago/standard/tobago-bootstrap/${project.version}/js/tobago-stars.js"/>