Disable click of communication panel module

Dear Community,

 

We have added a new icon to the communication panel. We would like to disable click for users and also add a tool tip to display the hints to the user when they hover over the icon. Any help here will be great!

Thanks in advance!

Like 0

Like

5 comments

Hello Shivani,

 

There are three different ways to add a hint depending on your control type. Try which one will work for you:

 

"tip": {

"content": {

"bindTo": "Resources.Strings.CustomerBillingInfoTip"

}

},

-----------------------

"hint": {

"bindTo": "Resources.Strings.GlbUseInternetTip"

},

--------------------

"controlConfig": {

"tips": [

{

"tip": {

"content": {"bindTo": "Resources.Strings.GlbUseInternetTip"}

},

"settings": {

"displayEvent": this.Terrasoft.controls.TipEnums.displayEvent.CLICK

}

}

]

}

 

To disable "click" behavior you can override a "click" method, like so: 

"click": {"bindTo": "onExampleButtonClick"}

 

Best regards,

Bogdan S.

Thank you Bogdan! The tool tip works. However, to disable the click (prevent opening communication panel module), I returned empty function in onExampleButtonClick(). This is opening up a blank side panel. Is there a way we can disable clicking itself? If I dont give return empty function, there are errors in the console.

Shivani Lakshman,

 

If you don't want users to click it you can simply hide this action using the "visible" parameter in the diff of the module. Like on the example below:

{
				"operation": "insert",
				"index": 10,
				"parentName": "communicationPanelContent",
				"propertyName": "items",
				"name": "testCTIModule",
				"values": {
					"tag": "testCTIModule",
					"visible": {"bindTo": "testCTIModuleVisible"},
					"imageConfig": {"bindTo": "testCTIModuleImageConfig"},
					"caption": {"bindTo": "testCTIModuleCaption"},
					"generator": "CommunicationPanelHelper.generateMenuItem"
				}
			}

You can return false in the testCTIModuleVisible attribute and hide the action or create a function that will hide it for some users.

 

Or you can override the onMenuItemClick function and if the selectedItemTag variable is your custom CTI panel action then return false in this function.

 

Best regards,

Oscar 

Oscar Dylan,

Thanks Oscar. The purpose of this icon is to just notify the users of a particular event which happens when we get a notification through API. Since the communication panel is visible throughout the platform, irrespective of the section the user is currently at, we have added this icon as a notification. Therefore we need it to be visible when the said event occurs but prohibit users from clicking it. Is that possible?

Shivani Lakshman,

 

Then you need to perform the modification of onMenuItemClick function as I mentioned in the previous post. Please debug its logic and add your own CTI panel element to the function logic modification.

 

Best regards,

Oscar

Show all comments