You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by th...@apache.org on 2007/01/18 14:47:09 UTC
svn commit: r497427 - in /forrest/trunk/whiteboard/plugins:
org.apache.forrest.plugin.output.solr/resources/themes/common/html/
org.apache.forrest.themes.core/themes/common/html/
org.apache.forrest.themes.core/themes/pelt/html/
Author: thorsten
Date: Thu Jan 18 05:47:08 2007
New Revision: 497427
URL: http://svn.apache.org/viewvc?view=rev&rev=497427
Log:
Extracting call to the getBlank script to a helper contract.
Added:
forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/helper-form-blank.ft (with props)
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-search.ft
forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/pelt-html.vt.xml
forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/search-input.ft
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-search.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-search.ft?view=diff&rev=497427&r1=497426&r2=497427
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-search.ft (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-search.ft Thu Jan 18 05:47:08 2007
@@ -31,6 +31,11 @@
<field name="abstract" type="text" indexed="true" stored="true"/>
<field name="version" type="text" indexed="true" stored="true"/>
<field name="author" type="text" indexed="true" stored="true" multiValued="true"/>]]> </source>
+ <div class="warning">
+ <div class="label">Warning</div>
+ <div class="content">You need to include <![CDATA[<forrest:contract name="helper-form-blank"/>]]>
+ in your view!!! If you are not, the contract will not work correctly.</div>
+ </div>
</description>
<usage><![CDATA[<forrest:contract name="solr-search">
<forrest:property name="hidden">
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/helper-form-blank.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/helper-form-blank.ft?view=auto&rev=497427
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/helper-form-blank.ft (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/helper-form-blank.ft Thu Jan 18 05:47:08 2007
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<forrest:contract
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="helper-form-blank">
+
+ <!--NOTE:
+ THIS IS JUST AN EXPLANATION!!!-->
+ <description>
+ <p>
+ This contract will output a link to the getBlank.js that can be used when working with forms
+ and default values for text fields. See the pelt implementation of the search-input contract,
+ which is using this.
+ </p>
+ </description>
+ <usage><![CDATA[<forrest:contract name="helper-form-blank"/>]]></usage>
+ <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="helper-form-blank" inputFormat="xsl">
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <forrest:content>
+ <forrest:part xpath="/html/head">
+ <script type="text/javascript" src="{$root}themes/getBlank.js"> </script>
+ </forrest:part>
+ </forrest:content>
+ </xsl:template>
+ </xsl:stylesheet>
+ </forrest:template>
+</forrest:contract>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/helper-form-blank.ft
------------------------------------------------------------------------------
svn:eol-style = native
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/pelt-html.vt.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/pelt-html.vt.xml?view=diff&rev=497427&r1=497426&r2=497427
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/pelt-html.vt.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/pelt-html.vt.xml Thu Jan 18 05:47:08 2007
@@ -82,7 +82,7 @@
images/project.png</forrest:property>
</forrest:contract>
</forrest:hook>
- <!-- -->
+ <forrest:contract name="helper-form-blank"/>
<forrest:contract name="search-input">
<forrest:property name="input-size">25</forrest:property>
<forrest:property name="search-input">
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/search-input.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/search-input.ft?view=diff&rev=497427&r1=497426&r2=497427
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/search-input.ft (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/search-input.ft Thu Jan 18 05:47:08 2007
@@ -22,6 +22,11 @@
<p>To enable lucene search add provider="lucene" (default is google).
@domain will enable sitesearch for the specific domain with google. In
other words google will search the @domain for the query string.</p>
+ <div class="warning">
+ <div class="label">Warning</div>
+ <div class="content">You need to include <![CDATA[<forrest:contract name="helper-form-blank"/>]]>
+ in your view!!! If you are not, the contract will not work correctly.</div>
+ </div>
</description>
<usage><![CDATA[<forrest:contract name="search-input">
[<forrest:property name="search-lucene">lucene-search.html</forrest:property>]
@@ -47,10 +52,6 @@
<xsl:template match="/">
<forrest:content>
- <forrest:part xpath="/html/head">
- <script type="text/javascript" src="{$root}themes/getBlank.js"> </script>
- </forrest:part>
-
<forrest:part>
<xsl:comment>+
|start Search