It's all about the answers!

Ask a question

How to refer images on custom themes


0
1
SEC Servizi (97123860) | asked Apr 10 '17, 9:33 a.m.
edited Apr 10 '17, 10:09 a.m.

 According to:

we could modify the look and feel of the Web UI uploading a theme via /jazz/admin?internal#action=com.ibm.team.repository.admin.configureTheming.
So, we created our theme .zip file containing:
  • css/login.css
  • images/logo.png
and filled the CSS file as:
.jazz-app-LoginWidget .illustration {
    background-image: url("/jazz/_theming/resource/images/logo.png");
}
We see our custom CSS theme is loaded but image URL is not...!
It seems other devs had got this issue: https://jazz.net/forum/questions/156217/cannot-get-images-to-work-in-custom-ui-theme/156220. However, we are already using absolute path on our URL.
Any advice?
Thanks in advance.

Accepted answer


permanent link
SEC Servizi (97123860) | answered Apr 13 '17, 8:43 a.m.
edited Apr 13 '17, 8:46 a.m.

Finally it works! :D

We notice network response for '/jazz/_theming/resource/images/logo.png' reports type 'text/plain' instead of 'png', as in case of the default Jazz image (i.e., '/jazz/sprite/jazz-app-LoginWidget?etag=GIlq8YTKp').
The problem was the Preview function, which we were using, because it returns an empty document for images request instead of the actual image. Maybe a bug?

So, now we can confirm that:
  • relative image path works.
  • uploading theme on Jazz application only works even for login page.
  • you need a Ctrl + F5 hit after theme activation due to browser cache.
Cheers.

Ralph Schoon selected this answer as the correct answer

Comments
SEC Servizi commented Apr 14 '17, 5:51 a.m. | edited Apr 14 '17, 5:51 a.m.
Maybe a bug?

Defect 417360


1
Mohammed Alawneh commented Jun 09 '21, 9:26 a.m. | edited Jun 09 '21, 2:19 p.m.

 @SEC Servizi  you saved my day, i spent 3 hours trying to preview the theme, activate works for me.

2 other answers



permanent link
Donald Nong (14.5k614) | answered Apr 13 '17, 6:56 a.m.

Are you trying to replace the background image of the login page? If true, make sure you're making the theming in JTS as the login page comes from it. Also, in my CLM 6.0.3 iFix003 environment, relative path for an image works perfectly. The CSS file that I use has the below content.

.jazz-app-LoginWidget .illustration {
    background-image: url("resource/images/logo.png");
}

And here is the result.


permanent link
SEC Servizi (97123860) | answered Apr 13 '17, 8:07 a.m.
edited Apr 13 '17, 8:08 a.m.
Are you trying to replace the background image of the login page?

Yep (apologize, it wasn't clear on our post).

make sure you're making the theming in JTS as the login page comes from it.
Uhm, are you sure on that? Because we never see network requests for /jts/ context root on login.
Anyway, we tried uploading our custom theme on both Jazz and JTS applications, but images did not show up in any case. :(
Also, in my CLM 6.0.3 iFix003 environment, relative path for an image works perfectly.
In fact, even on RTC v4.0.7 relative path seems to be correctly resolved if we see at the network request and response.

We notice network response for '/jazz/_theming/resource/images/logo.png' reports type 'text/plain' instead of 'png', as in case of the default Jazz image (i.e., '/jazz/sprite/jazz-app-LoginWidget?etag=GIlq8YTKp').
Any advice?
Thanks in advance.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.