@@ -161,6 +161,7 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {
161161 __addItems : function ( ) {
162162 this . __addUIConfigItems ( ) ;
163163 if ( osparc . store . StaticInfo . getInstance ( ) . isDevFeaturesEnabled ( ) ) {
164+ this . __addHypertools ( ) ;
164165 this . __addOtherTabsAccess ( ) ;
165166 }
166167 this . getChildControl ( "new-folder" ) ;
@@ -187,6 +188,26 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {
187188 }
188189 } ,
189190
191+ __addHypertools : function ( ) {
192+ const hypertools = osparc . store . Templates . getInstance ( ) . getTemplatesByType ( osparc . data . model . StudyUI . HYPERTOOL_TYPE ) ;
193+ if ( hypertools . length ) {
194+ const moreMenuButton = this . self ( ) . createMenuButton ( "@FontAwesome5Solid/star/16" , this . tr ( "Hypertools" ) ) ;
195+ this . addAt ( moreMenuButton , this . __itemIdx ) ;
196+ this . __itemIdx ++ ;
197+
198+ const moreMenu = new qx . ui . menu . Menu ( ) . set ( {
199+ appearance : "menu-wider" ,
200+ } ) ;
201+ hypertools . forEach ( templateData => {
202+ const hypertoolButton = this . self ( ) . createMenuButton ( templateData [ "icon" ] , templateData [ "name" ] ) ;
203+ hypertoolButton . addListener ( "execute" , ( ) => {
204+ console . log ( templateData ) ;
205+ } , this ) ;
206+ moreMenu . add ( hypertoolButton ) ;
207+ } ) ;
208+ }
209+ } ,
210+
190211 __addOtherTabsAccess : function ( ) {
191212 const moreMenuButton = this . self ( ) . createMenuButton ( "@FontAwesome5Solid/star/16" , this . tr ( "More" ) ) ;
192213 this . addAt ( moreMenuButton , this . __itemIdx ) ;
@@ -201,13 +222,6 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {
201222 const templatesButton = this . self ( ) . createMenuButton ( "@FontAwesome5Solid/copy/16" , this . tr ( "Tutorials..." ) ) ;
202223 templatesButton . addListener ( "execute" , ( ) => this . fireDataEvent ( "changeTab" , "templatesTab" ) , this ) ;
203224 moreMenu . add ( templatesButton ) ;
204-
205- const hypertoolsButton = this . self ( ) . createMenuButton ( "@FontAwesome5Solid/copy/16" , this . tr ( "Hypertools..." ) ) ;
206- hypertoolsButton . addListener ( "execute" , ( ) => this . fireDataEvent ( "changeTab" , "hypertoolsTab" ) , this ) ;
207- const hypertools = osparc . store . Templates . getInstance ( ) . getTemplatesByType ( osparc . data . model . StudyUI . HYPERTOOL_TYPE ) ;
208- if ( hypertools . length ) {
209- moreMenu . add ( hypertoolsButton ) ;
210- }
211225 }
212226
213227 if ( permissions . canDo ( "dashboard.services.read" ) ) {
@@ -289,12 +303,12 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {
289303 return ;
290304 }
291305
292- const menuButton = this . __emptyPipelineButton = this . self ( ) . createMenuButton ( null , buttonConfig [ "title" ] || "Empty Pipeline" ) ;
306+ const menuButton = this . __emptyPipelineButton = this . self ( ) . createMenuButton ( null , buttonConfig [ "title" ] || "Pipeline" ) ;
293307 osparc . utils . Utils . setIdToWidget ( menuButton , buttonConfig [ "idToWidget" ] || "emptyStudyBtn" ) ;
294308
295309 menuButton . addListener ( "tap" , ( ) => {
296310 this . fireDataEvent ( "newEmptyStudyClicked" , {
297- newStudyLabel : buttonConfig [ "newStudyLabel" ] || "Empty Pipeline" ,
311+ newStudyLabel : buttonConfig [ "newStudyLabel" ] || "Pipeline" ,
298312 } ) ;
299313 } ) ;
300314
0 commit comments