Author: hansbak
Date: Fri Apr 29 03:08:59 2011 New Revision: 1097674 URL: http://svn.apache.org/viewvc?rev=1097674&view=rev Log: Update imagemanagement: - move remove and rename function to manage page - create UI label and error UI label - improve remove function - improve rejected function - improve share image function Modified: ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml ofbiz/trunk/applications/product/config/ProductUiLabels.xml ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementEvents.xml ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementServices.xml ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/AddMultipleImages.ftl ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageCrop.ftl ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageGallery.ftl ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageShare.ftl ofbiz/trunk/applications/product/widget/catalog/CatalogMenus.xml ofbiz/trunk/applications/product/widget/catalog/ImageManagementForms.xml ofbiz/trunk/applications/product/widget/catalog/ImageManagementScreens.xml ofbiz/trunk/framework/common/config/CommonUiLabels.xml Modified: ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml?rev=1097674&r1=1097673&r2=1097674&view=diff ============================================================================== --- ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml (original) +++ ofbiz/trunk/applications/product/config/ProductErrorUiLabels.xml Fri Apr 29 03:08:59 2011 @@ -35,6 +35,10 @@ <value xml:lang="en">Product not found in the current category.</value> <value xml:lang="it">Prodotto non trovato nell'attuale categoria.</value> </property> + <property key="ImageManagementErrorRmoveDefaultImage"> + <value xml:lang="en">Unable to remove an image. It is the defualt image.</value> + <value xml:lang="th">à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸¥à¸à¸£à¸¹à¸à¸ าà¸</value> + </property> <property key="ScaleImage.error_occurs_during_writing"> <value xml:lang="en">An error occurs during writing</value> <value xml:lang="fr">Une erreur est survenue lors de l'écriture</value> Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=1097674&r1=1097673&r2=1097674&view=diff ============================================================================== --- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original) +++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Fri Apr 29 03:08:59 2011 @@ -23,18 +23,6 @@ <value xml:lang="de">Neues Merkmal für dieses Produkt erstellen</value> <value xml:lang="en">Add new Product Feature to current product</value> </property> - <property key="Approve"> - <value xml:lang="en">Approve</value> - <value xml:lang="th">ยืà¸à¸¢à¸±à¸</value> - </property> - <property key="Approved"> - <value xml:lang="en">Approved</value> - <value xml:lang="th">ยืà¸à¸¢à¸±à¸à¹à¸¥à¹à¸§</value> - </property> - <property key="AutomaticResize"> - <value xml:lang="en">Automatic Resize</value> - <value xml:lang="th">à¹à¸à¸¥à¸µà¹à¸¢à¸à¸à¸à¸²à¸à¸à¸±à¸à¹à¸à¸¡à¸±à¸à¸´</value> - </property> <property key="CatalogWebAnalytics"> <value xml:lang="en">Web Analytics</value> <value xml:lang="it">Analisi Web</value> @@ -50,18 +38,6 @@ <value xml:lang="it">Tipi di analisi Web</value> <value xml:lang="zh_TW">網ç«åæåæ </value> </property> - <property key="ChooseImageToReplace"> - <value xml:lang="en">Choose Image to Replace</value> - <value xml:lang="th">à¹à¸¥à¸·à¸à¸à¸ าà¸à¸ªà¸³à¸«à¸£à¸±à¸à¹à¸à¸à¸à¸µà¹</value> - </property> - <property key="ChooseProductID"> - <value xml:lang="en">Choose Product ID</value> - <value xml:lang="th">à¹à¸¥à¸·à¸à¸à¸£à¸«à¸±à¸ªà¸ªà¸´à¸à¸à¹à¸²</value> - </property> - <property key="ChooseReplacementImage"> - <value xml:lang="en">Choose Replacement Image</value> - <value xml:lang="th">à¹à¸¥à¸·à¸à¸à¸ าà¸à¸à¸µà¹à¸à¸°à¹à¸à¸à¸à¸µà¹</value> - </property> <property key="CreateNewProductFeatureType"> <value xml:lang="de">Neuen Merkmaltyp erstellen</value> <value xml:lang="en">Create New Product Feature Type</value> @@ -5795,59 +5771,188 @@ <value xml:lang="zh">人工æå¡å¥½çæ åç±»åæ è¯</value> <value xml:lang="zh_TW">å·¥é æåè¦ç¯é¡åID</value> </property> - <property key="Gallery"> - <value xml:lang="de">Gallerie</value> - <value xml:lang="en">Gallery</value> - <value xml:lang="th">à¹à¸à¸¥à¸¥à¸à¸£à¸µà¹</value> - </property> - <property key="ImageApprove"> - <value xml:lang="de">Bestätigen</value> - <value xml:lang="en">Approve</value> - <value xml:lang="th">ยืà¸à¸¢à¸±à¸à¸£à¸¹à¸à¸ าà¸</value> - </property> - <property key="ImageCropping"> - <value xml:lang="en">Image Cropping</value> - <value xml:lang="th">à¸à¸±à¸à¸ าà¸</value> - </property> - <property key="ImageFrames"> - <value xml:lang="en">Image Frames</value> - <value xml:lang="th">à¹à¸à¸£à¸¡</value> - </property> <property key="ImageManagement"> <value xml:lang="en">Image Management</value> <value xml:lang="th">à¸à¸±à¸à¸à¸²à¸£à¸£à¸¹à¸à¸ าà¸</value> </property> + <property key="ImageManagementAction"> + <value xml:lang="en">Action</value> + </property> + <property key="ImageManagementAltForumCode"> + <value xml:lang="en">Alt Forum Code</value> + </property> + <property key="ImageManagementAltForumThumbnail"> + <value xml:lang="en">Alt Forum Thumbnail</value> + </property> <property key="ImageManagementApplication"> <value xml:lang="en">Image Management Application</value> <value xml:lang="th">à¹à¸à¸£à¹à¸à¸£à¸¡à¸à¸±à¸à¸à¸²à¸£à¸£à¸¹à¸à¸ าà¸</value> </property> - <property key="ImageRecentlyApproved"> - <value xml:lang="en">Recently Approved</value> - <value xml:lang="th">รูà¸à¸ าà¸à¸¢à¸·à¸à¸¢à¸±à¸à¸¥à¹à¸²à¸ªà¸¸à¸</value> + <property key="ImageManamentApprove"> + <value xml:lang="de">Bestätigen</value> + <value xml:lang="en">Approve</value> + <value xml:lang="th">à¸à¸à¸¸à¸¡à¸±à¸à¸´</value> + </property> + <property key="ImageManamentApprovedDate"> + <value xml:lang="en">Approved Date</value> + <value xml:lang="th">วัà¸à¸à¸µà¹à¸à¸à¸¸à¸¡à¸±à¸à¸´</value> + </property> + <property key="ImageManagementCaption"> + <value xml:lang="en">Caption</value> + <value xml:lang="th">à¸à¸³à¸à¸à¸´à¸à¸²à¸¢à¸ าà¸</value> + </property> + <property key="ImageManagementChooseExistFrame"> + <value xml:lang="en">Choose Exist Frame</value> + <value xml:lang="th">à¹à¸¥à¸·à¸à¸à¸à¸£à¸à¸à¸£à¸¹à¸à¸ าà¸à¸à¸µà¹à¸¡à¸µà¸à¸¢à¸¹à¹</value> + </property> + <property key="ImageManagementChooseImageToReplace"> + <value xml:lang="en">Choose Image to Replace</value> + <value xml:lang="th">à¹à¸¥à¸·à¸à¸à¸£à¸¹à¸à¸ าà¸à¸ªà¸³à¸«à¸£à¸±à¸à¹à¸à¸à¸à¸µà¹</value> + </property> + <property key="ImageManagementChooseProductID"> + <value xml:lang="en">Choose Product ID</value> + <value xml:lang="th">à¹à¸¥à¸·à¸à¸à¸£à¸«à¸±à¸ªà¸ªà¸´à¸à¸à¹à¸²</value> + </property> + <property key="ImageManagementChooseReplacementImage"> + <value xml:lang="en">Choose Replacement Image</value> + <value xml:lang="th">à¹à¸¥à¸·à¸à¸à¸£à¸¹à¸à¸ าà¸à¸à¸µà¹à¸à¸°à¹à¸à¸à¸à¸µà¹</value> + </property> + <property key="ImageManagementCrop"> + <value xml:lang="en">Crop</value> + <value xml:lang="th">à¸à¸±à¸à¸£à¸¹à¸à¸ าà¸</value> + </property> + <property key="ImageManagementDefaultImage"> + <value xml:lang="en">Default Image</value> + </property> + <property key="ImageManagementDirectLink"> + <value xml:lang="en">Direct Link</value> + <value xml:lang="th">à¹à¸à¸·à¹à¸à¸¡à¹à¸¢à¸à¹à¸à¸¢à¸à¸£à¸</value> + </property> + <property key="ImageManagementFrame"> + <value xml:lang="en">Frame</value> + <value xml:lang="th">à¸à¸£à¸à¸à¸£à¸¹à¸à¸ าà¸</value> + </property> + <property key="ImageManagementForumCode"> + <value xml:lang="en">Forum Code</value> + <value xml:lang="th">รหัสà¸à¸à¸£à¸±à¹à¸¡</value> + </property> + <property key="ImageManagementForumThumbnail"> + <value xml:lang="en">Forum Thumbnail</value> + <value xml:lang="th">รูà¸à¸ าà¸à¸¢à¹à¸à¸à¸à¸£à¸±à¹à¸¡</value> + </property> + <property key="ImageManagementGallery"> + <value xml:lang="de">Gallerie</value> + <value xml:lang="en">Gallery</value> + <value xml:lang="th">à¹à¸à¸¥à¸¥à¸à¸£à¸µà¹</value> </property> - <property key="ImageRejected"> - <value xml:lang="en">Rejected</value> - <value xml:lang="th">à¸à¸à¸´à¹à¸ªà¸à¸£à¸¹à¸à¸ าà¸</value> + <property key="ImageManagementHTMLCode"> + <value xml:lang="en">HTML Code</value> </property> - <property key="ImageRotating"> + <property key="ImageManagementHTMLThumbnail"> + <value xml:lang="en">HTML Thumbnail</value> + </property> + <property key="ImageManagementImageCropping"> + <value xml:lang="en">Image Cropping</value> + <value xml:lang="th">à¸à¸±à¸à¸£à¸¹à¸à¸ าà¸</value> + </property> + <property key="ImageManagementImageFrames"> + <value xml:lang="en">Image Frame</value> + <value xml:lang="th">à¸à¸£à¸à¸à¸£à¸¹à¸à¸ าà¸</value> + </property> + <property key="ImageManagementImageHeight"> + <value xml:lang="en">Image Height</value> + <value xml:lang="th">à¸à¸§à¸²à¸¡à¸ªà¸¹à¸à¸à¸à¸à¸£à¸¹à¸à¸ าà¸</value> + </property> + <property key="ImageManagementImageName"> + <value xml:lang="en">Image Name</value> + <value xml:lang="th">à¸à¸·à¹à¸à¸£à¸¹à¸à¸ าà¸</value> + </property> + <property key="ImageManagementImageRotating"> <value xml:lang="en">Image Rotating</value> - <value xml:lang="th">หมุà¸à¸ าà¸</value> + <value xml:lang="th">หมุà¸à¸£à¸¹à¸à¸ าà¸</value> </property> - <property key="ImageUpload"> - <value xml:lang="en">Upload</value> - <value xml:lang="th">à¸à¸±à¸à¹à¸«à¸¥à¸à¸£à¸¹à¸</value> + <property key="ImageManagementImageToReplace"> + <value xml:lang="en">Image to Replace</value> + <value xml:lang="th">ภาà¸à¸à¸µà¹à¸à¸°à¹à¸à¸¥à¸µà¹à¸¢à¸</value> </property> - <property key="ImageUploadList"> + <property key="ImageManagementImageUploadList"> <value xml:lang="en">Image Upload List</value> <value xml:lang="th">รูà¸à¸ าà¸à¸à¸µà¹à¸à¸±à¸à¹à¸«à¸¥à¸</value> </property> - <property key="ImageWatermarking"> + <property key="ImageManagementImageWatermarking"> <value xml:lang="en">Image Watermarking</value> + <value xml:lang="th">ลายà¸à¹à¸³à¸£à¸¹à¸à¸ าà¸</value> + </property> + <property key="ImageManagementImageWidth"> + <value xml:lang="en">Image Width</value> + <value xml:lang="th">à¸à¸§à¸²à¸¡à¸à¸§à¹à¸²à¸à¸à¸à¸à¸£à¸¹à¸à¸ าà¸</value> + </property> + <property key="ImageManagementOpacity"> + <value xml:lang="en">Opacity</value> + <value xml:lang="th">à¸à¸§à¸²à¸¡à¸à¸¶à¸à¹à¸ªà¸</value> + </property> + <property key="ImageManagementRecentlyApproved"> + <value xml:lang="en">Recently Approved</value> + <value xml:lang="th">à¸à¸à¸¸à¸¡à¸±à¸à¸´à¸¥à¹à¸²à¸ªà¸¸à¸</value> + </property> + <property key="ImageManagementRejectedBy"> + <value xml:lang="en">Rejected By</value> + <value xml:lang="th">à¸à¸¹à¹à¹à¸¡à¹à¸¢à¸à¸¡à¸£à¸±à¸</value> + </property> + <property key="ImageManagementRejectedReason"> + <value xml:lang="en">Rejected Reason</value> + <value xml:lang="th">à¹à¸«à¸à¸¸à¸à¸¥à¸à¸µà¹à¹à¸¡à¹à¸¢à¸à¸¡à¸£à¸±à¸</value> + </property> + <property key="ImageManagementReplace"> + <value xml:lang="en">Replace</value> + <value xml:lang="th">à¹à¸à¸à¸à¸µà¹</value> + </property> + <property key="ImageManagementReplacementImage"> + <value xml:lang="en">Replacement Image</value> + <value xml:lang="th">à¹à¸à¸¥à¸µà¹à¸¢à¸à¸£à¸¹à¸à¸ าà¸</value> + </property> + <property key="ImageManagementResize"> + <value xml:lang="en">Resize</value> + <value xml:lang="th">à¹à¸à¸¥à¸µà¹à¸¢à¸à¸à¸à¸²à¸</value> + </property> + <property key="ImageManagementRotate"> + <value xml:lang="en">Rotate</value> + <value xml:lang="th">หมุà¸à¸£à¸¹à¸à¸ าà¸</value> + </property> + <property key="ImageManagementSetDefault"> + <value xml:lang="en">Set Default</value> + </property> + <property key="ImageManagementShare"> + <value xml:lang="en">Share</value> + <value xml:lang="th">à¹à¸à¹à¸à¸à¸±à¸</value> + </property> + <property key="ImageManagementShareImage"> + <value xml:lang="en">Share Image</value> + <value xml:lang="th">à¹à¸à¹à¸à¸à¸±à¸à¸£à¸¹à¸à¸ าà¸</value> + </property> + <property key="ImageManagementSortOrder"> + <value xml:lang="en">Sort Order</value> + <value xml:lang="th">à¹à¸£à¸µà¸¢à¸à¸¥à¸³à¸à¸±à¸</value> + </property> + <property key="ImageManagementTextColor"> + <value xml:lang="en">Text Color</value> + <value xml:lang="th">สีà¸à¸±à¸§à¸à¸±à¸à¸©à¸£</value> + </property> + <property key="ImageManagementTextSize"> + <value xml:lang="en">Text Size</value> + <value xml:lang="th">à¸à¸à¸²à¸à¸à¸±à¸§à¸à¸±à¸à¸©à¸£</value> + </property> + <property key="ImageManagementUploadNewFrame"> + <value xml:lang="en">Upload New Frame</value> + <value xml:lang="th">à¸à¸±à¸à¹à¸«à¸¥à¸à¸à¸£à¸à¸à¸£à¸¹à¸à¸ าà¸à¹à¸«à¸¡à¹</value> + </property> + <property key="ImageManagementWatermark"> + <value xml:lang="en">Watermark</value> <value xml:lang="th">ลายà¸à¹à¸³</value> </property> - <property key="Manage"> - <value xml:lang="en">Manage</value> - <value xml:lang="th">à¸à¸±à¸à¸à¸²à¸£</value> + <property key="ImageManagementWelcomeMessage"> + <value xml:lang="en">Welcome to the Image Management</value> + <value xml:lang="th">ยิà¸à¸à¸µà¸à¹à¸à¸à¸£à¸±à¸à¸ªà¸¹à¹à¸£à¸à¸à¸à¸²à¸£à¸à¸±à¸à¸à¸²à¸£à¸£à¸¹à¸à¸ าà¸</value> </property> <property key="MetaDescription"> <value xml:lang="en">Meta Description</value> @@ -22982,6 +23087,10 @@ <value xml:lang="zh">å·</value> <value xml:lang="zh_TW">å·</value> </property> + <property key="ProductStatus"> + <value xml:lang="en">Product Status</value> + <value xml:lang="th">สà¸à¸²à¸à¸°à¸ªà¸´à¸à¸à¹à¸²</value> + </property> <property key="ProductStatusId"> <value xml:lang="de">Status ID</value> <value xml:lang="en">Status Id</value> @@ -24933,40 +25042,8 @@ <value xml:lang="zh">ä½ æç´¢</value> <value xml:lang="zh_TW">ä½ ææç´¢ç</value> </property> - <property key="RecentlyApproved"> - <value xml:lang="en">Recently Approved</value> - <value xml:lang="th">à¹à¸à¸¥à¸¥à¸à¸£à¸µà¹</value> - </property> - <property key="Rejected"> - <value xml:lang="en">Rejected</value> - <value xml:lang="th">à¸à¸à¸´à¹à¸ªà¸</value> - </property> - <property key="Rename"> - <value xml:lang="en">Rename</value> - <value xml:lang="th">à¹à¸à¸¥à¸µà¹à¸¢à¸à¸à¸·à¹à¸</value> - </property> - <property key="Replace"> - <value xml:lang="en">Replace</value> - <value xml:lang="th">à¹à¸à¸à¸à¸µà¹</value> - </property> - <property key="Resize"> - <value xml:lang="en">Resize</value> - <value xml:lang="th">à¹à¸à¸¥à¸µà¹à¸¢à¸à¸à¸à¸²à¸</value> - </property> - <property key="ShareImage"> - <value xml:lang="en">Share Image</value> - <value xml:lang="th">à¹à¸à¹à¸à¸à¸±à¸à¸ าà¸</value> - </property> - <property key="Upload"> - <value xml:lang="en">Upload</value> - <value xml:lang="th">à¸à¸±à¸à¹à¸«à¸¥à¸</value> - </property> <property key="UseCartQuantity"> <value xml:lang="en">Use cart quantity</value> <value xml:lang="fr">Utiliser la quantité du panier</value> </property> - <property key="WelcomeMessage"> - <value xml:lang="en">Welcome to the Image Management</value> - <value xml:lang="th">ยิà¸à¸à¸µà¸à¹à¸à¸à¸£à¸±à¸à¸ªà¸¹à¹à¸£à¸à¸à¸à¸²à¸£à¸à¸±à¸à¸à¸²à¸£à¸£à¸¹à¸à¸ าà¸</value> - </property> </resource> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementEvents.xml?rev=1097674&r1=1097673&r2=1097674&view=diff ============================================================================== --- ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementEvents.xml (original) +++ ofbiz/trunk/applications/product/script/org/ofbiz/product/imagemanagement/ImageManagementEvents.xml Fri Apr 29 03:08:59 2011 @@ -46,14 +46,13 @@ under the License. </entity-and> <if-not-empty field="productContentAndInfos"> <first-from-list entry="productContentAndInfo" list="productContentAndInfos"/> - <script location="component://product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy"/> - <entity-one value-field="product" entity-name="Product"> + <!--<entity-one value-field="product" entity-name="Product"> <field-map field-name="productId" from-field="parameters.productId"/> </entity-one> <set field="product.originalImageUrl" from-field="productContentAndInfo.drObjectInfo"/> - <store-value value-field="product"/> + <store-value value-field="product"/>--> </if-not-empty> </simple-method> </simple-methods> 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=1097674&r1=1097673&r2=1097674&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 Fri Apr 29 03:08:59 2011 @@ -127,27 +127,41 @@ under the License. </simple-method> <simple-method method-name="removeProductContentAndImageFile" short-description="Remove Content From Product and Image File"> - <entity-and list="contentAssocs" entity-name="ContentAssoc"> + <entity-and entity-name="ProductContent" list="checkDefaultImage"> + <field-map field-name="productId" from-field="parameters.productId"/> <field-map field-name="contentId" from-field="parameters.contentId"/> - <field-map field-name="contentAssocTypeId" value="IMAGE_THUMBNAIL"/> + <field-map field-name="productContentTypeId" value="DEFAULT_IMAGE"/> </entity-and> - <if-not-empty field="contentAssocs"> - <iterate entry="contentAssoc" list="contentAssocs"> - <remove-value value-field="contentAssoc"/> - - <set field="removeContent.contentId" from-field="contentAssoc.contentIdTo"/> - <set field="removeContent.productId" from-field="parameters.productId"/> - <call-service service-name="removeProductContentForImageManagement" in-map-name="removeContent"/> - </iterate> - </if-not-empty> - - <make-value value-field="lookupPKMap" entity-name="ProductContent"/> - <set-pk-fields map="parameters" value-field="lookupPKMap"/> - <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/> - <remove-value value-field="lookedUpValue"/> - <set field="removeContent.contentId" from-field="parameters.contentId"/> - <set field="removeContent.productId" from-field="parameters.productId"/> - <call-service service-name="removeProductContentForImageManagement" in-map-name="removeContent"/> + <if-empty field="checkDefaultImage"> + <entity-and list="contentAssocs" entity-name="ContentAssoc"> + <field-map field-name="contentId" from-field="parameters.contentId"/> + <field-map field-name="contentAssocTypeId" value="IMAGE_THUMBNAIL"/> + </entity-and> + <if-not-empty field="contentAssocs"> + <iterate entry="contentAssoc" list="contentAssocs"> + <remove-value value-field="contentAssoc"/> + + <set field="removeContent.contentId" from-field="contentAssoc.contentIdTo"/> + <set field="removeContent.productId" from-field="parameters.productId"/> + <call-service service-name="removeProductContentForImageManagement" in-map-name="removeContent"/> + </iterate> + </if-not-empty> + + <make-value value-field="lookupPKMap" entity-name="ProductContent"/> + <set-pk-fields map="parameters" value-field="lookupPKMap"/> + <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/> + <remove-value value-field="lookedUpValue"/> + <set field="removeContent.contentId" from-field="parameters.contentId"/> + <set field="removeContent.productId" from-field="parameters.productId"/> + <call-service service-name="removeProductContentForImageManagement" in-map-name="removeContent"/> + <else> + <add-error> + <fail-property resource="ProductErrorUiLabels" property="ImageManagementErrorRmoveDefaultImage"/> + </add-error> + <log level="error" message="Cannot remove image contentId ${parameters.contentId}"/> + <check-errors/> + </else> + </if-empty> </simple-method> <simple-method method-name="removeProductContentForImageManagement" short-description="Remove Content From Product"> 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=1097674&r1=1097673&r2=1097674&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml Fri Apr 29 03:08:59 2011 @@ -2807,8 +2807,8 @@ under the License. <request-map uri="removeImage"> <security https="true" auth="true"/> <event type="service" path="" invoke="removeProductContentAndImageFile"/> - <response name="success" type="view" value="ListImageRemove"/> - <response name="error" type="view" value="ListImageRemove"/> + <response name="success" type="view" value="ListImageManage"/> + <response name="error" type="view" value="ListImageManage"/> </request-map> <request-map uri="createWatermarkImage"> <security https="true" auth="true"/> @@ -2897,7 +2897,7 @@ under the License. <security https="true" auth="true"/> <event type="groovy" path="component://product/webapp/catalog/WEB-INF/actions/imagemanagement/" invoke="checkRejected.groovy"/> <response name="approved" type="view" value="ImageApprove"/> - <response name="rejected" type="view" value="ImageRejected"/> + <response name="rejected" type="view" value="ListPeopleRejected"/> </request-map> <request-map uri="ListImageReplace"> <security https="true" auth="true"/> @@ -2965,14 +2965,6 @@ under the License. <response name="success" type="view" value="ListImageManage"/> <response name="error" type="view" value="ImageWatermarking"/> </request-map> - <request-map uri="ImageRemove"> - <security https="true" auth="true"/> - <response name="success" type="view" value="ImageRemove"/> - </request-map> - <request-map uri="ListImageRemove"> - <security https="true" auth="true"/> - <response name="success" type="view" value="ListImageRemove"/> - </request-map> <request-map uri="ImageResize"> <security https="true" auth="true"/> <response name="success" type="view" value="ImageResize"/> @@ -2989,19 +2981,11 @@ under the License. <response name="success" type="view" value="ImageResize"/> <response name="error" type="view" value="ImageResize"/> </request-map> - <request-map uri="ImageRename"> - <security https="true" auth="true"/> - <response name="success" type="view" value="ImageRename"/> - </request-map> - <request-map uri="ListImageRename"> - <security https="true" auth="true"/> - <response name="success" type="view" value="ListImageRename"/> - </request-map> <request-map uri="renameImage"> <security https="true" auth="true"/> <event type="service" path="" invoke="renameImage"/> - <response name="success" type="view" value="ListImageRename"/> - <response name="error" type="view" value="ListImageRename"/> + <response name="success" type="view" value="ListImageManage"/> + <response name="error" type="view" value="ListImageManage"/> </request-map> <!-- ================ Lookup Requests ================= --> @@ -3275,10 +3259,6 @@ under the License. <view-map name="AutomaticResize" type="screen" page="component://product/widget/catalog/ImageManagementScreens.xml#AutomaticResize"/> <view-map name="ListAutomaticResize" type="screen" page="component://product/widget/catalog/ImageManagementScreens.xml#ListAutomaticResize"/> <view-map name="LookupImageFrame" type="screen" page="component://product/widget/catalog/ImageManagementScreens.xml#LookupImageFrame"/> - <view-map name="ImageRemove" type="screen" page="component://product/widget/catalog/ImageManagementScreens.xml#ImageRemove"/> - <view-map name="ListImageRemove" type="screen" page="component://product/widget/catalog/ImageManagementScreens.xml#ListImageRemove"/> <view-map name="ImageResize" type="screen" page="component://product/widget/catalog/ImageManagementScreens.xml#ImageResize"/> - <view-map name="ImageRename" type="screen" page="component://product/widget/catalog/ImageManagementScreens.xml#ImageRename"/> - <view-map name="ListImageRename" type="screen" page="component://product/widget/catalog/ImageManagementScreens.xml#ListImageRename"/> <!-- end of view mappings --> </site-conf> Modified: ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/AddMultipleImages.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/AddMultipleImages.ftl?rev=1097674&r1=1097673&r2=1097674&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/AddMultipleImages.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/AddMultipleImages.ftl Fri Apr 29 03:08:59 2011 @@ -16,9 +16,10 @@ KIND, either express or implied. See th specific language governing permissions and limitations under the License. --> + <form id="addMultipleImagesForm" name="addMultipleImagesForm" method="post" action="<@ofbizUrl>addImageForProduct</@ofbizUrl>" enctype="multipart/form-data"> <br/> -<div class="label">Product ID / SKU <@htmlTemplate.lookupField name="productId" id="productId" formName="addMultipleImagesForm" fieldFormName="LookupProduct"/></div> +<div class="label">${uiLabelMap.ProductProductId} <@htmlTemplate.lookupField name="productId" id="productId" formName="addMultipleImagesForm" fieldFormName="LookupProduct"/></div> <br/> <br/> <table> Modified: ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageCrop.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageCrop.ftl?rev=1097674&r1=1097673&r2=1097674&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageCrop.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageCrop.ftl Fri Apr 29 03:08:59 2011 @@ -35,9 +35,9 @@ var imageName = jQuery('#ImageCropping_i var productId = jQuery('#ImageCropping_productId').val(); if (imageName != "") { - jQuery('#ImageCropping tr').append("<td class='label'><span>Preview</span></td><td><div style='width:100px;height:100px;overflow:hidden;'><img src='"+imageUrl+"' id='preview' /></div></td>"); - jQuery('#ImageCropping tbody').append("<tr><td><input type='submit' value='Crop' name='submitButton' class='smallSubmit'/></td></tr>"); - jQuery('#ImageCropping tbody').append("<tr><td><a class='buttontext' title=' ' href='/catalog/control/ListImageManage?productId="+productId+"'>Cancel</a></td></tr>"); + jQuery('#ImageCropping tr').append("<td class='label'><span>${uiLabelMap.CommonPreview}</span></td><td><div style='width:100px;height:100px;overflow:hidden;'><img src='"+imageUrl+"' id='preview' /></div></td>"); + jQuery('#ImageCropping tbody').append("<tr><td><input type='submit' value='${uiLabelMap.CommonSubmit}' name='submitButton' class='smallSubmit'/></td></tr>"); + jQuery('#ImageCropping tbody').append("<tr><td><a class='buttontext' title=' ' href='/catalog/control/ListImageManage?productId="+productId+"'>${uiLabelMap.CommonCancel}</a></td></tr>"); } function showPreview(coords){ Modified: ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageGallery.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageGallery.ftl?rev=1097674&r1=1097673&r2=1097674&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageGallery.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageGallery.ftl Fri Apr 29 03:08:59 2011 @@ -36,8 +36,8 @@ under the License. <td align="center"><a href="<@ofbizContentUrl>${(productImage.productImage)?if_exists}</@ofbizContentUrl>" target="_blank"><img src="<@ofbizContentUrl>${(productImage.productImageThumb)?if_exists}</@ofbizContentUrl>" vspace="5" hspace="5" alt=""/></a></td> </tr> <tr valign="middle"> - <#-- <td align="center"><a href="javascript:lookup_popup2('ImageShare?contentId=${productContentAndInfo.contentId}&dataResourceId=${productContentAndInfo.dataResourceId}&seoUrl=/catalog/images/${seoUrl}-${product.productId}/${seoUrl}-${contentName}','' ,500,500);" class="buttontext">Share</a></td> --> - <td align="center"><a href="javascript:lookup_popup2('ImageShare?contentId=${productImage.contentId}&dataResourceId=${productImage.dataResourceId}','' ,500,500);" class="buttontext">Share</a></td> + <#-- <td align="center"><a href="javascript:lookup_popup2('ImageShare?contentId=${productContentAndInfo.contentId}&dataResourceId=${productContentAndInfo.dataResourceId}&seoUrl=/catalog/images/${seoUrl}-${product.productId}/${seoUrl}-${contentName}','' ,500,500);" class="buttontext">${uiLabelMap.ImageManagementShare}</a></td> --> + <td align="center"><a href="javascript:lookup_popup2('ImageShare?contentId=${productImage.contentId}&dataResourceId=${productImage.dataResourceId}','' ,500,500);" class="buttontext">${uiLabelMap.ImageManagementShare}</a></td> </tr> <br/> </tbody> @@ -55,8 +55,8 @@ under the License. <td align="center"><a href="<@ofbizContentUrl>${(productImage.productImage)?if_exists}</@ofbizContentUrl>" target="_blank"><img src="<@ofbizContentUrl>${(productImage.productImageThumb)?if_exists}</@ofbizContentUrl>" vspace="5" hspace="5" alt=""/></a></td> </tr> <tr valign="middle"> - <#-- <td align="center"><a href="javascript:lookup_popup2('ImageShare?contentId=${productContentAndInfo.contentId}&dataResourceId=${productContentAndInfo.dataResourceId}&seoUrl=/catalog/images/${seoUrl}-${product.productId}/${seoUrl}-${contentName}','' ,500,500);" class="buttontext">Share</a></td> --> - <td align="center"><a href="javascript:lookup_popup2('ImageShare?contentId=${productImage.contentId}&dataResourceId=${productImage.dataResourceId}','' ,500,500);" class="buttontext">Share</a></td> + <#-- <td align="center"><a href="javascript:lookup_popup2('ImageShare?contentId=${productContentAndInfo.contentId}&dataResourceId=${productContentAndInfo.dataResourceId}&seoUrl=/catalog/images/${seoUrl}-${product.productId}/${seoUrl}-${contentName}','' ,500,500);" class="buttontext">${uiLabelMap.ImageManagementShare}</a></td> --> + <td align="center"><a href="javascript:lookup_popup2('ImageShare?contentId=${productImage.contentId}&dataResourceId=${productImage.dataResourceId}','' ,500,500);" class="buttontext">${uiLabelMap.ImageManagementShare}</a></td> </tr> <br/> </tbody> Modified: ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageShare.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageShare.ftl?rev=1097674&r1=1097673&r2=1097674&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageShare.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageShare.ftl Fri Apr 29 03:08:59 2011 @@ -31,10 +31,12 @@ $(document).ready(function(){ form.altForumCode.setAttribute('readOnly','readonly'); if (contentURL != "") { + var pathImageUrlEcommerce = contentURL + imageUrl; var pathImageUrl = contentURL + imageUrl; var pathImageThumbnailUrl = contentURL + imageThumbUrl; } else { + var pathImageUrlEcommerce = "http://localhost:8080" + imageUrl; var pathImageUrl = "http://" + host + imageUrl; var pathImageThumbnailUrl = "http://"+ host + imageThumbUrl; } @@ -42,7 +44,7 @@ $(document).ready(function(){ if (form.contentId.value != "") { pathImageUrl = $('#ImageShare_direct').html(pathImageUrl).text(); pathImageThumbnailUrl = $('#ImageShare_direct').html(pathImageThumbnailUrl).text(); - form.link.value = "http://" + host + form.seoURL.value; + form.link.value = pathImageUrlEcommerce; form.direct.value = pathImageUrl; form.html.value = "<a target='_blank' title='Image' href='" + pathImageUrl + "'><img src='" + pathImageUrl + "' border='0'/></a>Uploaded with <a target='_blank' href='http://images.ofbiz.com'>ofbiz.com</a>"; form.forumCode.value = "[URL=" + pathImageUrl + "/][IMG]" + pathImageUrl + "[/IMG][/URL]Uploaded with [URL=http://images.ofbiz.com]ofbiz.com[/URL]"; Modified: ofbiz/trunk/applications/product/widget/catalog/CatalogMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/CatalogMenus.xml?rev=1097674&r1=1097673&r2=1097674&view=diff ============================================================================== --- ofbiz/trunk/applications/product/widget/catalog/CatalogMenus.xml (original) +++ ofbiz/trunk/applications/product/widget/catalog/CatalogMenus.xml Fri Apr 29 03:08:59 2011 @@ -476,18 +476,18 @@ under the License. </menu> <menu name="ImageManagementTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" selected-menuitem-context-field-name="userTabButtonImage"> - <menu-item name="main" title="${uiLabelMap.Main}"> + <menu-item name="main" title="${uiLabelMap.CommonMain}"> <condition> <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/> </condition> <link target="Imagemanagement"/> </menu-item> - <menu-item name="ImageGallery" title="${uiLabelMap.Gallery}"> + <menu-item name="ImageGallery" title="${uiLabelMap.ImageManagementGallery}"> <link target="ListImageGallery"> <parameter param-name="productId"/> </link> </menu-item> - <menu-item name="ImageUpload" title="${uiLabelMap.ImageUpload}"> + <menu-item name="ImageUpload" title="${uiLabelMap.CommonUpload}"> <condition> <or> <if-has-permission permission="IMAGE_MANAGEMENT_UPLOAD"/> @@ -496,7 +496,7 @@ under the License. </condition> <link target="ImageUpload"/> </menu-item> - <menu-item name="ImageManage" title="${uiLabelMap.Manage}"> + <menu-item name="ImageManage" title="${uiLabelMap.CommonManage}"> <condition> <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/> </condition> @@ -504,7 +504,7 @@ under the License. <parameter param-name="productId"/> </link> </menu-item> - <menu-item name="ImageApprove" title="${uiLabelMap.ImageApprove}"> + <menu-item name="ImageApprove" title="${uiLabelMap.ImageManamentApprove}"> <condition> <or> <if-has-permission permission="IMAGE_MANAGEMENT_APPROVE"/> @@ -513,7 +513,7 @@ under the License. </condition> <link target="ImageApprove"/> </menu-item> - <menu-item name="ImageRejected" title="${uiLabelMap.ImageRejected}"> + <menu-item name="ImageRejected" title="${uiLabelMap.CommonRejected}"> <condition> <or> <if-has-permission permission="IMAGE_MANAGEMENT_APPROVE"/> @@ -522,7 +522,7 @@ under the License. </condition> <link target="ImageRejected"/> </menu-item> - <menu-item name="ImageRecentlyApproved" title="${uiLabelMap.ImageRecentlyApproved}"> + <menu-item name="ImageRecentlyApproved" title="${uiLabelMap.ImageManagementRecentlyApproved}"> <condition> <or> <if-has-permission permission="IMAGE_MANAGEMENT_APPROVE"/> @@ -531,7 +531,7 @@ under the License. </condition> <link target="ImageRecentlyApproved"/> </menu-item> - <menu-item name="ImageReplace" title="${uiLabelMap.Replace}"> + <menu-item name="ImageReplace" title="${uiLabelMap.ImageManagementReplace}"> <condition> <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/> </condition> @@ -539,15 +539,7 @@ under the License. <parameter param-name="productId"/> </link> </menu-item> - <menu-item name="ImageRename" title="${uiLabelMap.Rename}"> - <condition> - <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/> - </condition> - <link target="ListImageRename"> - <parameter param-name="productId"/> - </link> - </menu-item> - <menu-item name="ImageResize" title="${uiLabelMap.Resize}"> + <menu-item name="ImageResize" title="${uiLabelMap.ImageManagementResize}"> <condition> <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/> </condition> @@ -555,13 +547,5 @@ under the License. <parameter param-name="productId"/> </link> </menu-item> - <menu-item name="ImageRemove" title="${uiLabelMap.Remove}"> - <condition> - <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/> - </condition> - <link target="ListImageRemove"> - <parameter param-name="productId"/> - </link> - </menu-item> </menu> </menus> |
Free forum by Nabble | Edit this page |