NIHVIVO-1304 Rewrote widget framework to support a single template per widget, with multiple macros in each template file.

This commit is contained in:
rjy7 2010-11-15 02:11:08 +00:00
parent 965f4c399b
commit 8a49574f7e
7 changed files with 88 additions and 63 deletions

View file

@ -11,11 +11,11 @@
<li> elements. An <li> element may span multiple lines.
Usage:
<@firstLastList>
<@firstLastList />
<li>apples</li>
<li>bananas</li>
<li>oranges</li>
</@firstLastList>
</@firstLastList />
RY Consider rewriting in Java. Probably designers won't want to modify this. That would allow us to support
nested <li> elements.
@ -47,19 +47,19 @@
indicate how to split the text.
Usage:
<@firstLastListNested>
<@firstLastListNested />
<li>apples</li>,
<li>bananas</li>,
<li>oranges</li>
</@firstLastListNested>
</@firstLastListNested />
<@firstLastListNested delim="??">
<@firstLastListNested delim="??" />
<li>apples, oranges</li>??
<li>bananas, lemons</li>??
<li>grapefruit, limes</li>
</@firstLastListNested>
</@firstLastListNested />
<@firstLastListNested delim="??">
<@firstLastListNested delim="??" />
<li>Books
<ul>
<li>Persuasion</li>
@ -72,7 +72,7 @@
<li>Time</li>
</ul>
</li>
</@firstLastListNested>
</@firstLastListNested />
RY Consider rewriting in Java. Probably designers won't want to modify this.
-->

View file

@ -1,5 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
${stylesheets.add("/css/test.css")}
${scripts.add("/js/testscript.js")}
${headScripts.add("/js/testheadscript.js")}

View file

@ -1,6 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<div class="testWidget">
<h4>This is the test widget.</h4>
<p>I like ${fruit}.</p>
</div>

View file

@ -9,8 +9,16 @@
</#macro>
<#macro markup>
<#import "lib-list.ftl" as l>
<div class="testWidget">
<h4>This is the test widget.</h4>
<h4>This is the test widget using macros.</h4>
<p>I like ${fruit}.</p>
</div>
</#macro>
<#macro altMarkup>
<div class="testWidget">
<h4>This is the alternate version of the test widget.</h4>
<p>I hate ${fruit}.</p>
</div>
</#macro>