Skip to content

Commit

Permalink
SAK-33798: Version all JS/CSS loaded from JSF tools (sakaiproject#5169)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanarcadio authored and ern committed Dec 28, 2017
1 parent 70a90f8 commit 824923f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions jsf/jsf-widgets/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
</description>

<dependencies>
<dependency>
<groupId>org.sakaiproject.portal</groupId>
<artifactId>sakai-portal-util</artifactId>
</dependency>
<dependency>
<groupId>org.sakaiproject.kernel</groupId>
<artifactId>sakai-kernel-util</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import javax.faces.render.Renderer;

import org.sakaiproject.jsf.util.RendererUtil;
import org.sakaiproject.portal.util.PortalUtils;

/**
* <p>Description: </p>
Expand Down Expand Up @@ -113,7 +114,7 @@ public void encodeEnd(FacesContext context, UIComponent component)
}


writer.write("<script src=\"" + contextPath + path + "\" type=\"" + type + "\">");
writer.write("<script src=\"" + contextPath + path + PortalUtils.getCDNQuery() + "\" type=\"" + type + "\">");
// ie requires
writer.write("</script>");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import javax.faces.render.Renderer;

import org.sakaiproject.jsf.util.RendererUtil;
import org.sakaiproject.portal.util.PortalUtils;

/**
* <p>Description: </p>
Expand Down Expand Up @@ -101,6 +102,7 @@ public void encodeEnd(FacesContext context, UIComponent component)

writer.write(contextPath);
writer.write( (String) RendererUtil.getAttribute(context, component, "path"));
writer.write(PortalUtils.getCDNQuery());
writer.write("\"/>");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.render.Renderer;
import org.sakaiproject.portal.util.PortalUtils;

/**
* <p>Description: </p>
Expand Down Expand Up @@ -101,7 +102,7 @@ public void encodeEnd(FacesContext context, UIComponent component)
ResponseWriter writer = context.getResponseWriter();
String contextPath = context.getExternalContext()
.getRequestContextPath();
writer.write("<script src=\"" + contextPath + path + "\" type=\"" + type + "\">");
writer.write("<script src=\"" + contextPath + path + PortalUtils.getCDNQuery() + "\" type=\"" + type + "\">");
// ie requires
writer.write("</script>");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.render.Renderer;
import org.sakaiproject.portal.util.PortalUtils;

/**
* <p>Description: </p>
Expand Down Expand Up @@ -95,6 +96,7 @@ public void encodeEnd(FacesContext context, UIComponent component)

writer.write(contextPath);
writer.write( (String) component.getAttributes().get("path"));
writer.write(PortalUtils.getCDNQuery());
writer.write("\"/>");
}

Expand Down

0 comments on commit 824923f

Please sign in to comment.