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 2022/06/02 16:05:08 UTC
[myfaces-tobago] 02/02: feat: Drag and Drop File Upload
This is an automated email from the ASF dual-hosted git repository.
lofwyr pushed a commit to branch tobago-5.x
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
commit a3f146663ed6494c6404111ebbf987f78e5690d6
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Thu Jun 2 18:03:26 2022 +0200
feat: Drag and Drop File Upload
with a dropzone
issue: TOBAGO-1715
---
.../myfaces/tobago/component/Attributes.java | 1 +
.../tobago/internal/component/AbstractUIFile.java | 2 +
.../internal/renderkit/renderer/FileRenderer.java | 26 +++++++++++
.../taglib/component/FileTagDeclaration.java | 7 +++
.../tobago/renderkit/html/CustomAttributes.java | 1 +
.../renderkit/renderer/FileRendererUnitTest.java | 51 ++++++++++++++++++++
.../renderer/file/file-drop-zone-this.html | 32 ++++---------
.../resources/renderer/file/file-drop-zone.html | 32 ++++---------
.../tobago/example/demo/UploadController.java | 28 +++++++++++
.../webapp/content/100-upload/File_Upload.xhtml | 52 ++++++++++++++-------
tobago-theme/src/main/scss/_tobago.scss | 12 +++++
.../src/main/css/tobago.css | 12 +++++
.../src/main/css/tobago.css.map | 2 +-
.../src/main/css/tobago.min.css | 2 +-
.../src/main/css/tobago.min.css.map | 2 +-
.../src/main/css/tobago.css | 14 +++++-
.../src/main/css/tobago.css.map | 2 +-
.../src/main/css/tobago.min.css | 2 +-
.../src/main/css/tobago.min.css.map | 2 +-
.../src/main/css/tobago.css | 12 +++++
.../src/main/css/tobago.css.map | 2 +-
.../src/main/css/tobago.min.css | 2 +-
.../src/main/css/tobago.min.css.map | 2 +-
.../tobago-theme-speyside/src/main/css/tobago.css | 32 ++++++-------
.../src/main/css/tobago.css.map | 2 +-
.../src/main/css/tobago.min.css | 2 +-
.../src/main/css/tobago.min.css.map | 2 +-
.../src/main/css/fonts/bootstrap-icons.woff | Bin 249830 -> 137216 bytes
.../tobago-theme-standard/src/main/css/tobago.css | 12 +++++
.../src/main/css/tobago.css.map | 2 +-
.../src/main/css/tobago.min.css | 2 +-
.../src/main/css/tobago.min.css.map | 2 +-
.../tobago-theme-standard/src/main/js/tobago.js | 2 +-
.../src/main/js/tobago.js.map | 2 +-
.../src/main/ts/tobago-file.ts | 42 ++++++++++++++++-
35 files changed, 304 insertions(+), 98 deletions(-)
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java
index 4fb4e26119..b0f55f0960 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/component/Attributes.java
@@ -95,6 +95,7 @@ public enum Attributes {
directLinkCount,
disabled,
display,
+ dropZone,
enctype,
escape,
expanded,
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFile.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFile.java
index 33d1f993c1..3777098565 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFile.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFile.java
@@ -71,6 +71,8 @@ public abstract class AbstractUIFile extends UIInput implements SupportsLabelLay
public abstract Integer getTabIndex();
+ public abstract String getDropZone();
+
@Override
public String getFieldId(final FacesContext facesContext) {
return getClientId(facesContext) + ComponentUtils.SUB_SEPARATOR + "field";
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/FileRenderer.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/FileRenderer.java
index e476873dd4..dddf1385a0 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/FileRenderer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/FileRenderer.java
@@ -26,6 +26,7 @@ import org.apache.myfaces.tobago.internal.util.HttpPartWrapper;
import org.apache.myfaces.tobago.internal.util.StringUtils;
import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
import org.apache.myfaces.tobago.renderkit.css.Icons;
+import org.apache.myfaces.tobago.renderkit.html.CustomAttributes;
import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
import org.apache.myfaces.tobago.renderkit.html.HtmlInputTypes;
@@ -35,6 +36,7 @@ import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.event.ComponentSystemEvent;
import javax.faces.event.ComponentSystemEventListener;
@@ -178,6 +180,13 @@ public class FileRenderer<T extends AbstractUIFile>
writer.endElement(HtmlElements.I);
writer.endElement(HtmlElements.SPAN);
writer.endElement(HtmlElements.LABEL);
+
+ if (component.getDropZone() != null) {
+ writer.startElement(HtmlElements.DIV);
+ writer.writeClassAttribute(BootstrapClass.FORM_CONTROL);
+ writer.writeText(">>> drop here <<<");
+ writer.endElement(HtmlElements.DIV);
+ }
}
private String createAcceptFromValidators(final AbstractUIFile file) {
@@ -204,6 +213,23 @@ public class FileRenderer<T extends AbstractUIFile>
writer.endElement(HtmlElements.DIV);
}
+ @Override
+ protected void writeAdditionalAttributes(
+ final FacesContext facesContext, final TobagoResponseWriter writer, final T input)
+ throws IOException {
+ super.writeAdditionalAttributes(facesContext, writer, input);
+ final String dropZone = input.getDropZone();
+ if (dropZone != null) {
+ UIComponent component = ComponentUtils.findComponent(input, dropZone);
+ if (component == null) {
+ LOG.warn("Can't find component for dropZone='{}'", dropZone);
+ component = input;
+ }
+ final String id = component.getClientId(facesContext);
+ writer.writeAttribute(CustomAttributes.DROP_ZONE, id, true);
+ }
+ }
+
@Override
protected String getFieldId(final FacesContext facesContext, final T component) {
return component.getFieldId(facesContext);
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FileTagDeclaration.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FileTagDeclaration.java
index fc95705004..a06b8227f3 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FileTagDeclaration.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FileTagDeclaration.java
@@ -95,4 +95,11 @@ public interface FileTagDeclaration
type = { "javax.servlet.http.Part", "javax.servlet.http.Part[]" },
expression = DynamicExpression.VALUE_EXPRESSION_REQUIRED)
void setValue(String value);
+
+ /**
+ * The id of the HTMLElement in the Browser to drop the file.
+ */
+ @TagAttribute()
+ @UIComponentTagAttribute()
+ void setDropZone(String dropZone);
}
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/CustomAttributes.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/CustomAttributes.java
index 17a0ef6118..3101717cae 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/CustomAttributes.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/CustomAttributes.java
@@ -27,6 +27,7 @@ public enum CustomAttributes implements MarkupLanguageAttributes {
CLIENT_ID("client-id"),
DATE_PATTERN("date-pattern"),
DELAY("delay"),
+ DROP_ZONE("drop-zone"),
EVENT("event"),
/**
* <f:ajax> attribute
diff --git a/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/renderkit/renderer/FileRendererUnitTest.java b/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/renderkit/renderer/FileRendererUnitTest.java
index 4677aedebf..0396d4458d 100644
--- a/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/renderkit/renderer/FileRendererUnitTest.java
+++ b/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/renderkit/renderer/FileRendererUnitTest.java
@@ -22,8 +22,10 @@ package org.apache.myfaces.tobago.internal.renderkit.renderer;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.component.Tags;
import org.apache.myfaces.tobago.component.UIFile;
+import org.apache.myfaces.tobago.component.UIPanel;
import org.apache.myfaces.tobago.util.ComponentUtils;
import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.io.IOException;
@@ -39,4 +41,53 @@ public class FileRendererUnitTest extends RendererTestBase {
Assertions.assertEquals(loadHtml("renderer/file/file-label.html"), formattedResult());
}
+
+ @Test
+ public void fileDropZoneThis() throws IOException {
+ final UIPanel panel = (UIPanel) ComponentUtils.createComponent(
+ facesContext, Tags.panel.componentType(), RendererTypes.Panel, "drop-zone");
+
+ final UIFile c = (UIFile) ComponentUtils.createComponent(
+ facesContext, Tags.file.componentType(), RendererTypes.File, "id");
+ c.setDropZone("drop-zone");
+
+ panel.getChildren().add(c);
+
+ c.encodeAll(facesContext);
+
+ Assertions.assertEquals(loadHtml("renderer/file/file-drop-zone.html"), formattedResult());
+ }
+
+ @Test
+ public void fileDropZoneId() throws IOException {
+ final UIPanel panel = (UIPanel) ComponentUtils.createComponent(
+ facesContext, Tags.panel.componentType(), RendererTypes.Panel, "drop-zone");
+
+ final UIFile c = (UIFile) ComponentUtils.createComponent(
+ facesContext, Tags.file.componentType(), RendererTypes.File, "id");
+ c.setDropZone("drop-zone");
+
+ panel.getChildren().add(c);
+
+ c.encodeAll(facesContext);
+
+ Assertions.assertEquals(loadHtml("renderer/file/file-drop-zone.html"), formattedResult());
+ }
+
+ @Test
+ @Disabled // XXX
+ public void fileDropZoneParent() throws IOException {
+ final UIPanel panel = (UIPanel) ComponentUtils.createComponent(
+ facesContext, Tags.panel.componentType(), RendererTypes.Panel, "drop-zone");
+
+ final UIFile c = (UIFile) ComponentUtils.createComponent(
+ facesContext, Tags.file.componentType(), RendererTypes.File, "id");
+ c.setDropZone("@parent");
+
+ panel.getChildren().add(c);
+
+ c.encodeAll(facesContext);
+
+ Assertions.assertEquals(loadHtml("renderer/file/file-drop-zone.html"), formattedResult());
+ }
}
diff --git a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-file.ts b/tobago-core/src/test/resources/renderer/file/file-drop-zone-this.html
similarity index 64%
copy from tobago-theme/tobago-theme-standard/src/main/ts/tobago-file.ts
copy to tobago-core/src/test/resources/renderer/file/file-drop-zone-this.html
index 052a4072af..7a68efa16b 100644
--- a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-file.ts
+++ b/tobago-core/src/test/resources/renderer/file/file-drop-zone-this.html
@@ -1,4 +1,4 @@
-/*
+<!--
* 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.
@@ -13,25 +13,13 @@
* 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.
- */
+-->
-export class File extends HTMLElement {
-
- constructor() {
- super();
- }
-
- connectedCallback(): void {
- this.input.form.enctype = "multipart/form-data";
- }
-
- get input(): HTMLInputElement {
- return this.querySelector("input");
- }
-}
-
-document.addEventListener("tobago.init", function (event: Event): void {
- if (window.customElements.get("tobago-file") == null) {
- window.customElements.define("tobago-file", File);
- }
-});
+<tobago-file id='id' class='tobago-auto-spacing' drop-zone='id'>
+ <div class='input-group'>
+ <input type='file' tabindex='-1' id='id::field' class='form-control' name='id'>
+ <label class='input-group-text' for='id::field'><span><i class='bi-folder2-open'></i></span></label>
+ <div class='form-control'>>>> drop here <<<
+ </div>
+ </div>
+</tobago-file>
diff --git a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-file.ts b/tobago-core/src/test/resources/renderer/file/file-drop-zone.html
similarity index 64%
copy from tobago-theme/tobago-theme-standard/src/main/ts/tobago-file.ts
copy to tobago-core/src/test/resources/renderer/file/file-drop-zone.html
index 052a4072af..9fe70cee80 100644
--- a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-file.ts
+++ b/tobago-core/src/test/resources/renderer/file/file-drop-zone.html
@@ -1,4 +1,4 @@
-/*
+<!--
* 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.
@@ -13,25 +13,13 @@
* 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.
- */
+-->
-export class File extends HTMLElement {
-
- constructor() {
- super();
- }
-
- connectedCallback(): void {
- this.input.form.enctype = "multipart/form-data";
- }
-
- get input(): HTMLInputElement {
- return this.querySelector("input");
- }
-}
-
-document.addEventListener("tobago.init", function (event: Event): void {
- if (window.customElements.get("tobago-file") == null) {
- window.customElements.define("tobago-file", File);
- }
-});
+<tobago-file id='id' class='tobago-auto-spacing' drop-zone='drop-zone'>
+ <div class='input-group'>
+ <input type='file' tabindex='-1' id='id::field' class='form-control' name='id'>
+ <label class='input-group-text' for='id::field'><span><i class='bi-folder2-open'></i></span></label>
+ <div class='form-control'>>>> drop here <<<
+ </div>
+ </div>
+</tobago-file>
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/UploadController.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/UploadController.java
index c5b9913eed..dd5cd1f199 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/UploadController.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/UploadController.java
@@ -43,6 +43,8 @@ public class UploadController implements Serializable {
private Part fileContentType;
private Part[] fileMulti;
private Part fileAjax;
+ private Part fileDropZone;
+ private Part[] fileDropZoneAjax;
private List<UploadItem> uploadItems = new ArrayList<>();
public String uploadBasic() {
@@ -62,6 +64,16 @@ public class UploadController implements Serializable {
return null;
}
+ public void uploadDropZone() {
+ upload(fileDropZone);
+ }
+
+ public void uploadDropZoneAjax(final AjaxBehaviorEvent event) {
+ for (final Part part : fileDropZoneAjax) {
+ upload(part);
+ }
+ }
+
public void uploadAjax(final AjaxBehaviorEvent event) {
upload(fileAjax);
}
@@ -113,6 +125,22 @@ public class UploadController implements Serializable {
this.fileAjax = fileAjax;
}
+ public Part getFileDropZone() {
+ return fileDropZone;
+ }
+
+ public void setFileDropZone(Part fileDropZone) {
+ this.fileDropZone = fileDropZone;
+ }
+
+ public Part[] getFileDropZoneAjax() {
+ return fileDropZoneAjax;
+ }
+
+ public void setFileDropZoneAjax(Part[] fileDropZoneAjax) {
+ this.fileDropZoneAjax = fileDropZoneAjax;
+ }
+
public List<UploadItem> getUploadItems() {
return uploadItems;
}
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/100-upload/File_Upload.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/100-upload/File_Upload.xhtml
index 4e8a8f3256..80fd0317b9 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/100-upload/File_Upload.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/100-upload/File_Upload.xhtml
@@ -33,7 +33,8 @@
<max-request-size>418018841</max-request-size>
<location>/tmp</location>
<file-size-threshold>1048576</file-size-threshold>
-</multipart-config></demo-highlight>
+ </multipart-config>
+ </demo-highlight>
<tc:link label="Tag Library Documentation" image="#{request.contextPath}/image/feather-leaf.png"
link="#{apiController.tldBase}/#{apiController.currentRelease}/tld/tc/file.html"/>
@@ -72,27 +73,46 @@
</tc:section>
<tc:section id="s3" label="Ajax">
-
<p>Ajax can be activated by adding <code class="language-markup"><f:ajax/></code>
to the <code class="language-markup"><tc:file/></code> tag.</p>
<p><tc:badge value="Warning" markup="warning"/> The Ajax feature of file upload works with JSF 2.2 or higher!</p>
<tc:file label="Ajax" value="#{uploadController.fileAjax}" id="fileAjax">
- <f:ajax listener="#{uploadController.uploadAjax}" render="s3 :page:messages"/>
+ <f:ajax listener="#{uploadController.uploadAjax}" render="s3 list :page:messages"/>
+ </tc:file>
+ </tc:section>
+
+ <tc:section id="dropZone" label="Drop Zone">
+ <tc:file label="Upload image" value="#{uploadController.fileDropZone}"
+ dropZone="@this"/>
+ <tc:button label="Upload" action="#{uploadController.uploadDropZone}"/>
+ </tc:section>
+
+ <tc:section id="dropZoneNoLabel" label="Drop Zone without Label">
+ <tc:file value="#{uploadController.fileDropZone}"
+ dropZone="@this"/>
+ <tc:button label="Upload" action="#{uploadController.uploadDropZone}"/>
+ </tc:section>
+
+ <tc:section id="dropZoneAjax" label="Drop Zone with Ajax">
+ <tc:file label="Ajax" value="#{uploadController.fileDropZoneAjax}" id="dzAjax"
+ dropZone="@this" multiple="true">
+ <f:ajax listener="#{uploadController.uploadDropZoneAjax}" render="dropZoneAjax list :page:messages"/>
</tc:file>
+ </tc:section>
- <tc:section id="s4" label="Uploaded Files">
- <tc:sheet value="#{uploadController.uploadItems}" var="item">
- <tc:column label="Name">
- <tc:out value="#{item.name}"/>
- </tc:column>
- <tc:column label="Type">
- <tc:out value="#{item.type}"/>
- </tc:column>
- <tc:column label="Size">
- <tc:out value="#{item.size}"/>
- </tc:column>
- </tc:sheet>
- </tc:section>
+ <tc:section id="list" label="Uploaded Files">
+ <tc:sheet value="#{uploadController.uploadItems}" var="item">
+ <tc:column label="Name">
+ <tc:out value="#{item.name}"/>
+ </tc:column>
+ <tc:column label="Type">
+ <tc:out value="#{item.type}"/>
+ </tc:column>
+ <tc:column label="Size">
+ <tc:out value="#{item.size}"/>
+ </tc:column>
+ </tc:sheet>
</tc:section>
+
</ui:composition>
diff --git a/tobago-theme/src/main/scss/_tobago.scss b/tobago-theme/src/main/scss/_tobago.scss
index b302422667..781b9cb74d 100644
--- a/tobago-theme/src/main/scss/_tobago.scss
+++ b/tobago-theme/src/main/scss/_tobago.scss
@@ -357,6 +357,18 @@ tobago-file {
}
}
+tobago-file[drop-zone] > .input-group {
+ input, label {
+ display: none !important;
+ }
+ border: 3px dotted $gray-500;
+ border-radius: 0.25rem;
+ text-align: center;
+ &:hover {
+ background-color: $gray-200;
+ }
+}
+
/* flexLayout -------------------------------------------------------------- */
tobago-flex-layout {
diff --git a/tobago-theme/tobago-theme-charlotteville/src/main/css/tobago.css b/tobago-theme/tobago-theme-charlotteville/src/main/css/tobago.css
index 586f73a3cd..c46fe59e30 100644
--- a/tobago-theme/tobago-theme-charlotteville/src/main/css/tobago.css
+++ b/tobago-theme/tobago-theme-charlotteville/src/main/css/tobago.css
@@ -11577,6 +11577,18 @@ tobago-file input[type=file].border-info:focus {
box-shadow: 0 0 0 0.25rem rgba(56, 156, 48, 0.25);
}
+tobago-file[drop-zone] > .input-group {
+ border: 3px dotted #adb5bd;
+ border-radius: 0.25rem;
+ text-align: center;
+}
+tobago-file[drop-zone] > .input-group input, tobago-file[drop-zone] > .input-group label {
+ display: none !important;
+}
+tobago-file[drop-zone] > .input-group:hover {
+ background-color: #d0d0d0;
+}
+
/* flexLayout -------------------------------------------------------------- */
tobago-flex-layout {
display: flex;
diff --git a/tobago-theme/tobago-theme-charlotteville/src/main/css/tobago.css.map b/tobago-theme/tobago-theme-charlotteville/src/main/css/tobago.css.map
index d2393e0a89..97de827b3b 100644
--- a/tobago-theme/tobago-theme-charlotteville/src/main/css/tobago.css.map
+++ b/tobago-theme/tobago-theme-charlotteville/src/main/css/tobago.css.map
@@ -1 +1 @@
-{"version":3,"sources":["tobago.css","../scss/tobago-theme.scss","../scss/_custom.scss","../../../../node_modules/bootstrap/scss/bootstrap.scss","../../../../node_modules/bootstrap/scss/_root.scss","../../../../node_modules/bootstrap/scss/_reboot.scss","../../../../node_modules/bootstrap/scss/vendor/_rfs.scss","../../../../node_modules/bootstrap/scss/_variables.scss","../../../../node_modules/bootstrap/scss/mixins/_border-radius.scss","../../../../node_modules/bootstrap/scss/_type.scss", [...]
\ No newline at end of file
+{"version":3,"sources":["tobago.css","../scss/tobago-theme.scss","../scss/_custom.scss","../../../../node_modules/bootstrap/scss/bootstrap.scss","../../../../node_modules/bootstrap/scss/_root.scss","../../../../node_modules/bootstrap/scss/_reboot.scss","../../../../node_modules/bootstrap/scss/vendor/_rfs.scss","../../../../node_modules/bootstrap/scss/_variables.scss","../../../../node_modules/bootstrap/scss/mixins/_border-radius.scss","../../../../node_modules/bootstrap/scss/_type.scss", [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-charlotteville/src/main/css/tobago.min.css b/tobago-theme/tobago-theme-charlotteville/src/main/css/tobago.min.css
index a1420d04e4..bfa46b86c4 100644
--- a/tobago-theme/tobago-theme-charlotteville/src/main/css/tobago.min.css
+++ b/tobago-theme/tobago-theme-charlotteville/src/main/css/tobago.min.css
@@ -1,2 +1,2 @@
-@charset "UTF-8";:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#ff00be;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#ffffff;--bs-gray:#777777;--bs-gray-dark:#323232;--bs-gray-100:#f8f9fa;--bs-gray-200:#d0d0d0;--bs-gray-300:#dee2e6;--bs-gray-400:#a0a0a0;--bs-gray-500:#adb5bd;--bs-gray-600:#777777;--bs-gray-700:#495057;--bs-gray-800:#323232;--bs-gray-900:#212529;--bs-primary:#529696;-- [...]
+@charset "UTF-8";:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#ff00be;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#ffffff;--bs-gray:#777777;--bs-gray-dark:#323232;--bs-gray-100:#f8f9fa;--bs-gray-200:#d0d0d0;--bs-gray-300:#dee2e6;--bs-gray-400:#a0a0a0;--bs-gray-500:#adb5bd;--bs-gray-600:#777777;--bs-gray-700:#495057;--bs-gray-800:#323232;--bs-gray-900:#212529;--bs-primary:#529696;-- [...]
/*# sourceMappingURL=tobago.min.css.map */
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-charlotteville/src/main/css/tobago.min.css.map b/tobago-theme/tobago-theme-charlotteville/src/main/css/tobago.min.css.map
index da329bbd3f..704c031f12 100644
--- a/tobago-theme/tobago-theme-charlotteville/src/main/css/tobago.min.css.map
+++ b/tobago-theme/tobago-theme-charlotteville/src/main/css/tobago.min.css.map
@@ -1 +1 @@
-{"version":3,"sources":["tobago-theme-charlotteville/src/main/css/tobago.css"],"names":[],"mappings":"iBAuCA,MACE,UAAW,QACX,YAAa,QACb,YAAa,QACb,UAAW,QACX,SAAU,QACV,YAAa,QACb,YAAa,QACb,WAAY,QACZ,UAAW,QACX,UAAW,QACX,WAAY,QACZ,UAAW,QACX,eAAgB,QAChB,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,aAAc,QACd,eAAgB,QAChB,aAAc,QACd,UAAW,QACX,aAAc,QACd,YAAa,QACb,WAAY,QACZ,UAAW,QACX,iBAAkB,EAAE,CAAE,GAAG,CAAE,IAC3B,mBAAoB,GAAG,CAAE,GAAG,CAAE,IAC9B,iBAAkB,G [...]
\ No newline at end of file
+{"version":3,"sources":["tobago-theme-charlotteville/src/main/css/tobago.css"],"names":[],"mappings":"iBAuCA,MACE,UAAW,QACX,YAAa,QACb,YAAa,QACb,UAAW,QACX,SAAU,QACV,YAAa,QACb,YAAa,QACb,WAAY,QACZ,UAAW,QACX,UAAW,QACX,WAAY,QACZ,UAAW,QACX,eAAgB,QAChB,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,aAAc,QACd,eAAgB,QAChB,aAAc,QACd,UAAW,QACX,aAAc,QACd,YAAa,QACb,WAAY,QACZ,UAAW,QACX,iBAAkB,EAAE,CAAE,GAAG,CAAE,IAC3B,mBAAoB,GAAG,CAAE,GAAG,CAAE,IAC9B,iBAAkB,G [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-roxborough/src/main/css/tobago.css b/tobago-theme/tobago-theme-roxborough/src/main/css/tobago.css
index d2b19d6dbb..2673b1a3ed 100644
--- a/tobago-theme/tobago-theme-roxborough/src/main/css/tobago.css
+++ b/tobago-theme/tobago-theme-roxborough/src/main/css/tobago.css
@@ -54,7 +54,7 @@
font-weight: bold;
src: url("../fonts/Amaranth-BoldItalic.otf") format("opentype");
}
-.tobago-section-header, .tobago-box-header {
+.tobago-box-header {
font-family: Amaranth, Arial, serif;
}
@@ -11600,6 +11600,18 @@ tobago-file input[type=file].border-info:focus {
box-shadow: 0 0 0 0.25rem rgba(19, 14, 143, 0.25);
}
+tobago-file[drop-zone] > .input-group {
+ border: 3px dotted #adb5bd;
+ border-radius: 0.25rem;
+ text-align: center;
+}
+tobago-file[drop-zone] > .input-group input, tobago-file[drop-zone] > .input-group label {
+ display: none !important;
+}
+tobago-file[drop-zone] > .input-group:hover {
+ background-color: #e9ecef;
+}
+
/* flexLayout -------------------------------------------------------------- */
tobago-flex-layout {
display: flex;
diff --git a/tobago-theme/tobago-theme-roxborough/src/main/css/tobago.css.map b/tobago-theme/tobago-theme-roxborough/src/main/css/tobago.css.map
index f3a31f2ce3..7f80aa5415 100644
--- a/tobago-theme/tobago-theme-roxborough/src/main/css/tobago.css.map
+++ b/tobago-theme/tobago-theme-roxborough/src/main/css/tobago.css.map
@@ -1 +1 @@
-{"version":3,"sources":["tobago.css","../scss/tobago-theme.scss","../scss/_custom.scss","../../../../node_modules/bootstrap/scss/bootstrap.scss","../../../../node_modules/bootstrap/scss/_root.scss","../../../../node_modules/bootstrap/scss/_reboot.scss","../../../../node_modules/bootstrap/scss/vendor/_rfs.scss","../../../../node_modules/bootstrap/scss/_variables.scss","../../../../node_modules/bootstrap/scss/mixins/_border-radius.scss","../../../../node_modules/bootstrap/scss/_type.scss", [...]
\ No newline at end of file
+{"version":3,"sources":["tobago.css","../scss/tobago-theme.scss","../scss/_custom.scss","../../../../node_modules/bootstrap/scss/bootstrap.scss","../../../../node_modules/bootstrap/scss/_root.scss","../../../../node_modules/bootstrap/scss/_reboot.scss","../../../../node_modules/bootstrap/scss/vendor/_rfs.scss","../../../../node_modules/bootstrap/scss/_variables.scss","../../../../node_modules/bootstrap/scss/mixins/_border-radius.scss","../../../../node_modules/bootstrap/scss/_type.scss", [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-roxborough/src/main/css/tobago.min.css b/tobago-theme/tobago-theme-roxborough/src/main/css/tobago.min.css
index c42a1ab00f..6446ebb0c7 100644
--- a/tobago-theme/tobago-theme-roxborough/src/main/css/tobago.min.css
+++ b/tobago-theme/tobago-theme-roxborough/src/main/css/tobago.min.css
@@ -1,2 +1,2 @@
-@charset "UTF-8";@font-face{font-family:Amaranth;font-style:normal;font-weight:400;src:url("../fonts/Amaranth-Regular.otf") format("opentype")}@font-face{font-family:Amaranth;font-style:normal;font-weight:700;src:url("../fonts/Amaranth-Bold.otf") format("opentype")}@font-face{font-family:Amaranth;font-style:italic;src:url("../fonts/Amaranth-Italic.otf") format("opentype")}@font-face{font-family:Amaranth;font-style:italic;font-weight:700;src:url("../fonts/Amaranth-BoldItalic.otf") format( [...]
+@charset "UTF-8";@font-face{font-family:Amaranth;font-style:normal;font-weight:400;src:url("../fonts/Amaranth-Regular.otf") format("opentype")}@font-face{font-family:Amaranth;font-style:normal;font-weight:700;src:url("../fonts/Amaranth-Bold.otf") format("opentype")}@font-face{font-family:Amaranth;font-style:italic;src:url("../fonts/Amaranth-Italic.otf") format("opentype")}@font-face{font-family:Amaranth;font-style:italic;font-weight:700;src:url("../fonts/Amaranth-BoldItalic.otf") format( [...]
/*# sourceMappingURL=tobago.min.css.map */
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-roxborough/src/main/css/tobago.min.css.map b/tobago-theme/tobago-theme-roxborough/src/main/css/tobago.min.css.map
index 80e13e23bb..af7729b63a 100644
--- a/tobago-theme/tobago-theme-roxborough/src/main/css/tobago.min.css.map
+++ b/tobago-theme/tobago-theme-roxborough/src/main/css/tobago.min.css.map
@@ -1 +1 @@
-{"version":3,"sources":["tobago-theme-roxborough/src/main/css/tobago.css"],"names":[],"mappings":"iBAiCA,WACE,YAAa,SACb,WAAY,OACZ,YAAa,IACb,IAAK,qCAAqC,mBAE5C,WACE,YAAa,SACb,WAAY,OACZ,YAAa,IACb,IAAK,kCAAkC,mBAEzC,WACE,YAAa,SACb,WAAY,OACZ,IAAK,oCAAoC,mBAE3C,WACE,YAAa,SACb,WAAY,OACZ,YAAa,IACb,IAAK,wCAAwC,mBAEvB,mBAAxB,uBACE,YAAa,QAAQ,CAAE,KAAK,CAAE,MAShC,MACE,UAAW,QACX,YAAa,QACb,YAAa,QACb,UAAW,QACX,SAAU,QACV,YAAa,QACb,YAAa,QACb,WAAY,QACZ,UAAW,QACX,UAAW,QACX,WAAY,KACZ,UAAW,QACX,eAAgB,QAChB, [...]
\ No newline at end of file
+{"version":3,"sources":["tobago-theme-roxborough/src/main/css/tobago.css"],"names":[],"mappings":"iBAiCA,WACE,YAAa,SACb,WAAY,OACZ,YAAa,IACb,IAAK,qCAAqC,mBAE5C,WACE,YAAa,SACb,WAAY,OACZ,YAAa,IACb,IAAK,kCAAkC,mBAEzC,WACE,YAAa,SACb,WAAY,OACZ,IAAK,oCAAoC,mBAE3C,WACE,YAAa,SACb,WAAY,OACZ,YAAa,IACb,IAAK,wCAAwC,mBAE/C,mBACE,YAAa,QAAQ,CAAE,KAAK,CAAE,MAShC,MACE,UAAW,QACX,YAAa,QACb,YAAa,QACb,UAAW,QACX,SAAU,QACV,YAAa,QACb,YAAa,QACb,WAAY,QACZ,UAAW,QACX,UAAW,QACX,WAAY,KACZ,UAAW,QACX,eAAgB,QAChB,cAAe,QA [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-scarborough/src/main/css/tobago.css b/tobago-theme/tobago-theme-scarborough/src/main/css/tobago.css
index 723dc65eaf..d7080d37cb 100644
--- a/tobago-theme/tobago-theme-scarborough/src/main/css/tobago.css
+++ b/tobago-theme/tobago-theme-scarborough/src/main/css/tobago.css
@@ -11587,6 +11587,18 @@ tobago-file input[type=file].border-info:focus {
box-shadow: 0 0 0 0.25rem rgba(13, 202, 240, 0.25);
}
+tobago-file[drop-zone] > .input-group {
+ border: 3px dotted #adb5bd;
+ border-radius: 0.25rem;
+ text-align: center;
+}
+tobago-file[drop-zone] > .input-group input, tobago-file[drop-zone] > .input-group label {
+ display: none !important;
+}
+tobago-file[drop-zone] > .input-group:hover {
+ background-color: #e9ecef;
+}
+
/* flexLayout -------------------------------------------------------------- */
tobago-flex-layout {
display: flex;
diff --git a/tobago-theme/tobago-theme-scarborough/src/main/css/tobago.css.map b/tobago-theme/tobago-theme-scarborough/src/main/css/tobago.css.map
index 29ced36be3..f5bbb34039 100644
--- a/tobago-theme/tobago-theme-scarborough/src/main/css/tobago.css.map
+++ b/tobago-theme/tobago-theme-scarborough/src/main/css/tobago.css.map
@@ -1 +1 @@
-{"version":3,"sources":["tobago.css","../scss/tobago-theme.scss","../../../../node_modules/bootstrap/scss/bootstrap.scss","../../../../node_modules/bootstrap/scss/_root.scss","../../../../node_modules/bootstrap/scss/_reboot.scss","../../../../node_modules/bootstrap/scss/vendor/_rfs.scss","../../../../node_modules/bootstrap/scss/_variables.scss","../../../../node_modules/bootstrap/scss/mixins/_border-radius.scss","../../../../node_modules/bootstrap/scss/_type.scss","../../../../node_modul [...]
\ No newline at end of file
+{"version":3,"sources":["tobago.css","../scss/tobago-theme.scss","../../../../node_modules/bootstrap/scss/bootstrap.scss","../../../../node_modules/bootstrap/scss/_root.scss","../../../../node_modules/bootstrap/scss/_reboot.scss","../../../../node_modules/bootstrap/scss/vendor/_rfs.scss","../../../../node_modules/bootstrap/scss/_variables.scss","../../../../node_modules/bootstrap/scss/mixins/_border-radius.scss","../../../../node_modules/bootstrap/scss/_type.scss","../../../../node_modul [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-scarborough/src/main/css/tobago.min.css b/tobago-theme/tobago-theme-scarborough/src/main/css/tobago.min.css
index 1ee1e40c27..28ea730e8b 100644
--- a/tobago-theme/tobago-theme-scarborough/src/main/css/tobago.min.css
+++ b/tobago-theme/tobago-theme-scarborough/src/main/css/tobago.min.css
@@ -1,2 +1,2 @@
-@charset "UTF-8";:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs- [...]
+@charset "UTF-8";:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs- [...]
/*# sourceMappingURL=tobago.min.css.map */
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-scarborough/src/main/css/tobago.min.css.map b/tobago-theme/tobago-theme-scarborough/src/main/css/tobago.min.css.map
index 65ccc97993..c8951b25ca 100644
--- a/tobago-theme/tobago-theme-scarborough/src/main/css/tobago.min.css.map
+++ b/tobago-theme/tobago-theme-scarborough/src/main/css/tobago.min.css.map
@@ -1 +1 @@
-{"version":3,"sources":["tobago-theme-scarborough/src/main/css/tobago.css"],"names":[],"mappings":"iBAuBA,MACE,UAAW,QACX,YAAa,QACb,YAAa,QACb,UAAW,QACX,SAAU,QACV,YAAa,QACb,YAAa,QACb,WAAY,QACZ,UAAW,QACX,UAAW,QACX,WAAY,KACZ,UAAW,QACX,eAAgB,QAChB,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,aAAc,QACd,eAAgB,QAChB,aAAc,QACd,UAAW,QACX,aAAc,QACd,YAAa,QACb,WAAY,QACZ,UAAW,QACX,iBAAkB,EAAE,CAAE,GAAG,CAAE,IAC3B,mBAAoB,GAAG,CAAE,GAAG,CAAE,IAC9B,iBAAkB,EAAE [...]
\ No newline at end of file
+{"version":3,"sources":["tobago-theme-scarborough/src/main/css/tobago.css"],"names":[],"mappings":"iBAuBA,MACE,UAAW,QACX,YAAa,QACb,YAAa,QACb,UAAW,QACX,SAAU,QACV,YAAa,QACb,YAAa,QACb,WAAY,QACZ,UAAW,QACX,UAAW,QACX,WAAY,KACZ,UAAW,QACX,eAAgB,QAChB,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,aAAc,QACd,eAAgB,QAChB,aAAc,QACd,UAAW,QACX,aAAc,QACd,YAAa,QACb,WAAY,QACZ,UAAW,QACX,iBAAkB,EAAE,CAAE,GAAG,CAAE,IAC3B,mBAAoB,GAAG,CAAE,GAAG,CAAE,IAC9B,iBAAkB,EAAE [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-speyside/src/main/css/tobago.css b/tobago-theme/tobago-theme-speyside/src/main/css/tobago.css
index 071a04e8cd..ab2c191ae2 100644
--- a/tobago-theme/tobago-theme-speyside/src/main/css/tobago.css
+++ b/tobago-theme/tobago-theme-speyside/src/main/css/tobago.css
@@ -11287,6 +11287,18 @@ tobago-file input[type=file].border-info:focus {
box-shadow: 0 0 0 0.25rem rgba(91, 192, 222, 0.25);
}
+tobago-file[drop-zone] > .input-group {
+ border: 3px dotted #acacac;
+ border-radius: 0.25rem;
+ text-align: center;
+}
+tobago-file[drop-zone] > .input-group input, tobago-file[drop-zone] > .input-group label {
+ display: none !important;
+}
+tobago-file[drop-zone] > .input-group:hover {
+ background-color: #e3e4e5;
+}
+
/* flexLayout -------------------------------------------------------------- */
tobago-flex-layout {
display: flex;
@@ -12754,18 +12766,14 @@ td button.tobago-link, td button.tobago-command {
margin-bottom: 12px;
}
-.form-group ~ a.tobago-link, tobago-label ~ a.tobago-link {
+.form-group ~ a.tobago-link {
padding-top: 0.46em;
margin-bottom: 0;
}
-.form-group ~ button.tobago-link, tobago-label ~ button.tobago-link {
+.form-group ~ button.tobago-link {
margin-bottom: 1rem;
}
-.tobago-sheet .tobago-body td button.tobago-link {
- margin-bottom: 0;
-}
-
tobago-header.sticky-top a[disabled], tobago-header.sticky-top a[disabled]:hover, tobago-header.sticky-top button[disabled], tobago-header.sticky-top button[disabled]:hover {
color: rgb(120, 140, 148) !important;
}
@@ -13373,16 +13381,4 @@ li:last-child {
min-height: 26px;
}
-.tobago-section-header {
- border-bottom: 1px solid rgba(1, 1, 1, 0.05);
- margin-bottom: 0.5rem;
-}
-.tobago-section-header h1, .tobago-section-header .h1 {
- margin-bottom: 0;
-}
-.tobago-section-header h2, .tobago-section-header .h2, .tobago-section-header h3, .tobago-section-header .h3, .tobago-section-header h4, .tobago-section-header .h4, .tobago-section-header h5, .tobago-section-header .h5, .tobago-section-header h6, .tobago-section-header .h6 {
- margin-top: 1rem;
- margin-bottom: 0;
-}
-
/*# sourceMappingURL=tobago.css.map */
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-speyside/src/main/css/tobago.css.map b/tobago-theme/tobago-theme-speyside/src/main/css/tobago.css.map
index 6f02743e5c..c4d9214c33 100644
--- a/tobago-theme/tobago-theme-speyside/src/main/css/tobago.css.map
+++ b/tobago-theme/tobago-theme-speyside/src/main/css/tobago.css.map
@@ -1 +1 @@
-{"version":3,"sources":["tobago.css","../scss/tobago-theme.scss","../scss/_custom.scss","../../../../node_modules/bootstrap/scss/bootstrap.scss","../../../../node_modules/bootstrap/scss/_root.scss","../../../../node_modules/bootstrap/scss/_reboot.scss","../../../../node_modules/bootstrap/scss/vendor/_rfs.scss","../../../../node_modules/bootstrap/scss/_variables.scss","../../../../node_modules/bootstrap/scss/_type.scss","../../../../node_modules/bootstrap/scss/mixins/_lists.scss","../../. [...]
\ No newline at end of file
+{"version":3,"sources":["tobago.css","../scss/tobago-theme.scss","../scss/_custom.scss","../../../../node_modules/bootstrap/scss/bootstrap.scss","../../../../node_modules/bootstrap/scss/_root.scss","../../../../node_modules/bootstrap/scss/_reboot.scss","../../../../node_modules/bootstrap/scss/vendor/_rfs.scss","../../../../node_modules/bootstrap/scss/_variables.scss","../../../../node_modules/bootstrap/scss/_type.scss","../../../../node_modules/bootstrap/scss/mixins/_lists.scss","../../. [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-speyside/src/main/css/tobago.min.css b/tobago-theme/tobago-theme-speyside/src/main/css/tobago.min.css
index 2b01bdc8cd..7e8fe7f9e3 100644
--- a/tobago-theme/tobago-theme-speyside/src/main/css/tobago.min.css
+++ b/tobago-theme/tobago-theme-speyside/src/main/css/tobago.min.css
@@ -1,2 +1,2 @@
-@charset "UTF-8";:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:rgb(58, 37, 100);--bs-pink:#d63384;--bs-red:rgb(211, 0, 64);--bs-orange:#d90;--bs-yellow:#ffc107;--bs-green:rgb(29, 163, 50);--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#fff;--bs-gray:rgb(120, 140, 148);--bs-gray-dark:#323232;--bs-gray-100:#f7f7f7;--bs-gray-200:#e3e4e5;--bs-gray-300:#d7d7d7;--bs-gray-400:#ced4da;--bs-gray-500:#acacac;--bs-gray-600:rgb(120, 140, 148);--bs-gray-700:#55595c;--bs-gray-800:#323232;--b [...]
+@charset "UTF-8";:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:rgb(58, 37, 100);--bs-pink:#d63384;--bs-red:rgb(211, 0, 64);--bs-orange:#d90;--bs-yellow:#ffc107;--bs-green:rgb(29, 163, 50);--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#fff;--bs-gray:rgb(120, 140, 148);--bs-gray-dark:#323232;--bs-gray-100:#f7f7f7;--bs-gray-200:#e3e4e5;--bs-gray-300:#d7d7d7;--bs-gray-400:#ced4da;--bs-gray-500:#acacac;--bs-gray-600:rgb(120, 140, 148);--bs-gray-700:#55595c;--bs-gray-800:#323232;--b [...]
/*# sourceMappingURL=tobago.min.css.map */
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-speyside/src/main/css/tobago.min.css.map b/tobago-theme/tobago-theme-speyside/src/main/css/tobago.min.css.map
index b199fe2f63..8a307bc91e 100644
--- a/tobago-theme/tobago-theme-speyside/src/main/css/tobago.min.css.map
+++ b/tobago-theme/tobago-theme-speyside/src/main/css/tobago.min.css.map
@@ -1 +1 @@
-{"version":3,"sources":["tobago-theme-speyside/src/main/css/tobago.css"],"names":[],"mappings":"iBAuCA,MACE,UAAW,QACX,YAAa,QACb,YAAa,iBACb,UAAW,QACX,SAAU,gBACV,YAAa,KACb,YAAa,QACb,WAAY,iBACZ,UAAW,QACX,UAAW,QACX,WAAY,KACZ,UAAW,mBACX,eAAgB,QAChB,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,mBACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,aAAc,gBACd,eAAgB,QAChB,aAAc,iBACd,UAAW,QACX,aAAc,QACd,YAAa,gBACb,WAAY,QACZ,UAAW,QACX,iBAAkB,EAAE,CAAE,EAAE,CAAE,GAC1B,mBAAoB,GAAG,CAAE,GAAG,CAAE,IAC9B,iBAAkB [...]
\ No newline at end of file
+{"version":3,"sources":["tobago-theme-speyside/src/main/css/tobago.css"],"names":[],"mappings":"iBAuCA,MACE,UAAW,QACX,YAAa,QACb,YAAa,iBACb,UAAW,QACX,SAAU,gBACV,YAAa,KACb,YAAa,QACb,WAAY,iBACZ,UAAW,QACX,UAAW,QACX,WAAY,KACZ,UAAW,mBACX,eAAgB,QAChB,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,mBACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,aAAc,gBACd,eAAgB,QAChB,aAAc,iBACd,UAAW,QACX,aAAc,QACd,YAAa,gBACb,WAAY,QACZ,UAAW,QACX,iBAAkB,EAAE,CAAE,EAAE,CAAE,GAC1B,mBAAoB,GAAG,CAAE,GAAG,CAAE,IAC9B,iBAAkB [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/src/main/css/fonts/bootstrap-icons.woff b/tobago-theme/tobago-theme-standard/src/main/css/fonts/bootstrap-icons.woff
index 013f11525e..4cd66b71ad 100644
Binary files a/tobago-theme/tobago-theme-standard/src/main/css/fonts/bootstrap-icons.woff and b/tobago-theme/tobago-theme-standard/src/main/css/fonts/bootstrap-icons.woff differ
diff --git a/tobago-theme/tobago-theme-standard/src/main/css/tobago.css b/tobago-theme/tobago-theme-standard/src/main/css/tobago.css
index 4b1444ce63..7212bf1d0e 100644
--- a/tobago-theme/tobago-theme-standard/src/main/css/tobago.css
+++ b/tobago-theme/tobago-theme-standard/src/main/css/tobago.css
@@ -11557,6 +11557,18 @@ tobago-file input[type=file].border-info:focus {
box-shadow: 0 0 0 0.25rem rgba(13, 202, 240, 0.25);
}
+tobago-file[drop-zone] > .input-group {
+ border: 3px dotted #adb5bd;
+ border-radius: 0.25rem;
+ text-align: center;
+}
+tobago-file[drop-zone] > .input-group input, tobago-file[drop-zone] > .input-group label {
+ display: none !important;
+}
+tobago-file[drop-zone] > .input-group:hover {
+ background-color: #e9ecef;
+}
+
/* flexLayout -------------------------------------------------------------- */
tobago-flex-layout {
display: flex;
diff --git a/tobago-theme/tobago-theme-standard/src/main/css/tobago.css.map b/tobago-theme/tobago-theme-standard/src/main/css/tobago.css.map
index 8c154817c9..460339b8ae 100644
--- a/tobago-theme/tobago-theme-standard/src/main/css/tobago.css.map
+++ b/tobago-theme/tobago-theme-standard/src/main/css/tobago.css.map
@@ -1 +1 @@
-{"version":3,"sources":["tobago.css","../scss/tobago-theme.scss","../../../../node_modules/bootstrap/scss/bootstrap.scss","../../../../node_modules/bootstrap/scss/_root.scss","../../../../node_modules/bootstrap/scss/_reboot.scss","../../../../node_modules/bootstrap/scss/vendor/_rfs.scss","../../../../node_modules/bootstrap/scss/_variables.scss","../../../../node_modules/bootstrap/scss/mixins/_border-radius.scss","../../../../node_modules/bootstrap/scss/_type.scss","../../../../node_modul [...]
\ No newline at end of file
+{"version":3,"sources":["tobago.css","../scss/tobago-theme.scss","../../../../node_modules/bootstrap/scss/bootstrap.scss","../../../../node_modules/bootstrap/scss/_root.scss","../../../../node_modules/bootstrap/scss/_reboot.scss","../../../../node_modules/bootstrap/scss/vendor/_rfs.scss","../../../../node_modules/bootstrap/scss/_variables.scss","../../../../node_modules/bootstrap/scss/mixins/_border-radius.scss","../../../../node_modules/bootstrap/scss/_type.scss","../../../../node_modul [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/src/main/css/tobago.min.css b/tobago-theme/tobago-theme-standard/src/main/css/tobago.min.css
index ad6966ac1d..90886749cc 100644
--- a/tobago-theme/tobago-theme-standard/src/main/css/tobago.min.css
+++ b/tobago-theme/tobago-theme-standard/src/main/css/tobago.min.css
@@ -1,2 +1,2 @@
-@charset "UTF-8";:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs- [...]
+@charset "UTF-8";:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs- [...]
/*# sourceMappingURL=tobago.min.css.map */
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/src/main/css/tobago.min.css.map b/tobago-theme/tobago-theme-standard/src/main/css/tobago.min.css.map
index 1d80634be2..586da8a42f 100644
--- a/tobago-theme/tobago-theme-standard/src/main/css/tobago.min.css.map
+++ b/tobago-theme/tobago-theme-standard/src/main/css/tobago.min.css.map
@@ -1 +1 @@
-{"version":3,"sources":["tobago-theme-standard/src/main/css/tobago.css"],"names":[],"mappings":"iBAuBA,MACE,UAAW,QACX,YAAa,QACb,YAAa,QACb,UAAW,QACX,SAAU,QACV,YAAa,QACb,YAAa,QACb,WAAY,QACZ,UAAW,QACX,UAAW,QACX,WAAY,KACZ,UAAW,QACX,eAAgB,QAChB,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,aAAc,QACd,eAAgB,QAChB,aAAc,QACd,UAAW,QACX,aAAc,QACd,YAAa,QACb,WAAY,QACZ,UAAW,QACX,iBAAkB,EAAE,CAAE,GAAG,CAAE,IAC3B,mBAAoB,GAAG,CAAE,GAAG,CAAE,IAC9B,iBAAkB,EAAE,CA [...]
\ No newline at end of file
+{"version":3,"sources":["tobago-theme-standard/src/main/css/tobago.css"],"names":[],"mappings":"iBAuBA,MACE,UAAW,QACX,YAAa,QACb,YAAa,QACb,UAAW,QACX,SAAU,QACV,YAAa,QACb,YAAa,QACb,WAAY,QACZ,UAAW,QACX,UAAW,QACX,WAAY,KACZ,UAAW,QACX,eAAgB,QAChB,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,cAAe,QACf,aAAc,QACd,eAAgB,QAChB,aAAc,QACd,UAAW,QACX,aAAc,QACd,YAAa,QACb,WAAY,QACZ,UAAW,QACX,iBAAkB,EAAE,CAAE,GAAG,CAAE,IAC3B,mBAAoB,GAAG,CAAE,GAAG,CAAE,IAC9B,iBAAkB,EAAE,CA [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/src/main/js/tobago.js b/tobago-theme/tobago-theme-standard/src/main/js/tobago.js
index b86ffa43cb..457de80e6b 100644
--- a/tobago-theme/tobago-theme-standard/src/main/js/tobago.js
+++ b/tobago-theme/tobago-theme-standard/src/main/js/tobago.js
@@ -4,5 +4,5 @@
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
-const Ne="transitionend",Re=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let s=e.getAttribute("href");if(!s||!s.includes("#")&&!s.startsWith("."))return null;s.includes("#")&&!s.startsWith("#")&&(s=`#${s.split("#")[1]}`),t=s&&"#"!==s?s.trim():null}return t},De=e=>{const t=Re(e);return t&&document.querySelector(t)?t:null},Me=e=>{const t=Re(e);return t?document.querySelector(t):null},je=e=>{e.dispatchEvent(new Event(Ne))},He=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&( [...]
+const Ne="transitionend",Re=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let s=e.getAttribute("href");if(!s||!s.includes("#")&&!s.startsWith("."))return null;s.includes("#")&&!s.startsWith("#")&&(s=`#${s.split("#")[1]}`),t=s&&"#"!==s?s.trim():null}return t},De=e=>{const t=Re(e);return t&&document.querySelector(t)?t:null},Me=e=>{const t=Re(e);return t?document.querySelector(t):null},je=e=>{e.dispatchEvent(new Event(Ne))},He=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&( [...]
//# sourceMappingURL=tobago.js.map
diff --git a/tobago-theme/tobago-theme-standard/src/main/js/tobago.js.map b/tobago-theme/tobago-theme-standard/src/main/js/tobago.js.map
index 272655618e..eae9495b4a 100644
--- a/tobago-theme/tobago-theme-standard/src/main/js/tobago.js.map
+++ b/tobago-theme/tobago-theme-standard/src/main/js/tobago.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago.js","sources":["../ts/tobago-bar.ts","../../../../node_modules/@popperjs/core/lib/enums.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../../node_m [...]
\ No newline at end of file
+{"version":3,"file":"tobago.js","sources":["../ts/tobago-bar.ts","../../../../node_modules/@popperjs/core/lib/enums.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../../node_m [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-file.ts b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-file.ts
index 052a4072af..99021d4c06 100644
--- a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-file.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-file.ts
@@ -21,12 +21,50 @@ export class File extends HTMLElement {
super();
}
+ get input(): HTMLInputElement {
+ return this.querySelector("input[type=file]");
+ }
+
+ get dropZone(): HTMLElement {
+ const id = this.getAttribute("drop-zone");
+ const rootNode = this.getRootNode() as ShadowRoot | Document;
+ return rootNode.getElementById(id);
+ }
+
connectedCallback(): void {
this.input.form.enctype = "multipart/form-data";
+
+ // initialize drag&drop EventListener
+ const dropZone = this.dropZone;
+ if (dropZone) {
+ dropZone.addEventListener("dragover", this.dragover.bind(this));
+ dropZone.addEventListener("drop", this.drop.bind(this));
+ }
}
- get input(): HTMLInputElement {
- return this.querySelector("input");
+ dragover(event: DragEvent): void {
+ event.stopPropagation();
+ event.preventDefault();
+ event.dataTransfer.dropEffect = "copy";
+ }
+
+ drop(event: DragEvent): void {
+ console.debug(event);
+ event.stopPropagation();
+ event.preventDefault();
+
+ this.input.files = event.dataTransfer.files;
+/* todo: feature? show list of dropped files
+ const output = [];
+ for (let i = 0; files.item(i); i++) {
+ const file = files.item(i);
+ output.push("<li><strong>", escape(file.name), "</strong> (", file.type || "n/a", ") - ",
+ file.size, " bytes, last modified: ",
+ new Date(file.lastModified).toLocaleDateString(), "</li>");
+ }
+ document.getElementById("list").innerHTML = "<ul>" + output.join("") + "</ul>";
+ */
+ this.input.dispatchEvent(new Event("change"));
}
}