Skip to content

Commit 79b472d

Browse files
committed
isMultiDownloadEnabled
1 parent f95592c commit 79b472d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ qx.Class.define("osparc.file.FileLabelWithActions", {
109109
setItemSelected: function(selectedItem) {
110110
if (selectedItem) {
111111
this.__selection = [selectedItem];
112-
this.getChildControl("download-button").setEnabled(true); // folders can also be downloaded
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
113115
this.getChildControl("delete-button").setEnabled(true); // folders can also be deleted
114116
this.getChildControl("selected-label").setValue(selectedItem.getLabel());
115117
} else {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ qx.Class.define("osparc.utils.DisabledPlugins", {
6060
return osparc.store.StaticInfo.getInstance().isDevFeaturesEnabled();
6161
},
6262

63-
6463
isJobsEnabled: function() {
6564
if (osparc.utils.Utils.isDevelopmentPlatform() && osparc.product.Utils.isProduct("s4lacad")) {
6665
return true;

0 commit comments

Comments
 (0)