PlanetJava
Custom Search

java-ofbiz-scm
[Top] [All Lists]

svn commit: r1329038 - in /ofbiz/trunk/applications/product: script/org/

Subject: svn commit: r1329038 - in /ofbiz/trunk/applications/product: script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy
Date: Mon, 23 Apr 2012 02:39:27 -0000
Author: hansbak
Date: Mon Apr 23 02:39:26 2012
New Revision: 1329038
URL: http://svn.apache.org/viewvc?rev=1329038&view=rev
Log:
fix image sort order and spelling error
Modified:
ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml
ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy
Modified: 
ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml?rev=1329038&r1=1329037&r2=1329038&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml
 (original)
+++ 
ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml
 Mon Apr 23 02:39:26 2012
@@ -219,7 +219,7 @@ under the License.
         <set field="productContent.sequenceNum" 
from-field="parameters.sequenceNum" type="Long"/>
         <store-value value-field="productContent"/>
         <if-not-empty field="parameters.sequenceNum">
-            <script 
location="component://image_management/webapp/image_management/WEB-INF/actions/sortSequenceNum.groovy"/>
+            <script 
location="component://product/webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy"/>
             <set field="productContent.sequenceNum" 
from-field="parameters.sequenceNum" type="Long"/>
             <store-value value-field="productContent"/>
         </if-not-empty>
Modified: 
ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy?rev=1329038&r1=1329037&r2=1329038&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy
 (original)
+++ 
ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy
 Mon Apr 23 02:39:26 2012
@@ -20,14 +20,14 @@
 import org.ofbiz.entity.*
 import org.ofbiz.base.util.*
-allSequenceNums = delegator.findByAnd("ProductContent", 
["productId":parameters.productId, "productContentTypeId":"IMAGE"], 
["defaultSequenceNum"])
-nullSequenceNums = delegator.findByAnd("ProductContent", 
["productId":parameters.productId, "productContentTypeId":"IMAGE", 
"defaultSequenceNum":null])
+allSequenceNums = delegator.findByAnd("ProductContent", 
["productId":parameters.productId, "productContentTypeId":"IMAGE"], 
["sequenceNum"])
+nullSequenceNums = delegator.findByAnd("ProductContent", 
["productId":parameters.productId, "productContentTypeId":"IMAGE", 
"sequenceNum":null])
 productContents = allSequenceNums - nullSequenceNums
 def duplicate = 0
-if(parameters.defaultSequenceNum){
-    findExisted = delegator.findByAnd("ProductContent", 
["productId":parameters.productId, "productContentTypeId":"IMAGE", 
"defaultSequenceNum":(Long)parameters.defaultSequenceNum])
+if(parameters.sequenceNum){
+    findExisted = delegator.findByAnd("ProductContent", 
["productId":parameters.productId, "productContentTypeId":"IMAGE", 
"sequenceNum":(Long)parameters.sequenceNum])
     duplicate = findExisted.size()
 }
 if(duplicate > 1){
-    context.parameters.defaultSequenceNum = 
(Long)productContents.defaultSequenceNum[productContents.size()-1] + 1
+    context.parameters.sequenceNum = 
(Long)productContents.sequenceNum[productContents.size()-1] + 1
 }
msgmiddle
<Prev in Thread] Current Thread [Next in Thread>
  • svn commit: r1329038 - in /ofbiz/trunk/applications/product: script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy,
Current Sitemap | © 2012 planetjava | Contact | Privacy Policy