File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -232,7 +232,6 @@ qx.Class.define("osparc.study.StudyOptions", {
232232 center : true ,
233233 enabled : false ,
234234 } ) ;
235- osparc . utils . Utils . setIdToWidget ( control , "openWithResources" ) ;
236235 this . getChildControl ( "buttons-layout" ) . addAt ( control , 1 ) ;
237236 break ;
238237 }
@@ -284,7 +283,13 @@ qx.Class.define("osparc.study.StudyOptions", {
284283 __evaluateOpenButton : function ( ) {
285284 const hasTitle = Boolean ( this . getChildControl ( "title-field" ) . getValue ( ) ) ;
286285 const walletSelected = Boolean ( this . getChildControl ( "wallet-selector" ) . getSelection ( ) . length ) ;
287- this . getChildControl ( "open-button" ) . setEnabled ( hasTitle && walletSelected ) ;
286+ const openButton = this . getChildControl ( "open-button" ) ;
287+ openButton . setEnabled ( hasTitle && walletSelected ) ;
288+ if ( hasTitle && walletSelected ) {
289+ osparc . utils . Utils . setIdToWidget ( openButton , "openWithResources" ) ;
290+ } else {
291+ osparc . utils . Utils . removeIdAttribute ( openButton ) ;
292+ }
288293 } ,
289294
290295 __buildLayout : function ( ) {
Original file line number Diff line number Diff line change @@ -1034,6 +1034,13 @@ qx.Class.define("osparc.utils.Utils", {
10341034 return null ;
10351035 } ,
10361036
1037+ removeIdAttribute : qWidget => {
1038+ if ( qWidget . getContentElement && qWidget . getContentElement ( ) ) {
1039+ return qWidget . getContentElement ( ) . removeAttribute ( "osparc-test-id" ) ;
1040+ }
1041+ return null ;
1042+ } ,
1043+
10371044 setKeyToWidget : ( qWidget , id ) => {
10381045 if ( qWidget . getContentElement && qWidget . getContentElement ( ) ) {
10391046 qWidget . getContentElement ( ) . setAttribute ( "osparc-test-key" , id ) ;
You can’t perform that action at this time.
0 commit comments