Skip to content

Commit 71f6908

Browse files
committed
dynamic exportButton. closes ITISFoundation#1486
1 parent 4d4075e commit 71f6908

File tree

1 file changed

+5
-1
lines changed
  • services/web/client/source/class/osparc/component/widget

1 file changed

+5
-1
lines changed

services/web/client/source/class/osparc/component/widget/NodesTree.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ qx.Class.define("osparc.component.widget.NodesTree", {
6464
members: {
6565
__toolBar: null,
6666
__tree: null,
67+
__exportButton: null,
6768

6869
_createChildControlImpl: function(id) {
6970
let control;
@@ -97,7 +98,9 @@ qx.Class.define("osparc.component.widget.NodesTree", {
9798
toolbar.addSpacer();
9899

99100
if (osparc.data.Permissions.getInstance().canDo("study.node.export")) {
100-
const exportButton = new qx.ui.toolbar.Button(this.tr("Export"), "@FontAwesome5Solid/share/"+iconSize);
101+
const exportButton = this.__exportButton = new qx.ui.toolbar.Button(this.tr("Export"), "@FontAwesome5Solid/share/"+iconSize).set({
102+
enabled: false
103+
});
101104
exportButton.addListener("execute", () => {
102105
this.__exportGroup();
103106
}, this);
@@ -184,6 +187,7 @@ qx.Class.define("osparc.component.widget.NodesTree", {
184187
}, this);
185188
item.addListener("tap", e => {
186189
this.fireDataEvent("changeSelectedNode", item.getModel().getNodeId());
190+
this.__exportButton.setEnabled(item.getLevel() && item.getModel().getIsContainer());
187191
}, this);
188192
}
189193
});

0 commit comments

Comments
 (0)