Skip to content

Commit e977b15

Browse files
committed
enable multi-download
1 parent 2de49f4 commit e977b15

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

services/static-webserver/client/source/class/osparc/file/FileLabelWithActions.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ qx.Class.define("osparc.file.FileLabelWithActions", {
109109
setItemSelected: function(selectedItem) {
110110
if (selectedItem) {
111111
this.__selection = [selectedItem];
112-
const isFile = osparc.file.FilesTree.isFile(selectedItem);
113-
const isMultiDownloadEnabled = osparc.utils.DisabledPlugins.isMultiDownloadEnabled();
114-
this.getChildControl("download-button").setEnabled(isFile || isMultiDownloadEnabled); // folders can also be downloaded
112+
this.getChildControl("download-button").setEnabled(true); // folders can also be downloaded
115113
this.getChildControl("delete-button").setEnabled(true); // folders can also be deleted
116114
this.getChildControl("selected-label").setValue(selectedItem.getLabel());
117115
} else {
@@ -143,11 +141,10 @@ qx.Class.define("osparc.file.FileLabelWithActions", {
143141
},
144142

145143
__retrieveURLAndDownloadSelected: function() {
146-
const isMultiDownloadEnabled = osparc.utils.DisabledPlugins.isMultiDownloadEnabled();
147144
if (this.isMultiSelect()) {
148145
if (this.__selection.length === 1 && osparc.file.FilesTree.isFile(this.__selection[0])) {
149146
this.__retrieveURLAndDownloadFile(this.__selection[0]);
150-
} else if (this.__selection.length > 1 && isMultiDownloadEnabled) {
147+
} else if (this.__selection.length > 1) {
151148
const paths = this.__selection.map(item => item.getPath());
152149
this.__retrieveURLAndExportData(paths);
153150
}
@@ -156,7 +153,7 @@ qx.Class.define("osparc.file.FileLabelWithActions", {
156153
if (selection) {
157154
if (osparc.file.FilesTree.isFile(selection)) {
158155
this.__retrieveURLAndDownloadFile(selection);
159-
} else if (isMultiDownloadEnabled) {
156+
} else {
160157
const paths = [selection.getPath()];
161158
this.__retrieveURLAndExportData(paths);
162159
}

services/static-webserver/client/source/class/osparc/utils/DisabledPlugins.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ qx.Class.define("osparc.utils.DisabledPlugins", {
5656
return osparc.store.StaticInfo.getInstance().isDevFeaturesEnabled();
5757
},
5858

59-
isMultiDownloadEnabled: function() {
60-
return osparc.store.StaticInfo.getInstance().isDevFeaturesEnabled();
61-
},
62-
6359
isJobsEnabled: function() {
6460
if (osparc.store.StaticInfo.getInstance().isDevFeaturesEnabled() && osparc.product.Utils.isS4LProduct()) {
6561
return true;

0 commit comments

Comments
 (0)