@@ -77,6 +77,7 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {
7777 } ) ;
7878
7979 this . __categoryHeaders = [ ] ;
80+ this . __itemIdx = 0 ;
8081
8182 this . __addItems ( ) ;
8283 } ,
@@ -137,11 +138,13 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {
137138
138139 members : {
139140 __categoryHeaders : null ,
141+ __itemIdx : null ,
140142
141143 _createChildControlImpl : function ( id ) {
142144 let control ;
143145 switch ( id ) {
144146 case "new-folder" :
147+ this . addSeparator ( ) ;
145148 control = this . self ( ) . createMenuButton (
146149 osparc . dashboard . CardBase . NEW_ICON + "16" ,
147150 this . tr ( "New Folder" ) ,
@@ -155,9 +158,9 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {
155158 } ,
156159
157160 __addItems : async function ( ) {
158- this . getChildControl ( "new-folder" ) ;
159- this . addSeparator ( ) ;
160161 await this . __addNewStudyItems ( ) ;
162+ this . __addMoreMenu ( ) ;
163+ this . getChildControl ( "new-folder" ) ;
161164 } ,
162165
163166 __addNewStudyItems : async function ( ) {
@@ -183,6 +186,26 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {
183186 }
184187 } ,
185188
189+ __addMoreMenu : function ( ) {
190+ const moreMenuButton = this . self ( ) . createMenuButton ( "@FontAwesome5Solid/star/14" , this . tr ( "More" ) ) ;
191+ this . addAt ( moreMenuButton , this . __itemIdx ) ;
192+ this . __itemIdx ++ ;
193+
194+ const moreMenu = new qx . ui . menu . Menu ( ) . set ( {
195+ appearance : "menu-wider" ,
196+ } ) ;
197+
198+ const templatesButton = new qx . ui . menu . Button ( this . tr ( "Tutorials..." ) , "@FontAwesome5Solid/copy/14" ) ;
199+ templatesButton . addListener ( "execute" , ( ) => this . fireDataEvent ( "moveFolderToRequested" , this . getFolderId ( ) ) , this ) ;
200+ moreMenu . add ( templatesButton ) ;
201+
202+ const servicesButton = new qx . ui . menu . Button ( this . tr ( "Services..." ) , "@FontAwesome5Solid/cog/14" ) ;
203+ servicesButton . addListener ( "execute" , ( ) => this . fireDataEvent ( "moveFolderToRequested" , this . getFolderId ( ) ) , this ) ;
204+ moreMenu . add ( servicesButton ) ;
205+
206+ moreMenuButton . setMenu ( moreMenu ) ;
207+ } ,
208+
186209 __getLastIdxFromCategory : function ( categoryId ) {
187210 for ( let i = this . getChildren ( ) . length - 1 ; i >= 0 ; i -- ) {
188211 const child = this . getChildren ( ) [ i ] ;
@@ -237,7 +260,8 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {
237260 menuButton [ "categoryId" ] = category ;
238261 this . addAt ( menuButton , idx + 1 ) ;
239262 } else {
240- this . add ( menuButton ) ;
263+ this . addAt ( menuButton , this . __itemIdx ) ;
264+ this . __itemIdx ++ ;
241265 }
242266 } ,
243267
0 commit comments