File tree 1 file changed +5
-1
lines changed
services/web/client/source/class/osparc/component/widget
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ qx.Class.define("osparc.component.widget.NodesTree", {
64
64
members : {
65
65
__toolBar : null ,
66
66
__tree : null ,
67
+ __exportButton : null ,
67
68
68
69
_createChildControlImpl : function ( id ) {
69
70
let control ;
@@ -97,7 +98,9 @@ qx.Class.define("osparc.component.widget.NodesTree", {
97
98
toolbar . addSpacer ( ) ;
98
99
99
100
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
+ } ) ;
101
104
exportButton . addListener ( "execute" , ( ) => {
102
105
this . __exportGroup ( ) ;
103
106
} , this ) ;
@@ -184,6 +187,7 @@ qx.Class.define("osparc.component.widget.NodesTree", {
184
187
} , this ) ;
185
188
item . addListener ( "tap" , e => {
186
189
this . fireDataEvent ( "changeSelectedNode" , item . getModel ( ) . getNodeId ( ) ) ;
190
+ this . __exportButton . setEnabled ( item . getLevel ( ) && item . getModel ( ) . getIsContainer ( ) ) ;
187
191
} , this ) ;
188
192
}
189
193
} ) ;
You can’t perform that action at this time.
0 commit comments