You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2008/03/21 04:09:24 UTC

svn commit: r639527 - in /ofbiz/trunk/applications/product: config/ webapp/catalog/WEB-INF/ webapp/catalog/WEB-INF/actions/feature/ webapp/catalog/feature/ widget/catalog/

Author: hansbak
Date: Thu Mar 20 20:09:08 2008
New Revision: 639527

URL: http://svn.apache.org/viewvc?rev=639527&view=rev
Log:
replace ftl with forms for Feature categories and add paging

Removed:
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategories.bsh
    ofbiz/trunk/applications/product/webapp/catalog/feature/CreateFeatureCategory.ftl
    ofbiz/trunk/applications/product/webapp/catalog/feature/EditFeatureCategories.ftl
Modified:
    ofbiz/trunk/applications/product/config/ProductUiLabels.xml
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
    ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml
    ofbiz/trunk/applications/product/widget/catalog/FeatureScreens.xml

Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=639527&r1=639526&r2=639527&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Thu Mar 20 20:09:08 2008
@@ -14738,6 +14738,9 @@
         <value xml:lang="th">ข้อบังคับ</value>
         <value xml:lang="zh">规则</value>
     </property>
+    <property key="ProductSearchFeature">
+        <value xml:lang="en">Search feature</value>
+    </property>
     <property key="ProductSRCH">
         <value xml:lang="en">SRCH</value>
         <value xml:lang="fr">Rch.</value>

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml?rev=639527&r1=639526&r2=639527&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml Thu Mar 20 20:09:08 2008
@@ -307,6 +307,10 @@
         <response name="success" type="view" value="EditCategoryFeatureCats"/>
         <response name="error" type="view" value="EditCategoryFeatureCats"/>
     </request-map>
+    <request-map uri="CreateProductFeature">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="CreateProductFeature"/>
+    </request-map>
 
     <!-- ================ Category Roles Requests ================= -->
     <request-map uri="EditCategoryParties">
@@ -1168,7 +1172,10 @@
         <response name="success" type="view" value="EditFeatureTypes"/>
         <response name="error" type="view" value="EditFeatureType"/>
     </request-map>
-
+    <request-map uri="EditFeatureCategories">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="EditFeatureCategories"/>
+    </request-map>
     <!-- ================ Product Feature Requests ================= -->
     <request-map uri="EditProductFeatures">
         <security https="true" auth="true"/>
@@ -2539,6 +2546,7 @@
     <view-map name="EditSubscriptionResourceProducts" type="screen" page="component://product/widget/catalog/SubscriptionScreens.xml#EditSubscriptionResourceProducts"/>
     <view-map name="EditSubscriptionCommEvent" type="screen" page="component://product/widget/catalog/SubscriptionScreens.xml#EditSubscriptionCommEvent"/>
     
+    
     <view-map name="EditFeature" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#EditFeature"/>
     <view-map name="EditFeatureCategories" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#EditFeatureCategories"/>
     <view-map name="EditFeatureCategoryFeatures" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#EditFeatureCategoryFeatures"/>
@@ -2547,6 +2555,7 @@
     <view-map name="EditFeatureTypes" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#EditFeatureTypes"/>
     <view-map name="EditFeatureType" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#EditFeatureType"/>
     <view-map name="QuickAddProductFeatures" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#QuickAddProductFeatures"/>
+    <view-map name="CreateProductFeature" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#CreateProductFeature"/>
     
     <view-map name="FindProdCatalog" type="screen" page="component://product/widget/catalog/CatalogScreens.xml#FindProdCatalog"/>
     <view-map name="EditProdCatalog" type="screen" page="component://product/widget/catalog/CatalogScreens.xml#EditProdCatalog"/>

Modified: ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml?rev=639527&r1=639526&r2=639527&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml Thu Mar 20 20:09:08 2008
@@ -190,4 +190,40 @@
           <submit/>
         </field>
     </form>
