svn commit: r573104 - in /ofbiz/trunk/specialpurpose/assetmaint/widget: AssetMaintTrees.xml CommonScreens.xml FixedAssetScreens.xml 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: r573104 - in /ofbiz/trunk/specialpurpose/assetmaint/widget: AssetMaintTrees.xml CommonScreens.xml FixedAssetScreens.xml Menus.xml

adrianc
Author: adrianc
Date: Wed Sep  5 16:21:30 2007
New Revision: 573104

URL: http://svn.apache.org/viewvc?rev=573104&view=rev
Log:
Asset Maintenance -> Equipments -> Children UI work. The tree behaves more like one would expect.

Added:
    ofbiz/trunk/specialpurpose/assetmaint/widget/AssetMaintTrees.xml
Modified:
    ofbiz/trunk/specialpurpose/assetmaint/widget/CommonScreens.xml
    ofbiz/trunk/specialpurpose/assetmaint/widget/FixedAssetScreens.xml
    ofbiz/trunk/specialpurpose/assetmaint/widget/Menus.xml

Added: ofbiz/trunk/specialpurpose/assetmaint/widget/AssetMaintTrees.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/widget/AssetMaintTrees.xml?rev=573104&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/widget/AssetMaintTrees.xml (added)
+++ ofbiz/trunk/specialpurpose/assetmaint/widget/AssetMaintTrees.xml Wed Sep  5 16:21:30 2007
@@ -0,0 +1,44 @@
+<?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.
+-->
+
+<trees xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-tree.xsd">
+    <tree name="TreeFixedAsset" root-node-name="node-root" entity-name="FixedAsset"
+        default-render-style="expand-collapse" default-wrap-style="treeWrapper"
+        expand-collapse-request="FixedAssetChildren?rootAssetId=${rootAssetId}">
+        <node name="node-root" render-style="simple">
+            <sub-node node-name="node-body">
+                <entity-and entity-name="FixedAsset">
+                    <field-map field-name="parentFixedAssetId" env-name="fixedAssetId"/>
+                    <order-by field-name="fixedAssetName"/>
+                </entity-and>
+            </sub-node>
+        </node>
+        <node name="node-body" wrap-style="treeWrapper">
+            <link target="EditFixedAsset?fixedAssetId=${fixedAssetId}" text="${fixedAssetName} [${fixedAssetId}] ${instanceOfProductId} ${fixedAssetTypeId} "/>
+            <sub-node node-name="node-body">
+                <entity-and entity-name="FixedAsset">
+                    <field-map field-name="parentFixedAssetId" env-name="fixedAssetId"/>
+                    <order-by field-name="fixedAssetName"/>
+                </entity-and>
+            </sub-node>
+        </node>
+    </tree>
+</trees>

Modified: ofbiz/trunk/specialpurpose/assetmaint/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/widget/CommonScreens.xml?rev=573104&r1=573103&r2=573104&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/widget/CommonScreens.xml Wed Sep  5 16:21:30 2007
@@ -92,10 +92,10 @@
                             </condition>
                             <widgets>
                                 <section>
-                                    <condition><not><if-empty field-name="fixedAssetId"/></not></condition>
+                                    <condition><not><if-empty field-name="fixedAsset"/></not></condition>
                                     <widgets>
                                         <include-menu name="FixedAssetTabBar" location="component://assetmaint/widget/Menus.xml"/>
-                                        <label style="head1" text="${uiLabelMap.${labelTitleProperty}} ${uiLabelMap.CommonFor}: ${fixedAsset.fixedAssetName} [${uiLabelMap.CommonId}:${fixedAssetId}]  ${${extraFunctionName}}"/>
+                                        <label style="head1" text="${uiLabelMap.${labelTitleProperty}} ${uiLabelMap.CommonFor}: ${fixedAsset.fixedAssetName} [${fixedAsset.fixedAssetId}]  ${${extraFunctionName}}"/>
                                     </widgets>
                                 </section>
                             </widgets>

Modified: ofbiz/trunk/specialpurpose/assetmaint/widget/FixedAssetScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/widget/FixedAssetScreens.xml?rev=573104&r1=573103&r2=573104&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/widget/FixedAssetScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/widget/FixedAssetScreens.xml Wed Sep  5 16:21:30 2007
@@ -88,15 +88,16 @@
                 <set field="titleProperty" value="AccountingEditFixedAsset"/>
                 <set field="labelTitleProperty" value="AccountingFixedAssetChildren"/>
                 <set field="tabButtonItem" value="FixedAssetChildren"/>
-                <set field="fixedAssetId" from-field="parameters.fixedAssetId"/>
-                <set field="trail" from-field="parameters.trail" default-value="${parameters.fixedAssetId}"/>
-                <set field="fixedAssetId" from-field="parameters.trail"/>
+                <set field="rootAssetId" from-field="parameters.rootAssetId" default-value="${parameters.fixedAssetId}"/>
+                <set field="fixedAssetId" from-field="rootAssetId"/>
                 <entity-one entity-name="FixedAsset" value-name="fixedAsset"/>
+                <set field="fixedAssetId" from-field="parameters.fixedAssetId" default-value="${parameters.trail}"/>
+                <set field="trail" from-field="parameters.trail" default-value="${parameters.fixedAssetId}"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonFixedAssetDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <include-tree name="TreeFixedAsset" location="component://accounting/widget/AccountingTrees.xml" />
+                        <include-tree name="TreeFixedAsset" location="component://assetmaint/widget/AssetMaintTrees.xml" />
                     </decorator-section>
                 </decorator-screen>
             </widgets>

Modified: ofbiz/trunk/specialpurpose/assetmaint/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/widget/Menus.xml?rev=573104&r1=573103&r2=573104&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/widget/Menus.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/widget/Menus.xml Wed Sep  5 16:21:30 2007
@@ -27,7 +27,7 @@
             <link target="EditFixedAsset?fixedAssetId=${fixedAssetId}"/>
         </menu-item>
         <menu-item name="FixedAssetChildren" title="${uiLabelMap.AccountingFixedAssetChildren}">
-            <link target="FixedAssetChildren?fixedAssetId=${fixedAssetId}&amp;trail=${fixedAssetId}"/>
+            <link target="FixedAssetChildren?rootAssetId=${fixedAssetId}&amp;trail=${fixedAssetId}"/>
         </menu-item>
         <menu-item name="ListFixedAssetCalendar" title="${uiLabelMap.AccountingFixedAssetCalendar}">
             <link target="ListFixedAssetCalendar?fixedAssetId=${fixedAssetId}"/>