@@ -68,7 +68,7 @@ qx.Class.define("osparc.form.tag.TagItem", {
6868 check : "String" ,
6969 init : "display" ,
7070 nullable : false ,
71- apply : "_applyMode "
71+ apply : "__applyMode "
7272 } ,
7373
7474 appearance : {
@@ -101,6 +101,20 @@ qx.Class.define("osparc.form.tag.TagItem", {
101101 } ) ;
102102 this . bind ( "description" , control , "value" ) ;
103103 break ;
104+ case "shared-icon" :
105+ control = new qx . ui . basic . Image ( ) . set ( {
106+ minWidth : 30 ,
107+ alignY : "middle"
108+ } ) ;
109+ this . addListener ( "changeAccessRights" , e => {
110+ const accessRights = e . getData ( ) ;
111+ console . log ( accessRights ) ;
112+ if ( accessRights ) {
113+ osparc . dashboard . CardBase . populateShareIcon ( control , accessRights ) ;
114+ }
115+ } , this ) ;
116+ control . addListener ( "tap" , e => this . __openAccessRights ( ) , this ) ;
117+ break ;
104118 case "name-input" :
105119 control = new qx . ui . form . TextField ( ) . set ( {
106120 required : true
@@ -186,10 +200,15 @@ qx.Class.define("osparc.form.tag.TagItem", {
186200 this . _add ( this . getChildControl ( "description" ) , {
187201 flex : 1
188202 } ) ;
203+ this . _add ( this . getChildControl ( "shared-icon" ) ) ;
189204 this . _add ( this . __tagItemButtons ( ) ) ;
190205 this . resetBackgroundColor ( ) ;
191206 } ,
192207
208+ __openAccessRights : function ( ) {
209+
210+ } ,
211+
193212 /**
194213 * Generates and returns the buttons for deleting and editing an existing label (display mode)
195214 */
@@ -296,7 +315,7 @@ qx.Class.define("osparc.form.tag.TagItem", {
296315 color : color
297316 } ;
298317 } ,
299- _applyMode : function ( ) {
318+ __applyMode : function ( ) {
300319 this . __renderLayout ( ) ;
301320 }
302321 }
0 commit comments