@@ -109,10 +109,8 @@ qx.Class.define("osparc.form.tag.TagItem", {
109109 control = new qx . ui . basic . Image ( ) . set ( {
110110 minWidth : 30 ,
111111 alignY : "middle" ,
112- cursor : "pointer" ,
113112 } ) ;
114- osparc . dashboard . CardBase . populateShareIcon ( control , this . getAccessRights ( ) )
115- control . addListener ( "tap" , ( ) => this . __openAccessRights ( ) , this ) ;
113+ osparc . dashboard . CardBase . populateShareIcon ( control , this . getAccessRights ( ) ) ;
116114 break ;
117115 case "name-input" :
118116 control = new qx . ui . form . TextField ( ) . set ( {
@@ -202,7 +200,6 @@ qx.Class.define("osparc.form.tag.TagItem", {
202200 this . _add ( this . getChildControl ( "description" ) , {
203201 flex : 1
204202 } ) ;
205- this . _add ( this . getChildControl ( "shared-icon" ) ) ;
206203 this . _add ( this . __tagItemButtons ( ) ) ;
207204 this . resetBackgroundColor ( ) ;
208205 } ,
@@ -228,28 +225,40 @@ qx.Class.define("osparc.form.tag.TagItem", {
228225 const canIWrite = osparc . share . CollaboratorsTag . canIWrite ( this . getMyAccessRights ( ) ) ;
229226 const canIDelete = osparc . share . CollaboratorsTag . canIDelete ( this . getMyAccessRights ( ) ) ;
230227
231- const buttonContainer = new qx . ui . container . Composite ( new qx . ui . layout . HBox ( ) ) ;
228+ const buttonContainer = new qx . ui . container . Composite ( new qx . ui . layout . HBox ( 5 ) ) ;
229+
230+ const sharedIcon = this . getChildControl ( "shared-icon" ) ;
231+ sharedIcon . set ( {
232+ cursor : canIWrite ? "pointer" : null ,
233+ } ) ;
234+ if ( canIWrite ) {
235+ sharedIcon . addListener ( "tap" , ( ) => this . __openAccessRights ( ) , this ) ;
236+ }
237+ buttonContainer . add ( sharedIcon ) ;
238+
232239 const editButton = new qx . ui . form . Button ( ) . set ( {
233240 icon : "@FontAwesome5Solid/pencil-alt/12" ,
234241 toolTipText : this . tr ( "Edit" ) ,
235242 enabled : canIWrite ,
236243 } ) ;
244+ buttonContainer . add ( editButton ) ;
245+ editButton . addListener ( "execute" , ( ) => this . setMode ( this . self ( ) . modes . EDIT ) , this ) ;
246+
237247 const deleteButton = new osparc . ui . form . FetchButton ( ) . set ( {
238248 appearance : "danger-button" ,
239249 icon : "@FontAwesome5Solid/trash/12" ,
240250 toolTipText : this . tr ( "Delete" ) ,
241251 enabled : canIDelete ,
242252 } ) ;
243- buttonContainer . add ( editButton ) ;
244253 buttonContainer . add ( deleteButton ) ;
245- editButton . addListener ( "execute" , ( ) => this . setMode ( this . self ( ) . modes . EDIT ) , this ) ;
246254 deleteButton . addListener ( "execute" , ( ) => {
247255 deleteButton . setFetching ( true ) ;
248256 osparc . store . Tags . getInstance ( ) . deleteTag ( this . getId ( ) )
249257 . then ( ( ) => this . fireEvent ( "deleteTag" ) )
250258 . catch ( console . error )
251259 . finally ( ( ) => deleteButton . setFetching ( false ) ) ;
252260 } , this ) ;
261+
253262 return buttonContainer ;
254263 } ,
255264 /**
0 commit comments