[ 
https://jira.nuxeo.org/browse/NXP-5773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=83525#action_83525
 ] 

Jean-Marc Orliaguet commented on NXP-5773:
------------------------------------------

the solution is to modify the .css files in jscalendar to make them use 
absolute paths (starting with a /), 

unless a base path reference is declared when jscal2.css is registered, there 
is no way to guess that the images are located in .../jscalendar/css/img 

for instance jscalendar/css/jscal2.css contains:

.DynarchCalendar-prevYear div {
  background-image: url("img/nav-left-x2.gif");
}

which is a relative path.

in the theme editor's .css files I use ${basePath}: and absolute paths

#nxthemesHeader {
  background: #444 url(${basePath}/skin/nxthemes-editor/img/header-bg.png) top 
left
}

if modifying the vendors .css files is not an option, it might be possible to 
do a regex replace on 'url(...'  to add a prefix on paths that do not start 
with a slash (/) but that could also be unreliable.

in any case that is a better fix than the xhtml include


> Fix images retrieval when referenced in a css file managed by theme resources
> -----------------------------------------------------------------------------
>
>                 Key: NXP-5773
>                 URL: https://jira.nuxeo.org/browse/NXP-5773
>             Project: Nuxeo Enterprise Platform
>          Issue Type: Bug
>    Affects Versions: 5.3.2
>            Reporter: Anahide Tchertchian
>            Assignee: Jean-Marc Orliaguet
>             Fix For: 5.4
>
>
> When declaring jscalendar resources in the theme, some images are not found 
> and errors occur in the theme, for instance:
> [Resources] Invalid resource path: /img/nav-left-x2.gif
> Steps to reproduce: remove declarations in includes.xhtml and re-enable the 
> resources declaration in theme, as commited in changeset 
> http://hg.nuxeo.org/nuxeo/nuxeo-dm/rev/7a9c42de80c0 and then display the 
> javascript calendar, for instance in a workspace edit page.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to