Page tree

Contents        

Overview

It is possible to customize the look of the chat widget (both the icon and the chat itself) by modifying the CSS rules for classes used for chat HTML elements. 

The methods to do it are different for chats placed on the customer portal and on the external web sites. In both cases, it is necessary to have a knowledge of CSS and to have some HTML inspection tools available (the ones built into browsers, like Chrome Developer Tools or Firefox Developer Tools can be used).

When customizing the style, you will often have to use the !important CSS keyword to force your modifications, because the chat uses deeply specific CSS rules, to prevent leaking its styles into parent page's HTML content.

Customer Portal

In the customer portal, it is impossible to directly modify the portal's HTML source code, so when placed there, chat adds two classes to its elements:

  • support-chat-sd-icon-class to the chat icon
  • support-chat-sd-chat-class to the toplevel element of the chat itself

Using the Settings → Chat → Translate and Customize ("Customize Appearance on Service Desk Portal" tab), you can insert CSS rules that you define into the portal pages. This is done in the Icon CSS and Chat CSS input boxes:

For example, to change the color of the chat icon to darkcyan, provide the following in the Icon CSS box:

.support-chat-sd-icon-class{
	background-color: darkcyan !important;
}

This will result in the change in appearance of the chat icon on the customer portal:

External Web Sites

On external web sites, the way to customize appearance of the chat differs - it is based on the snippet of HTML code placing the widget on the web site, paired with CSS rules placed on the page.

For example, to change the icon color to darkcyan, add the following to your web page where you placed the chat widget:

Add iconClass to the chat configuration Javascript:

var spartezSupportChat = {
        url: 'https://jira.spartez.com',
        portal: 2,


		// ######## ADDED ############
        iconClass: 'my-chat-icon-class'
		// ######## END OF ADDED #####
    }

Add CSS rules:

.my-chat-icon-class.support-chat-icon {
	background-color: darkcyan !important;
}



  • No labels

This page has no comments.