Implement StylesheetList and ScriptList view objects and new strategy for templates to direct stylesheets and script files to be loaded onto a page.

This commit is contained in:
rjy7 2010-05-21 15:55:26 +00:00
parent b9dfa9023b
commit bda278e59b
13 changed files with 138 additions and 56 deletions

View file

@ -11,4 +11,3 @@
<#if acknowledgeText??>
<div class="pageGroupBody" id="acknowledgementText">${acknowledgeText}</div>
</#if>

View file

@ -10,7 +10,8 @@
<h2>${classGroup.publicName}</h2>
<ul>
<#list classGroup.classes as class>
<li><a href="${class.url}">${class.name}</a> (${class.entityCount})</li>
<li><a href="${class.url}">${class.name}</a> (${class.individualCount})</li>
</#list>
</ul>
</#list>

View file

@ -27,7 +27,7 @@
</p>
</#if>
<form name="contact_form" action="submitFeedback" method="post" onsubmit="return ValidateForm('contact_form');">
<form name="contact_form" id="contact_form" action="submitFeedback" method="post" onsubmit="return ValidateForm('contact_form');">
<input type="hidden" name="home" value="${portalId}"/>
<input type="hidden" name="RequiredFields" value="webusername,webuseremail,s34gfd88p9x1"/>
<input type="hidden" name="RequiredFieldsNames" value="Name,Email address,Comments"/>
@ -41,11 +41,11 @@
<p><input style="width:25%;" type="text" name="webuseremail" maxlength="255"/></p>
<label>Your comments, questions, or suggestions</label>
<label>Comments, questions, or suggestions</label>
<textarea name="s34gfd88p9x1" rows="10" cols="90"></textarea>
<div>
<div class="buttons">
<input type="submit" value="Send Mail" class="yellowbutton"/>
<input type="reset" value="Clear Form" class="plainbutton"/>
</div
@ -55,5 +55,6 @@
</div>
<#-- RY This is temporary. -->
<script src="${contextPath}/js/commentForm.js"></script>
<#-- RY This is temporary.
<script src="${contextPath}/js/commentForm.js"></script>-->
${scripts.add("/js/commentForm.js")}

View file

@ -1,5 +1,6 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
${scripts.tags}
<#include "googleAnalytics.ftl">
<#-- OTHER SCRIPT TAGS HERE -->

View file

@ -1,10 +1,6 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<link rel="stylesheet" type="text/css" href="${stylesheetDir}screen.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="${stylesheetDir}print.css" media="print"/>
<link rel="stylesheet" type="text/css" href="${stylesheetDir}/screen.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="${stylesheetDir}/print.css" media="print"/>
<#if stylesheeets??>
<#list stylesheets as stylesheet>
${stylesheet}
</#list>
</#if>
${stylesheets.tags}

View file

@ -36,3 +36,10 @@
<#include "/components/scripts.ftl">
</body>
</html>
<#-- How to add a stylesheet:
${stylesheets.addFromTheme("/sample.css");
${stylesheets.add("/themes/vivo-basic/css/sample.css"}
NOT (gets contextPath added twice):
${stylesheets.add(stylesheetDir + "/sample.css")}
-->