svn commit: r800208 - in /ofbiz/trunk/applications/product: webapp/facility/facility/FacilityForms.xml widget/facility/FacilityScreens.xml widget/facility/Menus.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r800208 - in /ofbiz/trunk/applications/product: webapp/facility/facility/FacilityForms.xml widget/facility/FacilityScreens.xml widget/facility/Menus.xml

apatel-2
Author: apatel
Date: Mon Aug  3 06:16:18 2009
New Revision: 800208

URL: http://svn.apache.org/viewvc?rev=800208&view=rev
Log:
Set of code cleanup. Using menu widget in place of imbeded links in screens. Patch from OFBIZ-2784. Thanks Sumit, Satyam for contribution.

Modified:
    ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml
    ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
    ofbiz/trunk/applications/product/widget/facility/Menus.xml

Modified: ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml?rev=800208&r1=800207&r2=800208&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml Mon Aug  3 06:16:18 2009
@@ -681,7 +681,7 @@
         <field name="totalInventoryCost" use-when="currencyUomId==null" title="${uiLabelMap.CommonTotalCost}"><display description="${uiLabelMap.ProductDifferentCurrencies}"/></field>
     </form>
     <form name="ListInventoryItemGrandTotals" type="list" list-name="inventoryItemGrandTotals"
-        header-row-style="header-row-2" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
         <field name="qohGrandTotal" title="${uiLabelMap.ProductQoh} ${uiLabelMap.CommonTotal} ${uiLabelMap.CommonQty}"><display/></field>
         <field name="atpGrandTotal" title="${uiLabelMap.ProductAtp} ${uiLabelMap.CommonTotal} ${uiLabelMap.CommonQty}"><display/></field>
         <field name="totalCostPriceGrandTotal" title="${uiLabelMap.CommonTotal} ${uiLabelMap.ProductCostPrice}"><display/></field>

Modified: ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?rev=800208&r1=800207&r2=800208&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Mon Aug  3 06:16:18 2009
@@ -425,31 +425,8 @@
             <widgets>
                 <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
+                        <include-menu name="ViewFacilityInventoryByProductTabBar" location="component://product/widget/facility/Menus.xml"/>
                         <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
-                            <decorator-section name="menu-bar">
-                                <container style="button-bar">
-                                    <!--<link target="ViewFacilityInventoryByProductSimple" text="${uiLabelMap.CommonPrint}" style="buttontext">
-                                        <parameter param-name="facilityId" from-field="facilityId"/>
-                                    </link>-->
-                                    <link target="ViewFacilityInventoryByProductReport?${searchParameterString}" text="${uiLabelMap.CommonPrint}" style="buttontext"/>
-                                    <link target="ViewFacilityInventoryByProductExport?${searchParameterString}" text="${uiLabelMap.CommonExport}" style="buttontext"/>
-                                    <link target="InventoryItemTotals" text="${uiLabelMap.ProductInventoryItemTotals}" style="buttontext">
-                                        <parameter param-name="facilityId" from-field="facilityId"/>
-                                        <parameter param-name="action" value="Y"/>
-                                    </link>
-                                    <link target="InventoryItemGrandTotals" text="${uiLabelMap.ProductInventoryItemGrandTotals}" style="buttontext">
-                                        <parameter param-name="facilityId" from-field="facilityId"/>
-                                        <parameter param-name="action" value="Y"/>
-                                    </link>
-                                    <link target="InventoryItemTotalsExport.csv" text="${uiLabelMap.ProductInventoryItemTotalsExport}" style="buttontext">
-                                        <parameter param-name="facilityId" from-field="facilityId"/>
-                                        <parameter param-name="action" value="Y"/>
-                                    </link>
-                                    <link target="InventoryAverageCosts" text="${uiLabelMap.ProductInventoryAverageCosts}" style="buttontext">
-                                        <parameter param-name="facilityId" from-field="facilityId"/>
-                                    </link>
-                                </container>
-                            </decorator-section>
                             <decorator-section name="search-options">
                                 <include-form name="FindFacilityInventoryByProduct" location="component://product/webapp/facility/facility/FacilityForms.xml"/>
                             </decorator-section>
@@ -656,6 +633,7 @@
                 <set field="titleProperty" value="PageTitleEditFacilityInventoryItems"/>
                 <set field="headerItem" value="facility"/>
                 <set field="tabButtonItem" value="ViewFacilityInventoryByProduct"/>
+                <set field="tabButtonItem2" value="InventoryItemTotalsTab"/>
                 <set field="facilityId" from-field="parameters.facilityId"/>
                 <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="50"/>
@@ -666,6 +644,7 @@
             <widgets>
                 <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
+                        <include-menu name="ViewFacilityInventoryByProductTabBar" location="component://product/widget/facility/Menus.xml"/>
                         <container style="screenlet">
                             <container style="screenlet-title-bar">
                                 <container style="h3">
