[gatein-issues] [JBoss JIRA] (GTNPORTAL-2297) GTN Bug: eXo Javascript is conflicting with some JQuery extensions

Vu Viet Phuong (Assigned) (JIRA) jira-events at lists.jboss.org
Tue Nov 29 22:29:40 EST 2011


     [ https://issues.jboss.org/browse/GTNPORTAL-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vu Viet Phuong reassigned GTNPORTAL-2297:
-----------------------------------------

    Assignee: Vu Viet Phuong

    
> GTN Bug: eXo Javascript is conflicting with some JQuery extensions
> ------------------------------------------------------------------
>
>                 Key: GTNPORTAL-2297
>                 URL: https://issues.jboss.org/browse/GTNPORTAL-2297
>             Project: GateIn Portal
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>            Reporter: kien nguyen
>            Assignee: Vu Viet Phuong
>            Priority: Minor
>              Labels: portal-s65
>             Fix For: 3.2.0-CR01
>
>
> We test a Portlet that uses:
> Jquery 1.5
> Ligbox library http://www.balupton/projects/jquery-lightbox
> We use the Portlet API to add the CSS and JS files to the HTML header
> {code}
> protected void doHeaders(RenderRequest request, RenderResponse response)
>   {
>     super.doHeaders(request, response);
>     
>     Element cssFile = response.createElement("link");
>     cssFile.setAttribute("type", "text/css");
>     cssFile.setAttribute("href", request.getContextPath() + "/css/jquery/ui/smoothness/jquery-ui-1.8.9.custom.css");
>     cssFile.setAttribute("rel", "stylesheet");
>     response.addProperty("javax.portlet.markup.head.element", cssFile);
>   
>     Element cssFile = response.createElement("link");
>     cssFile.setAttribute("type", "text/css");
>     cssFile.setAttribute("href", request.getContextPath() + "/css/jquery/balupton-lightbox/jquery.lightbox.min.css");
>     cssFile.setAttribute("rel", "stylesheet");
>     response.addProperty("javax.portlet.markup.head.element", cssFile);
>     
>   }
> {code}
> When droping the portlet on a Platform Page or a GateIn page the Jquery effect is not working as expected : Nothing Happened
> One of our Javascript is disturbing JQuery and the extension
> The Work around is the following:
> Modified the portal template "UIPortalApplication.gtmpl"
> You can either:
> = Move the "var currentContext = '<%=docBase%>' ;: line before the eXo.env.portal.context = "<%=docBase%>" ;
> one (do not forget to remove the script tags)
> = OR Move the
> <%
> def headerElements = rcontext.getExtraMarkupHeadersAsStrings();
> if (headerElements != null)
> {
> for (element in headerElements)
> { %> <%=element%> <% }
> }
> %>
> code before the eXo JS declarations
> Note:
> We need to cleanup our JS code to have less code, documented and sore in JS file not in the HTML code!*
> I have attached the sampe portlet
> (please refresh the page after droping the portlet on the page, since we have another bug related to adding portlet and do header - will create this bug later)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the gatein-issues mailing list