[OFBiz] SVN: r6669 - in trunk/applications/product: config webapp/catalog/WEB-INF webapp/catalog/WEB-INF/actions/feature webapp/catalog/feature widget/catalog
sichen@svn.ofbiz.org
sichen at svn.ofbiz.org
Thu Feb 2 16:37:23 CST 2006
Author: sichen
Date: 2006-02-02 16:37:05 -0600 (Thu, 02 Feb 2006)
New Revision: 6669
Added:
trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/QuickAddProductFeatures.bsh
trunk/applications/product/webapp/catalog/feature/BulkAddFeature.ftl
trunk/applications/product/webapp/catalog/feature/CreateFeatureCategory.ftl
Modified:
trunk/applications/product/config/ProductUiLabels.properties
trunk/applications/product/config/shipment.properties
trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.bsh
trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
trunk/applications/product/webapp/catalog/feature/EditFeatureCategories.ftl
trunk/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl
trunk/applications/product/widget/catalog/FeatureScreens.xml
Log:
Two new features (pardon the pun): 1. bulk add a whole bunch of features to a feature category (OFBIZ-705) and 2. separated out the create new feature category screen and put it on top and modularized it. Also changed the flow of adding new feature category, which now takes you to the new category instead back to list of categories, for faster data entry
Modified: trunk/applications/product/config/ProductUiLabels.properties
===================================================================
--- trunk/applications/product/config/ProductUiLabels.properties 2006-02-02 22:21:01 UTC (rev 6668)
+++ trunk/applications/product/config/ProductUiLabels.properties 2006-02-02 22:37:05 UTC (rev 6669)
@@ -200,6 +200,7 @@
ProductAddProductFeatureFromCategory=Add Product Feature From Category or Group
ProductAddProductFeatureFromGroup=Add Product Feature From Group
ProductAddProductFeatureID=Add Product Feature with ID
+ProductAddProductFeatureInBulk=Adding Product Features in Bulk
ProductAddProductFeatureTypeId=Add Product Feature with Type and ID Code
ProductAddProductKeyword=Add product keyword
ProductAddProductsUsingDefaultQuantities=Add Products in this Category to the Cart using Default Quantities
@@ -207,6 +208,7 @@
ProductAddRouteSegmentInfo=Add Route Segment Info
ProductAddStorePromo=Add Store Promo (select Store, enter optional From Date)
ProductAddStorePromoOptionalDate=Add Store Promo (select Promo, enter optional From Date)
+ProductAddFeatureToCategory=new features to this category
ProductAddToPackage=Add to Package
ProductAddresses=Addresses
ProductAdvancedSearch=Advanced Search
Modified: trunk/applications/product/config/shipment.properties
===================================================================
--- trunk/applications/product/config/shipment.properties 2006-02-02 22:21:01 UTC (rev 6668)
+++ trunk/applications/product/config/shipment.properties 2006-02-02 22:37:05 UTC (rev 6669)
@@ -71,6 +71,9 @@
# DHL XPCI Configuration
############################################
+# DHL Shipment Label configuration
+shipment.dhl.label.image.format=PNG
+
# DHL API Schema Templates
shipment.template.dhl.rate.estimate=api.schema.DHL
@@ -86,10 +89,10 @@
shipment.dhl.head.action=Request
# DHL Credentials
-shipment.dhl.access.userid=Your DHL ShipIT userid
-shipment.dhl.access.password=Your DHL ShipIT password
-shipment.dhl.access.accountNbr=Your DHL account number
-shipment.dhl.access.shippingKey=Shipping Key from DHL ShipIT, obtained with the dhlRegisterAccount (services_shipment_dhl.xml) service
+shipment.dhl.access.userid=GRACI_9365
+shipment.dhl.access.password=7RY0K02PGR
+shipment.dhl.access.accountNbr=915717482
+shipment.dhl.access.shippingKey=50233F2B2C405447425F54585D503053444E51434756545553
# DHL Shipment Label configuration
shipment.dhl.label.image.format=PNG
Modified: trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.bsh
===================================================================
--- trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.bsh 2006-02-02 22:21:01 UTC (rev 6668)
+++ trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.bsh 2006-02-02 22:37:05 UTC (rev 6669)
@@ -51,7 +51,7 @@
productId = request.getParameter("productId");
context.put("productId", productId);
-productFeatureCategoryId = request.getParameter("productFeatureCategoryId");
+productFeatureCategoryId = parameters.get("productFeatureCategoryId");
context.put("productFeatureCategoryId", productFeatureCategoryId);
curProductFeatureCategory = delegator.findByPrimaryKey("ProductFeatureCategory", UtilMisc.toMap("productFeatureCategoryId", productFeatureCategoryId));
Added: trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/QuickAddProductFeatures.bsh
===================================================================
--- trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/QuickAddProductFeatures.bsh 2006-02-02 22:21:01 UTC (rev 6668)
+++ trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/QuickAddProductFeatures.bsh 2006-02-02 22:37:05 UTC (rev 6669)
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2003 The Open For Business Project - www.ofbiz.org
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
+ * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+import org.ofbiz.base.util.UtilMisc;
+
+productFeatureTypes = delegator.findAllCache("ProductFeatureType", UtilMisc.toList("description"));
+context.put("productFeatureTypes", productFeatureTypes);
+
+featureCategory = delegator.findByPrimaryKey("ProductFeatureCategory",
+ UtilMisc.toMap("productFeatureCategoryId", parameters.get("productFeatureCategoryId")));
+context.put("featureCategory", featureCategory);
Property changes on: trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/QuickAddProductFeatures.bsh
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ "Date Rev Author URL Id"
Name: svn:eol-style
+ native
Modified: trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
===================================================================
--- trunk/applications/product/webapp/catalog/WEB-INF/controller.xml 2006-02-02 22:21:01 UTC (rev 6668)
+++ trunk/applications/product/webapp/catalog/WEB-INF/controller.xml 2006-02-02 22:37:05 UTC (rev 6669)
@@ -972,7 +972,7 @@
<request-map uri="CreateFeatureCategory">
<security https="true" auth="true"/>
<event type="service" path="" invoke="createProductFeatureCategory"/>
- <response name="success" type="view" value="EditFeatureCategories"/>
+ <response name="success" type="view" value="EditFeatureCategoryFeatures"/>
<response name="error" type="view" value="EditFeatureCategories"/>
</request-map>
<request-map uri="UpdateFeatureCategory">
@@ -992,6 +992,16 @@
<response name="success" type="view" value="EditFeatureCategoryFeatures"/>
<response name="error" type="view" value="EditFeatureCategoryFeatures"/>
</request-map>
+ <request-map uri="BulkAddProductFeatures">
+ <security https="true" auth="true"/>
+ <event type="service-multi" path="" invoke="createProductFeature"/>
+ <response name="success" type="view" value="EditFeatureCategoryFeatures"/>
+ <response name="error" type="view" value="QuickAddProductFeatures"/>
+ </request-map>
+ <request-map uri="QuickAddProductFeatures">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="QuickAddProductFeatures"/>
+ </request-map>
<request-map uri="EditFeature">
<security https="true" auth="true"/>
@@ -2060,6 +2070,7 @@
<view-map name="EditFeatureGroupAppls" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#EditFeatureGroupAppls"/>
<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="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"/>
Added: trunk/applications/product/webapp/catalog/feature/BulkAddFeature.ftl
===================================================================
--- trunk/applications/product/webapp/catalog/feature/BulkAddFeature.ftl 2006-02-02 22:21:01 UTC (rev 6668)
+++ trunk/applications/product/webapp/catalog/feature/BulkAddFeature.ftl 2006-02-02 22:37:05 UTC (rev 6669)
@@ -0,0 +1,56 @@
+<#--
+ * Copyright (c) 2003-2005 The Open For Business Project - www.ofbiz.org
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
+ * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+-->
+
+<div class="head1">${uiLabelMap.ProductAddProductFeatureInBulk} ${uiLabelMap.CommonFor} ${featureCategory.description}</div>
+
+<table border="1" cellpadding='2' cellspacing='0'>
+ <form method='POST' action='<@ofbizUrl>BulkAddProductFeatures</@ofbizUrl>' name="selectAllForm">
+ <input type="hidden" name="_useRowSubmit" value="Y">
+ <input type="hidden" name="_checkGlobalScope" value="N">
+ <input type="hidden" name="productFeatureCategoryId" value="${productFeatureCategoryId}">
+ <tr class='viewOneTR1'>
+ <td><div class="tabletext"><b>${uiLabelMap.CommonDescription}</b></div></td>
+ <td><div class="tabletext"><b>${uiLabelMap.ProductFeatureType}</b></div></td>
+ <td><div class="tabletext"><b>${uiLabelMap.ProductIdSeqNum}</b></div></td>
+ <td><div class="tabletext"><b>${uiLabelMap.ProductIdCode}</b></div></td>
+ <td><div class="tabletext"><b>${uiLabelMap.CommonAll}<input type="checkbox" name="selectAll" value="${uiLabelMap.CommonY}" onclick="javascript:toggleAll(this, 'selectAllForm');"></div></td>
+ </tr>
+<#list 0..featureNum-1 as feature>
+ <tr valign="middle" class='viewOneTR1'>
+ <td><input type="text" class='inputBox' size='15' name="description_o_${feature_index}"></td>
+ <td><select name='productFeatureTypeId_o_${feature_index}' size="1" class='selectBox'>
+ <#list productFeatureTypes as productFeatureType>
+ <option value='${productFeatureType.productFeatureTypeId}'>${productFeatureType.description?if_exists}</option>
+ </#list>
+ </select></td>
+ <input name='productFeatureCategoryId_o_${feature_index}' type="hidden" value="${productFeatureCategoryId}">
+ <td><input type="text" class='inputBox' size='5' name="defaultSequenceNum_o_${feature_index}""></td>
+ <td><input type="text" class='inputBox' size='5' name="idCode_o_${feature_index}"></td>
+ <td align="right"><input type="checkbox" name="_rowSubmit_o_${feature_index}" value="Y" onclick="javascript:checkToggle(this, 'selectAllForm');"></td>
+ </tr>
+
+</#list>
+<input type="hidden" name="_rowCount" value="${featureNum}">
+<tr><td colspan="11" align="center"><input type="submit" value='${uiLabelMap.CommonCreate}'/></td></tr>
+</form>
+</table>
Property changes on: trunk/applications/product/webapp/catalog/feature/BulkAddFeature.ftl
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ "Date Rev Author URL Id"
Name: svn:eol-style
+ native
Added: trunk/applications/product/webapp/catalog/feature/CreateFeatureCategory.ftl
===================================================================
--- trunk/applications/product/webapp/catalog/feature/CreateFeatureCategory.ftl 2006-02-02 22:21:01 UTC (rev 6668)
+++ trunk/applications/product/webapp/catalog/feature/CreateFeatureCategory.ftl 2006-02-02 22:37:05 UTC (rev 6669)
@@ -0,0 +1,46 @@
+<#--
+ * Copyright (c) 2003-2005 The Open For Business Project - www.ofbiz.org
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
+ * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+-->
+
+<form method="post" action="<@ofbizUrl>/CreateFeatureCategory</@ofbizUrl>" style="margin: 0;">
+ <div class="head2">${uiLabelMap.ProductCreateAProductFeatureCategory}:</div>
+ <br/>
+ <table>
+ <tr>
+ <td><div class="tabletext">${uiLabelMap.CommonDescription}:</div></td>
+ <td><input type="text" class="inputBox" size="30" name="description" value=""></td>
+ </tr>
+ <tr>
+ <td><div class="tabletext">${uiLabelMap.ProductParentCategory}:</div></td>
+ <td><select name="parentCategoryId" size="1" class="selectbox">
+ <option value=""> </option>
+ <#list productFeatureCategories as productFeatureCategory>
+ <option value="${productFeatureCategory.productFeatureCategoryId}">${productFeatureCategory.description?if_exists} [${productFeatureCategory.productFeatureCategoryId}]</option>
+ </#list>
+ </select></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit" value="${uiLabelMap.CommonCreate}"></td>
+ </tr>
+ </table>
+</form>
+<br/>
Property changes on: trunk/applications/product/webapp/catalog/feature/CreateFeatureCategory.ftl
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ "Date Rev Author URL Id"
Name: svn:eol-style
+ native
Modified: trunk/applications/product/webapp/catalog/feature/EditFeatureCategories.ftl
===================================================================
--- trunk/applications/product/webapp/catalog/feature/EditFeatureCategories.ftl 2006-02-02 22:21:01 UTC (rev 6668)
+++ trunk/applications/product/webapp/catalog/feature/EditFeatureCategories.ftl 2006-02-02 22:37:05 UTC (rev 6669)
@@ -74,26 +74,3 @@
</table>
<br/>
-<form method="post" action="<@ofbizUrl>CreateFeatureCategory</@ofbizUrl>" style="margin: 0;">
- <div class="head2">${uiLabelMap.ProductCreateAProductFeatureCategory}:</div>
- <br/>
- <table>
- <tr>
- <td><div class="tabletext">${uiLabelMap.CommonDescription}:</div></td>
- <td><input type="text" class="inputBox" size="30" name="description" value=""></td>
- </tr>
- <tr>
- <td><div class="tabletext">${uiLabelMap.ProductParentCategory}:</div></td>
- <td><select name="parentCategoryId" size="1" class="selectbox">
- <option value=""> </option>
- <#list productFeatureCategories as productFeatureCategory>
- <option value="${productFeatureCategory.productFeatureCategoryId}">${productFeatureCategory.description?if_exists} [${productFeatureCategory.productFeatureCategoryId}]</option>
- </#list>
- </select></td>
- </tr>
- <tr>
- <td colspan="2"><input type="submit" value="${uiLabelMap.CommonCreate}"></td>
- </tr>
- </table>
-</form>
-<br/>
Modified: trunk/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl
===================================================================
--- trunk/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl 2006-02-02 22:21:01 UTC (rev 6668)
+++ trunk/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl 2006-02-02 22:37:05 UTC (rev 6669)
@@ -27,7 +27,16 @@
<div class="head1">${uiLabelMap.ProductEditFeaturesForFeatureCategory} "${(curProductFeatureCategory.description)?if_exists}"</div>
<a href="<@ofbizUrl>EditFeature?productFeatureCategoryId=${productFeatureCategoryId?if_exists}</@ofbizUrl>" class="buttontext">[${uiLabelMap.ProductCreateNewFeature}]</a>
-
+<br>
+<form action="<@ofbizUrl>QuickAddProductFeatures</@ofbizUrl>" method="post">
+ <div class="tabletext">
+ ${uiLabelMap.CommonAdd}
+ <input class="inputBox" name="featureNum" value="1" size="3">
+ ${uiLabelMap.ProductAddFeatureToCategory}
+ <input class="smallSubmit" type="submit" value="${uiLabelMap.CommonCreate}">
+ </div>
+ <input type="hidden" name="productFeatureCategoryId" value="${productFeatureCategoryId}">
+</form>
<br/>
<p class="head2">${uiLabelMap.ProductProductFeatureMaintenance}</p>
<#if (listSize > 0)>
Modified: trunk/applications/product/widget/catalog/FeatureScreens.xml
===================================================================
--- trunk/applications/product/widget/catalog/FeatureScreens.xml 2006-02-02 22:21:01 UTC (rev 6668)
+++ trunk/applications/product/widget/catalog/FeatureScreens.xml 2006-02-02 22:37:05 UTC (rev 6669)
@@ -144,6 +144,9 @@
<decorator-screen name="CommonFeatureDecorator">
<decorator-section name="body">
<platform-specific>
+ <html><html-template location="component://product/webapp/catalog/feature/CreateFeatureCategory.ftl"/></html>
+ </platform-specific>
+ <platform-specific>
<html><html-template location="component://product/webapp/catalog/feature/EditFeatureCategories.ftl"/></html>
</platform-specific>
</decorator-section>
@@ -216,5 +219,27 @@
</widgets>
</section>
</screen>
+ <screen name="QuickAddProductFeatures">
+ <section>
+ <actions>
+ <set field="title" value="Bulk Feature Category Features"/>
+ <set field="titleProperty" value="ProductAddProductFeatureInBulk"/>
+ <set field="headerItem" value="featurecats"/>
+ <set field="featureNum" from-field="parameters.featureNum" type="Integer"/>
+ <set field="productFeatureCategoryId" from-field="parameters.productFeatureCategoryId"/>
+ <set field="tabButtonItem" value="FeatureCategory"/>
+ <script location="component://product/webapp/catalog/WEB-INF/actions/feature/QuickAddProductFeatures.bsh"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonFeatureDecorator">
+ <decorator-section name="body">
+ <platform-specific>
+ <html><html-template location="component://product/webapp/catalog/feature/BulkAddFeature.ftl"/></html>
+ </platform-specific>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
</screens>
More information about the Svn
mailing list