@@ -691,6 +670,7 @@
             <actions>
                 <set field="headerItem" value="facility"/>
                 <set field="tabButtonItem" value="ViewFacilityInventoryByProduct"/>
+                <set field="tabButtonItem2" value="InventoryItemGrandTotalsTab"/>
                 <set field="facilityId" from-field="parameters.facilityId"/>
                 <entity-one entity-name="Facility" value-field="facility" use-cache="true"/>
                 <script location="component://product/webapp/facility/WEB-INF/actions/inventory/InventoryItemTotals.groovy"/>
@@ -700,10 +680,17 @@
             <widgets>
                 <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
-                        <container style="h1">
-                            <label text="${title}"/>
-                        </container>
-                        <include-form name="ListInventoryItemGrandTotals" location="component://product/webapp/facility/facility/FacilityForms.xml"/>
+                        <include-menu name="ViewFacilityInventoryByProductTabBar" location="component://product/widget/facility/Menus.xml"/>
+                        <container style="screenlet">
+                            <container style="screenlet-title-bar">
+                                <container style="h3">
+                                    <label text="${title}"/>
+                                </container>
+                            </container>
+                            <container style="screenlet-body">
+                                <include-form name="ListInventoryItemGrandTotals" location="component://product/webapp/facility/facility/FacilityForms.xml"/>
+                            </container>
+                        </container>                    
                     </decorator-section>
                 </decorator-screen>
             </widgets>
@@ -742,6 +729,7 @@
                 <set field="titleProperty" value="PageTitleEditFacilityInventoryItems"/>
                 <set field="headerItem" value="facility"/>
                 <set field="tabButtonItem" value="ViewFacilityInventoryByProduct"/>
+                <set field="tabButtonItem2" value="InventoryAverageCostsTab"/>
                 <set field="facilityId" from-field="parameters.facilityId"/>
 
                 <entity-one entity-name="Facility" value-field="facility" use-cache="true"/>
@@ -750,6 +738,7 @@
             <widgets>
                 <decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
                     <decorator-section name="body">
+                        <include-menu name="ViewFacilityInventoryByProductTabBar" location="component://product/widget/facility/Menus.xml"/>
                         <container style="screenlet">
                             <container style="screenlet-title-bar">
                                 <container style="h3">
@@ -1532,4 +1521,4 @@
         </section>
     </screen>
 
-</screens>
\ No newline at end of file
+</screens>

Modified: ofbiz/trunk/applications/product/widget/facility/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/Menus.xml?rev=800208&r1=800207&r2=800208&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/Menus.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/Menus.xml Mon Aug  3 06:16:18 2009
@@ -204,4 +204,37 @@
             <link target="FindShipmentGatewayConfigTypes"/>
         </menu-item>
     </menu>
+    
+    <menu name="ViewFacilityInventoryByProductTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"
+        selected-menuitem-context-field-name="tabButtonItem2">
+        <menu-item name="ViewFacilityInventoryByProductReportTab" title="${uiLabelMap.CommonPrint}">
+            <link target="ViewFacilityInventoryByProductReport?${searchParameterString}"/>
+        </menu-item>
+        <menu-item name="ViewFacilityInventoryByProductExportTab" title="${uiLabelMap.CommonExport}">
+            <link target="ViewFacilityInventoryByProductExport?${searchParameterString}"/>
+        </menu-item>
+        <menu-item name="InventoryItemTotalsTab" title="${uiLabelMap.ProductInventoryItemTotals}">
+            <link target="InventoryItemTotals">
+                <parameter param-name="facilityId" from-field="facilityId"/>
+                <parameter param-name="action" value="Y"/>                
+            </link>
+        </menu-item>
+        <menu-item name="InventoryItemGrandTotalsTab" title="${uiLabelMap.ProductInventoryItemGrandTotals}">
+            <link target="InventoryItemGrandTotals">
+                <parameter param-name="facilityId" from-field="facilityId"/>
+                <parameter param-name="action" value="Y"/>                
+            </link>
+        </menu-item>
+        <menu-item name="InventoryItemTotalsExportTab" title="${uiLabelMap.ProductInventoryItemTotalsExport}">
+            <link target="InventoryItemTotalsExport.csv">
+                <parameter param-name="facilityId" from-field="facilityId"/>
+                <parameter param-name="action" value="Y"/>                
+            </link>
+        </menu-item>
+        <menu-item name="InventoryAverageCostsTab" title="${uiLabelMap.ProductInventoryAverageCosts}">
+            <link target="InventoryAverageCosts">
+                <parameter param-name="facilityId" from-field="facilityId"/>                
+            </link>
+        </menu-item>                                  
+    </menu>
 </menus>