summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2014-10-12 23:42:28 +0300
committerSauli Tähkäpää <sauli@vaadin.com>2014-10-29 10:46:08 +0200
commit3e9e19fc57b963e8a2e6c0d3c9a1bdafbc8e4b04 (patch)
tree3953592ac145231d7daa3842d3ad4da98cd39134 /client
parent6a7afc477caec242cbe67a7cb5d36b0a2c59cd97 (diff)
downloadvaadin-framework-3e9e19fc57b963e8a2e6c0d3c9a1bdafbc8e4b04.tar.gz
vaadin-framework-3e9e19fc57b963e8a2e6c0d3c9a1bdafbc8e4b04.zip
Set v-disabled on Button inside Upload when disabled. (#14655)
Change-Id: Ic28c8e4020eddae32a71b5c7f9da0ad61f2f7af9
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/VUpload.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/ui/VUpload.java b/client/src/com/vaadin/client/ui/VUpload.java
index f234ef6d65..42fb08fb3c 100644
--- a/client/src/com/vaadin/client/ui/VUpload.java
+++ b/client/src/com/vaadin/client/ui/VUpload.java
@@ -184,7 +184,7 @@ public class VUpload extends SimplePanel {
/** For internal use only. May be removed or replaced in the future. */
public void disableUpload() {
- submitButton.setEnabled(false);
+ setEnabledForSubmitButton(false);
if (!submitted) {
// Cannot disable the fileupload while submitting or the file won't
// be submitted at all
@@ -195,7 +195,7 @@ public class VUpload extends SimplePanel {
/** For internal use only. May be removed or replaced in the future. */
public void enableUpload() {
- submitButton.setEnabled(true);
+ setEnabledForSubmitButton(true);
fu.getElement().setPropertyBoolean("disabled", false);
enabled = true;
if (submitted) {
@@ -209,6 +209,12 @@ public class VUpload extends SimplePanel {
}
}
+ private void setEnabledForSubmitButton(boolean enabled) {
+ submitButton.setEnabled(enabled);
+ submitButton.setStyleName(ApplicationConnection.DISABLED_CLASSNAME,
+ !enabled);
+ }
+
/**
* Re-creates file input field and populates panel. This is needed as we
* want to clear existing values from our current file input field.