Adding custom tabs to business cards
To add a custom tab to the business card, follow these steps:
- Extract the jar file com.mainsoft.team.social.web_1.0.0.XXX.jar, found in the plugins folder of the update site.
- Open the file resources\ui\internal\templates\ProfileBusinessCard.html for editing.
- Delete the following lines:
<!--REMOVE THIS REMARK TO ADD A CUSTOM TAB. THIS DIV CONTAINS A SCRIPT TO POPULATE IT. (line 3).
END OF CUSTOM TAB REMARK --> (line 161). - Repack the jar file com.mainsoft.team.social.web_1.0.0.XXX.jar, and redeploy it.
The script between lines 3 and 161 in resources\ui\internal\templates\ProfileBusinessCard.html contains the logic for the custom tab and can be edited:
- Write your own script in the function createCustomData(rootDomNode, profile) (line 140).
- Make sure you do not delete the following lines:
var messages = this.NLS; (line 5)
createCustomData(this._custom, this.profile); (line 159) - The file also includes html elements that show Skype, LinkedIn and Twitter data in the custom tab. To view this data, delete the comments on lines 342 and 344. The default settings contain a sample user name, and should be changed to your user’s settings.