+    
+    <form name="FindProductFeature" type="single" target="EditFeatureCategories" 
+        header-row-style="header-row" default-table-style="basic-table">
+        <field name="productFeatureCategoryId" title="${uiLabelMap.CommonId}"><text-find size="25" default-option="contains"></text-find></field>
+        <field name="description" title="${uiLabelMap.FormFieldTitle_description}"><text-find size="25" default-option="contains"></text-find></field>
+        <field name="searchButton" widget-style="smallSubmit"><submit/></field>
+    </form>
+    
+    <form name="ListProductFeature" type="list" list-name="listIt" paginate-target="EditFeatureCategories"
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar" separate-columns="true">
+        <actions>
+            <set field="parameters.noConditionFind" value="Y"/>
+            <service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
+                <field-map field-name="inputFields" env-name="parameters"/>
+                <field-map field-name="entityName" value="ProductFeatureCategory"/>
+                <field-map field-name="orderBy" value="productFeatureCategoryId"/>
+            </service>
+        </actions>
+        <field name="productFeatureCategoryId" title="${uiLabelMap.CommonId}" widget-style="buttontext">
+            <hyperlink target="EditFeatureCategoryFeatures?productFeatureCategoryId=${productFeatureCategoryId}" description="${productFeatureCategoryId}"/>
+        </field>
+        <field name="description" title="${uiLabelMap.FormFieldTitle_description}"><display/></field>
+     
+    </form>
+    
+    <form name="CreateProductFeature" type="single" target="CreateFeatureCategory">
+        <field name="description" title="${uiLabelMap.FormFieldTitle_description}*"><text size="25"></text></field>
+        <field name="parentCategory" title="${uiLabelMap.ProductParentCategory}">
+            <drop-down allow-empty="true">
+                <entity-options description="${description}" entity-name="ProductFeatureCategory" key-field-name="description">
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    
+    </form>
 </forms>

Modified: ofbiz/trunk/applications/product/widget/catalog/FeatureScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/FeatureScreens.xml?rev=639527&r1=639526&r2=639527&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/FeatureScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/FeatureScreens.xml Thu Mar 20 20:09:08 2008
@@ -159,14 +159,12 @@
             </widgets>
         </section>
     </screen>
-    <screen name="EditFeatureCategories">
+    <screen name="CreateProductFeature">
         <section>
             <actions>
                 <set field="titleProperty" value="PageTitleEditProductFeatureCategories"/>
                 <set field="headerItem" value="featurecats"/>
                 <set field="tabButtonItem" value="FeatureCategory"/>
-    
-                <script location="component://product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategories.bsh"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonFeatureDecorator">
@@ -174,33 +172,55 @@
                         <container style="screenlet">
                             <container style="screenlet-title-bar">
                                 <container style="h3">
-                                    <label text="${uiLabelMap.ProductCreateAProductFeatureCategory}"/>
+                                    <label text="${uiLabelMap.PageTitleEditFeatureType}"/>
                                 </container>
                             </container>
                             <container style="screenlet-body">
                                 <section>
                                     <widgets>
-                                        <platform-specific>
-                                            <html><html-template location="component://product/webapp/catalog/feature/CreateFeatureCategory.ftl"/></html>
-                                        </platform-specific>
+                                        <include-form name="CreateProductFeature" location="component://product/webapp/catalog/feature/FeatureForms.xml"/>
                                     </widgets>
                                 </section>
                             </container>
                         </container>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="EditFeatureCategories">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleEditProductFeatureCategories"/>
+                <set field="headerItem" value="featurecats"/>
+                <set field="tabButtonItem" value="FeatureCategory"/>
+                <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" default-value="0"/>
+                <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="10"/>
+                
+                <!--script location="component://product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategories.bsh"/-->
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonFeatureDecorator">
+                    <decorator-section name="body">
                         <container style="screenlet">
                             <container style="screenlet-title-bar">
                                 <container style="h3">
-                                    <label text="${uiLabelMap.ProductEditFeatureId}"/>
+                                    <label text="${uiLabelMap.ProductSearchFeature}"/>
                                 </container>
                             </container>
                             <container style="screenlet-body">
-                                <section>
-                                    <widgets>
-                                        <platform-specific>
-                                            <html><html-template location="component://product/webapp/catalog/feature/EditFeatureCategories.ftl"/></html>
-                                        </platform-specific>
-                                    </widgets>
-                                </section>
+                                <container><link target="CreateProductFeature" text="${uiLabelMap.CommonCreateNew}" style="buttontext"/></container>
+                                <include-form name="FindProductFeature" location="component://product/webapp/catalog/feature/FeatureForms.xml"/>
+                            </container>
+                        </container>
+                        <container style="screenlet">
+                            <container style="screenlet-title-bar">
+                                <container style="h3">
+                                    <label text="${uiLabelMap.PageTitleSearchResults}"/>
+                                </container>
+                            </container>
+                            <container style="screenlet-body">
+                                <include-form name="ListProductFeature" location="component://product/webapp/catalog/feature/FeatureForms.xml"/>
                             </container>
                         </container>
                     </decorator-section>