You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by rg...@apache.org on 2011/11/16 15:07:43 UTC
svn commit: r1202714 - in /incubator/wookie/trunk/widgets/templates/browse:
index.html template_build.xml
Author: rgardler
Date: Wed Nov 16 14:07:43 2011
New Revision: 1202714
URL: http://svn.apache.org/viewvc?rev=1202714&view=rev
Log:
factor out the various sections of the template so they can be overridden by widgets
Modified:
incubator/wookie/trunk/widgets/templates/browse/index.html
incubator/wookie/trunk/widgets/templates/browse/template_build.xml
Modified: incubator/wookie/trunk/widgets/templates/browse/index.html
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/browse/index.html?rev=1202714&r1=1202713&r2=1202714&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/browse/index.html (original)
+++ incubator/wookie/trunk/widgets/templates/browse/index.html Wed Nov 16 14:07:43 2011
@@ -38,94 +38,27 @@
</head>
<body>
- <div data-role="page" class="type-home" id="home" data-theme="d">
- <div class="header" data-role="header" data-position="fixed">
- <img class="logo" src="images/myExperiment_logo_32h.png"
- alt="MyExperiment" title="MyExperiment Logo" />
- <h1>${widget.name}</h1>
- </div>
- <!-- /header -->
-
- <div data-role="content">
-
- <div id="searchPanel" data-role="collapsible" class="content-secondary" data-theme="c"
- data-content-theme="c">
- <h2>Search</h2>
-
- <form
- action="javascript:${widget.shortname}_browse_controller.submitSearchForm()"
- method="get">
- <div class="ui-grid-a">
- <div class="ui-block-a">
- <div data-role="fieldcontain">
- <label for="searchString">Search:</label> <input type="text"
- name="searchString" id="searchString" value=""
- placeholder="Search terms..." />
- </div>
- </div>
-
- <div class="ui-block-b">
- <div data-role="fieldcontain">
- <label for="sort">Sort:</label>
- <select name="sort" id="sort" data-native-menu="false"> creation time (created), update time (updated), title (title) and name (name)
- <option value="updated">Updated</option>
- <option value="created">Created</option>
- <option value="title">Title</option>
- <option value="name">Name</option>
- </select>
- </div>
- </div>
- </div>
-
- <div data-role="fieldcontain">
- <fieldset data-role="controlgroup" data-type="horizontal">
- <legend>Sort order</legend>
- <input type="radio" name="sortOrder" id="reverseOrder" value="reverse" checked="checked" />
- <label for="reverseOrder">Reverse</label>
-
- <input type="radio" name="sortOrder" id="forwardOrder" value="forward" />
- <label for="forwardOrder">Forward</label>
- </fieldset>
- </div>
-
- <input type="submit" value="Search" />
- </form>
-
- </div>
- <!-- /content-secondary -->
-
- <div class="content-primary" id="content-primary">
- <div id="results" data-role="collapsible-set">
-
- <div class="result" data-role="collapsible" data-collapsed="true">
- <h3>Result 1</h3>
- <p>I'm the collapsible set content for section B.</p>
- </div>
-
- <div class="result" data-role="collapsible">
- <h3>Result 2</h3>
- <p>I'm the collapsible set content for section B.</p>
- </div>
-
- <div class="result" data-role="collapsible">
- <h3>Result 3</h3>
- <p>I'm the collapsible set content for section B.</p>
- </div>
- </div>
- </div>
- <!-- /content-primary -->
- </div>
- <!-- /content -->
-
- <div data-role="footer" class="footer" data-position="fixed">
- <div class="content">© University of Oxford</div>
- <a class="button" href="#help" data-role="button" data-rel="dialog"
- data-transition="pop" data-icon="info" data-iconpos="left">Help</a>
+ <div data-role="page" class="type-home" id="home" data-theme="d">
+ <div class="header" data-role="header" data-position="fixed">
+ ${content.header}
+ </div>
+
+ <div data-role="content">
+ <div class="content-secondary" id="content.secondary">
+ ${content.secondary}
+ </div>
+
+ <div class="content-primary" id="content-primary">
+ ${content.primary}
+ </div>
+
+ </div>
+
+ <div data-role="footer" class="footer" id="footer" data-position="fixed">
+ ${content.footer}
+ </div>
+ </div>
- </div>
- <!-- /footer -->
- </div>
- <!-- /page -->
<div data-role="dialog" id="help">
<div data-role="header">
Modified: incubator/wookie/trunk/widgets/templates/browse/template_build.xml
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/browse/template_build.xml?rev=1202714&r1=1202713&r2=1202714&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/browse/template_build.xml (original)
+++ incubator/wookie/trunk/widgets/templates/browse/template_build.xml Wed Nov 16 14:07:43 2011
@@ -22,6 +22,70 @@
<echo message="| Initialising template properties"/>
<echo message="+------------------------------------------"/>
+ <loadfile property="content.header"
+ srcFile="content_header.html"
+ failonerror="false">
+ <filterchain>
+ <expandproperties/>
+ </filterchain>
+ </loadfile>
+
+ <loadfile property="content.header"
+ srcFile="${template.dir}/${template.name}/content_header.html"
+ failonerror="false">
+ <filterchain>
+ <expandproperties/>
+ </filterchain>
+ </loadfile>
+
+ <loadfile property="content.primary"
+ srcFile="content_primary.html"
+ failonerror="false">
+ <filterchain>
+ <expandproperties/>
+ </filterchain>
+ </loadfile>
+
+ <loadfile property="content.primary"
+ srcFile="${template.dir}/${template.name}/content_primary.html"
+ failonerror="false">
+ <filterchain>
+ <expandproperties/>
+ </filterchain>
+ </loadfile>
+
+ <loadfile property="content.secondary"
+ srcFile="content_secondary.html"
+ failonerror="false">
+ <filterchain>
+ <expandproperties/>
+ </filterchain>
+ </loadfile>
+
+ <loadfile property="content.secondary"
+ srcFile="${template.dir}/${template.name}/content_secondary.html"
+ failonerror="false">
+ <filterchain>
+ <expandproperties/>
+ </filterchain>
+ </loadfile>
+
+ <loadfile property="content.footer"
+ srcFile="content_footer.html"
+ failonerror="false">
+ <filterchain>
+ <expandproperties/>
+ </filterchain>
+ </loadfile>
+
+ <loadfile property="content.footer"
+ srcFile="${template.dir}/${template.name}/content_footer.html"
+ failonerror="false">
+ <filterchain>
+ <expandproperties/>
+ </filterchain>
+ </loadfile>
+
<echoproperties destfile="${widget.build.dir}/${widget.shortname}.properties" prefix=""/>
</target>