Theme with custom JavaScript
We created a theme with custom CSS, HTML, and JavaScript code for the login page following wiki guidance. Our custom CSS and HTML code are working as expected but JavaScript code is not... According to https://jazz.net/help-dev/clm/topic/com.ibm.jazz.repository.web.admin.doc/topics/c_configuring_themes.html
Note: If customizing the login page by using JavaScript does not work, use HTML instead.
4 answers
Please note that we have a big customer that managed to make RTC Web UI pretty much unusable for thier users introducing JavaScript in a theme. They created a huge message and memory load on their system impacting the server and the clients. Their browsers crashed with memory usage and timeouts waiting for messages.
Be careful what you are doing!
Create a JavaScript file named LoginWidget.js
Comments
Create a JavaScript file named LoginWidget.js
dojo.provide("jazz.theme.LoginFooterWidget");
According to your script files from https://jazz.net/jazz02/web/projects/Rational%20Quality%20Manager#action=com.ibm.team.workitem.viewWorkItem&id=142241&tab=com.ibm.team.workitem.tab.links, jazz.theme.LoginFooterWidget should to be the right themable node.
Please note that we have a big customer that managed to make RTC Web UI pretty much unusable for thier users introducing JavaScript in a theme.
Be careful what you are doing!
Thank you Ralph for pointing that out, we appreciated.
Comments
Keep in mind that the Login Footer Theme isnot shown on all Login Screens (see Defect)
That should not be a problem then, I just thought I would use the opportunity highlight that JavaScript can be dangerous.
It depends on which extension point you use for theming. The login theme will only appear on the standard login screen and nowhere else.The header theme altough appears on every page and could then cause sirious issues like the one pointed out by Ralph. Be reminded that your login theme will not work on the overlay login screen (when your session expires) as long as the above linked defect doesnt get fixed.
Little steps ahead, thanks to Lukas's example code:
- "jazz.theme.LoginFooterWidget" is the right themable node, not "jazz.theme.LoginFooter" as reported in https://jazz.net/wiki/bin/view/Main/WebUITheming#Custom_JavaScript. Please update the wiki!
- custom JavaScript code for themable node "jazz.theme.LoginFooterWidget" is executed only once you click the "Log in" button and not when the login page is loaded.