Moved new layout demo page to Webtools component. After thinking about it, Webtools seemed to be a more logical place to put it.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1060219 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adrian Crum
2011-01-18 07:25:06 +00:00
parent 93c983d147
commit 4c01ad9512
10 changed files with 256 additions and 233 deletions
@@ -248,54 +248,4 @@ under the License.
</field>
<field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field>
</form>
<form name="LayoutDemoForm" type="single" target="${demoTargetUrl}" default-map-name="demoMap">
<field name="name" title="${uiLabelMap.CommonName}" widget-style="required" tooltip="${uiLabelMap.CommonRequired}">
<text />
</field>
<field name="description" title="${uiLabelMap.CommonDescription}"><text/></field>
<field name="dropDown" title="${uiLabelMap.CommonEnabled}">
<drop-down>
<option key="Y" description="${uiLabelMap.CommonYes}" />
<option key="N" description="${uiLabelMap.CommonNo}" />
</drop-down>
</field>
<field name="checkBox" title="${uiLabelMap.CommonEnabled}">
<check/>
</field>
<field name="radioButton" title="${uiLabelMap.CommonEnabled}">
<radio>
<option key="Y" description="${uiLabelMap.CommonYes}" />
<option key="N" description="${uiLabelMap.CommonNo}" />
</radio>
</field>
<field name="submitButton" title="${uiLabelMap.CommonSave}"><submit button-type="button"/></field>
<field name="cancelButton" title="${uiLabelMap.CommonEmptyHeader}" widget-style="smallSubmit">
<hyperlink target="${demoTargetUrl}" description="${uiLabelMap.CommonCancel}"></hyperlink>
</field>
</form>
<form name="LayoutDemoList" type="list" list-name="demoList" paginate-target="${demoTargetUrl}" separate-columns="true"
odd-row-style="${altRowStyle}" header-row-style="${headerStyle}" default-table-style="${tableStyle}">
<field name="name" title="${uiLabelMap.CommonName}"><display/></field>
<field name="description" title="${uiLabelMap.CommonDescription}"><text/></field>
<field name="dropDown" title="${uiLabelMap.CommonEnabled}">
<drop-down>
<option key="Y" description="${uiLabelMap.CommonYes}" />
<option key="N" description="${uiLabelMap.CommonNo}" />
</drop-down>
</field>
<field name="checkBox" title="${uiLabelMap.CommonEnabled}">
<check/>
</field>
<field name="radioButton" title="${uiLabelMap.CommonEnabled}">
<radio>
<option key="Y" description="${uiLabelMap.CommonYes}" />
<option key="N" description="${uiLabelMap.CommonNo}" />
</radio>
</field>
<field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="button-col">
<submit button-type="button"/>
</field>
</form>
</forms>
@@ -35,7 +35,6 @@ under the License.
<menu-item name="ExampleGeoLocation" title="${uiLabelMap.CommonGeoLocation}"><link target="ExampleGeoLocationPointSet1"/></menu-item>
<menu-item name="Birt" title="${uiLabelMap.Birt}"><link target="BirtMain"/></menu-item>
<menu-item name="ExampleCharts" title="Chart examples"><link target="ExampleBarChart"/></menu-item>
<menu-item name="LayoutDemo" title="${uiLabelMap.ExampleLayoutDemo}"><link target="ExampleLayoutDemo"/></menu-item>
</menu>
<menu name="EditExample" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
@@ -95,16 +94,4 @@ under the License.
<menu-item name="ExampleBarChart" title="Bar chart"><link target="ExampleBarChart"/></menu-item>
<menu-item name="ExamplePieChart" title="Pie chart"><link target="ExamplePieChart"/></menu-item>
</menu>
<menu name="LayoutDemo" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
<menu-item name="Selected" title="${uiLabelMap.CommonSelected}" widget-style="selected">
<link target="${demoTargetUrl}"/>
</menu-item>
<menu-item name="Enabled" title="${uiLabelMap.CommonEnabled}">
<link target="${demoTargetUrl}"/>
</menu-item>
<menu-item name="Disabled" title="${uiLabelMap.CommonDisabled}" widget-style="disabled">
</menu-item>
</menu>
</menus>
@@ -462,160 +462,4 @@ under the License.
</widgets>
</section>
</screen>
<screen name="ExampleLayoutDemo">
<!-- Demonstrates UI layout best practices and serves as a visual theme test jig.
For more information:
https://cwiki.apache.org/OFBADMIN/user-interface-layout-best-practices.html
https://cwiki.apache.org/OFBADMIN/html-and-css-best-practices.html
https://cwiki.apache.org/OFBIZ/ofbiz-maincsscss-html-element-collection-styles.html
-->
<section>
<actions>
<property-map resource="ExampleUiLabels" map-name="uiLabelMap" global="true"/>
<set field="titleProperty" value="ExampleLayoutDemo"/>
<set field="headerItem" value="LayoutDemo"/>
<set field="tabButtonItem" value="Selected"/>
<set field="demoText" value="${uiLabelMap.ExampleLayoutDemoText}" global="true"/>
<set field="errorMessage" from-field="demoText" global="true"/>
<set field="eventMessage" from-field="demoText" global="true"/>
<set field="demoTargetUrl" value="ExampleLayoutDemo"/>
<set field="demoMap.name" value="${uiLabelMap.ExampleLayoutDemo}"/>
<set field="demoMap.description" value="${uiLabelMap.ExampleLayoutDemoText}"/>
<set field="demoMap.dropDown" value="Y"/>
<set field="demoMap.checkBox" value="Y"/>
<set field="demoMap.radioButton" value="Y"/>
<set field="demoList[]" from-field="demoMap"/>
<set field="demoList[]" from-field="demoMap"/>
<set field="demoList[]" from-field="demoMap"/>
<set field="altRowStyle" value=""/>
<set field="headerStyle" value="header-row-1"/>
<set field="tableStyle" value="basic-table light-grid"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<section>
<condition>
<and>
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
</and>
</condition>
<widgets>
<include-menu name="LayoutDemo" location="component://example/widget/example/ExampleMenus.xml"/>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
</condition>
<widgets>
<section name="Standard Page Start">
<widgets>
<container style="page-title">
<label text="${uiLabelMap.ExampleLayoutDemo}"/>
</container>
<container style="button-bar button-style-1">
<!-- Typically used for intra-app links -->
<link target="${demoTargetUrl}" text="${uiLabelMap.CommonNew}" style="create"/>
<link target="${demoTargetUrl}" text="${uiLabelMap.CommonSelected}" style="selected"/>
<link target="${demoTargetUrl}" text="${uiLabelMap.CommonEnabled}"/>
<link text="${uiLabelMap.CommonDisabled}" style="disabled"/>
</container>
<container style="button-bar button-style-2">
<!-- Typically used for inter-app links -->
<link target="${demoTargetUrl}" text="${uiLabelMap.CommonNew}" style="create"/>
<link target="${demoTargetUrl}" text="${uiLabelMap.CommonSelected}" style="selected"/>
<link target="${demoTargetUrl}" text="${uiLabelMap.CommonEnabled}"/>
<link text="${uiLabelMap.CommonDisabled}" style="disabled"/>
</container>
</widgets>
</section>
<section name="h1-h6 Styles">
<widgets>
<horizontal-separator/>
<label style="h1" text="${demoText}"/>
<label style="h2" text="${demoText}"/>
<label style="h3" text="${demoText}"/>
<label style="h4" text="${demoText}"/>
<label style="h5" text="${demoText}"/>
<label style="h6" text="${demoText}"/>
</widgets>
</section>
<section name="Form/List Styles">
<widgets>
<horizontal-separator/>
<include-form name="LayoutDemoForm" location="component://example/widget/example/ExampleForms.xml"/>
<include-form name="LayoutDemoList" location="component://example/widget/example/ExampleForms.xml"/>
<section>
<actions>
<set field="tableStyle" value="basic-table dark-grid"/>
</actions>
<widgets/>
</section>
<include-form name="LayoutDemoList" location="component://example/widget/example/ExampleForms.xml"/>
<section>
<actions>
<set field="altRowStyle" value="alternate-row"/>
<set field="headerStyle" value="header-row-2"/>
<set field="tableStyle" value="basic-table hover-bar"/>
</actions>
<widgets/>
</section>
<include-form name="LayoutDemoList" location="component://example/widget/example/ExampleForms.xml"/>
</widgets>
</section>
<section name="Screenlet Styles">
<widgets>
<horizontal-separator/>
<screenlet>
<label text="${demoText}"/>
</screenlet>
<screenlet title="${uiLabelMap.ExampleLayoutDemo}" id="screenlet-demo" collapsible="true">
<include-form name="LayoutDemoForm" location="component://example/widget/example/ExampleForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.ExampleLayoutDemo}" padded="false">
<section>
<actions>
<set field="altRowStyle" value="alternate-row"/>
<set field="headerStyle" value="header-row-1"/>
<set field="tableStyle" value="basic-table light-grid hover-bar"/>
</actions>
<widgets/>
</section>
<include-form name="LayoutDemoList" location="component://example/widget/example/ExampleForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.ExampleLayoutDemo}" padded="false">
<section>
<actions>
<set field="altRowStyle" value="alternate-row"/>
<set field="headerStyle" value="header-row-2"/>
<set field="tableStyle" value="basic-table hover-bar"/>
<set field="viewSize" value="1" type="Integer"/>
</actions>
<widgets/>
</section>
<container style="button-bar button-style-1">
<link target="${demoTargetUrl}" text="${uiLabelMap.CommonNew}" style="create"/>
<link target="${demoTargetUrl}" text="${uiLabelMap.CommonSelected}" style="selected"/>
<link target="${demoTargetUrl}" text="${uiLabelMap.CommonEnabled}"/>
<link text="${uiLabelMap.CommonDisabled}" style="disabled"/>
</container>
<include-form name="LayoutDemoList" location="component://example/widget/example/ExampleForms.xml"/>
</screenlet>
</widgets>
</section>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.ExampleViewPermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>