@@ -57,6 +57,12 @@ qx.Class.define("osparc.form.tag.TagItem", {
5757 init : "#303030"
5858 } ,
5959
60+ myAccessRights : {
61+ check : "Object" ,
62+ nullable : false ,
63+ event : "changeMyAccessRights" ,
64+ } ,
65+
6066 accessRights : {
6167 check : "Object" ,
6268 nullable : false ,
@@ -104,16 +110,18 @@ qx.Class.define("osparc.form.tag.TagItem", {
104110 case "shared-icon" :
105111 control = new qx . ui . basic . Image ( ) . set ( {
106112 minWidth : 30 ,
107- alignY : "middle"
113+ alignY : "middle" ,
114+ cursor : "pointer" ,
108115 } ) ;
109116 this . addListener ( "changeAccessRights" , e => {
110117 const accessRights = e . getData ( ) ;
111- console . log ( accessRights ) ;
118+ console . log ( "changeAccessRights" , accessRights ) ;
112119 if ( accessRights ) {
113120 osparc . dashboard . CardBase . populateShareIcon ( control , accessRights ) ;
114121 }
115122 } , this ) ;
116- control . addListener ( "tap" , e => this . __openAccessRights ( ) , this ) ;
123+ osparc . dashboard . CardBase . populateShareIcon ( control , this . getAccessRights ( ) )
124+ control . addListener ( "tap" , ( ) => this . __openAccessRights ( ) , this ) ;
117125 break ;
118126 case "name-input" :
119127 control = new qx . ui . form . TextField ( ) . set ( {
@@ -155,6 +163,7 @@ qx.Class.define("osparc.form.tag.TagItem", {
155163 tag . bind ( "name" , this , "name" ) ;
156164 tag . bind ( "description" , this , "description" ) ;
157165 tag . bind ( "color" , this , "color" ) ;
166+ tag . bind ( "myAccessRights" , this , "myAccessRights" ) ;
158167 tag . bind ( "accessRights" , this , "accessRights" ) ;
159168 } ,
160169
@@ -215,8 +224,8 @@ qx.Class.define("osparc.form.tag.TagItem", {
215224 * Generates and returns the buttons for deleting and editing an existing label (display mode)
216225 */
217226 __tagItemButtons : function ( ) {
218- const canIWrite = osparc . data . model . Tag . canIWrite ( this . getAccessRights ( ) ) ;
219- const canIDelete = osparc . data . model . Tag . canIDelete ( this . getAccessRights ( ) ) ;
227+ const canIWrite = osparc . share . CollaboratorsTag . canIWrite ( this . getMyAccessRights ( ) ) ;
228+ const canIDelete = osparc . share . CollaboratorsTag . canIDelete ( this . getMyAccessRights ( ) ) ;
220229
221230 const buttonContainer = new qx . ui . container . Composite ( new qx . ui . layout . HBox ( ) ) ;
222231 const editButton = new qx . ui . form . Button ( ) . set ( {
0 commit comments