You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2011/02/23 08:06:08 UTC
svn commit: r1073621 [2/2] - in /ofbiz/trunk/applications/product: config/
script/org/ofbiz/product/imagemanagement/ servicedef/
src/org/ofbiz/product/imagemanagement/ webapp/catalog/WEB-INF/
webapp/catalog/WEB-INF/actions/imagemanagement/ webapp/catal...
Modified: ofbiz/trunk/applications/product/widget/catalog/ImageManagementForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ImageManagementForms.xml?rev=1073621&r1=1073620&r2=1073621&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ImageManagementForms.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ImageManagementForms.xml Wed Feb 23 07:06:07 2011
@@ -576,7 +576,8 @@ under the License.
<field name="productId"><hidden/></field>
<field name="contentIdExist"><hidden value="${parameters.contentIdExist}"/></field>
<field name="contentIdReplace"><hidden value="${parameters.contentIdReplace}"/></field>
- <field name="imageName"><hidden value="${contentDataResourceExist.drDataResourceName}"/></field>
+ <field name="dataResourceNameExist"><hidden value="${contentDataResourceExist.drDataResourceName}"/></field>
+ <field name="dataResourceNameReplace"><hidden value="${contentDataResourceReplace.drDataResourceName}"/></field>
<field name="imageExist" position="1" use-when="imageURLExist != null" title="Replacement Image"><image value="${imageURLExist}" width="200"/></field>
<field name="imageReplace" position="2" use-when="imageURLReplace != null&&imageURLExist != null" title="Image to Replace"><image value="${imageURLReplace}" width="200"/></field>
<field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field>
@@ -817,7 +818,7 @@ under the License.
</field>-->
</form>
- <form name="ImageRemove" type="single" title="" header-row-style="header-row" default-table-style="basic-table" target="ListImageRemove">
+ <form name="ImageRemove" type="single" title="" header-row-style="header-row" default-table-style="basic-table" target="ListImageRemove">
<field name="productId" title="${uiLabelMap.ChooseProductID}"><lookup target-form-name="LookupProduct"/></field>
<field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
@@ -862,4 +863,79 @@ under the License.
</hyperlink>
</field>
</form>
+
+ <form name="ImageResize" type="single" title="" header-row-style="header-row" default-table-style="basic-table" target="resizeAllImageOfProduct">
+ <field name="productId" title="${uiLabelMap.ChooseProductID}"><lookup target-form-name="LookupProduct"/></field>
+ <field name="size" title="Image Width"><text/></field>
+ <field name="submitButton" title="${uiLabelMap.Resize}" widget-style="smallSubmit"><submit button-type="button"/></field>
+ </form>
+
+ <form name="sizeListOfProduct" type="list" title="" odd-row-style="alternate-row" default-table-style="basic-table" use-row-submit="true" separate-columns="true">
+ <actions>
+ <entity-condition entity-name="ContentAssoc">
+ <condition-list combine="and">
+ <condition-expr field-name="contentId" from-field="parameters.contentIdAccos"/>
+ <condition-expr field-name="contentAssocTypeId" value="IMAGE_THUMBNAIL"/>
+ <!--<condition-expr field-name="statusId" from-field="statusForm"/>-->
+ </condition-list>
+ <order-by field-name="mapKey"/>
+ </entity-condition>
+ </actions>
+ <field name="mapKey" title="Size"><display/></field>
+ <field name="deleteButton" title="${uiLabelMap.CommonRemove}" widget-style="buttontext">
+ <hyperlink target="removeImageBySize" description="${uiLabelMap.CommonRemove}" also-hidden="false" confirmation-message="Do you want to remove this size?">
+ <parameter param-name="productId" from-field="parameters.productId"/>
+ <parameter param-name="mapKey" from-field="mapKey"/>
+ </hyperlink>
+ </field>
+ </form>
+
+ <form name="ImageRename" type="single" title="" header-row-style="header-row" default-table-style="basic-table" target="ListImageRename">
+ <field name="productId" title="${uiLabelMap.ChooseProductID}"><lookup target-form-name="LookupProduct"/></field>
+ <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field>
+ </form>
+
+ <form name="ListImageRename" type="list" title="" odd-row-style="alternate-row" default-table-style="basic-table" use-row-submit="true" separate-columns="true">
+ <actions>
+ <entity-condition entity-name="ProductContentAndInfo">
+ <condition-list combine="and">
+ <condition-expr field-name="productId" from-field="parameters.productId"/>
+ <condition-expr field-name="productContentTypeId" value="IMAGE"/>
+ <condition-expr field-name="drMimeTypeId" value="image/jpeg"/>
+ <!--<condition-expr field-name="statusId" from-field="statusForm"/>-->
+ </condition-list>
+ </entity-condition>
+ </actions>
+ <row-actions>
+ <entity-and entity-name="ContentAssoc" list="contentAssocs">
+ <field-map field-name="contentId"/>
+ <field-map field-name="contentAssocTypeId" value="IMAGE_THUMBNAIL"/>
+ </entity-and>
+ <set field="contentIdTo" from-field="contentAssocs[0].contentIdTo"/>
+ <entity-and entity-name="ContentDataResourceView" list="contentDataResourceViews">
+ <field-map field-name="contentId" from-field="contentIdTo"/>
+ </entity-and>
+ <set field="drObjectInfo" from-field="contentDataResourceViews[0].drObjectInfo"/>
+ <entity-and entity-name="ContentDataResourceView" list="origContentDataResourceViews">
+ <field-map field-name="contentId"/>
+ </entity-and>
+ </row-actions>
+ <field name="drObjectInfo" title="Image"><image width="100"/></field>
+ <!--<field name="drDataResourceName" title="Image Name"><text/></field>-->
+ <field name="drDataResourceName" title="Image Name" id-name="description">
+ <display description="${drDataResourceName}" >
+ <in-place-editor url="renameImage" cancel-control="button" saving-text="Updating..." text-between-controls=" ">
+ <simple-editor/>
+ <field-map field-name="productId" from-field="productId"/>
+ <field-map field-name="contentId" from-field="contentId"/>
+ </in-place-editor>
+ </display>
+ </field>
+ <field name="contentId"><display/></field>
+ <field name="dataResourceId"><display/></field>
+ <field name="fromDate"><display/></field>
+ <field name="statusId" title="Status">
+ <display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}"/>
+ </field>
+ </form>
</forms>
Modified: ofbiz/trunk/applications/product/widget/catalog/ImageManagementScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ImageManagementScreens.xml?rev=1073621&r1=1073620&r2=1073621&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ImageManagementScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ImageManagementScreens.xml Wed Feb 23 07:06:07 2011
@@ -779,7 +779,7 @@ under the License.
<property-to-field resource="catalog" property="image.management.url" field="imageServerUrl"/>
</actions>
<widgets>
- <image src="${imageServerUrl}/previewImage.jpg"></image>
+ <image src="${imageServerUrl}/preview/previewImage.jpg"></image>
</widgets>
</section>
</screen>
@@ -1065,4 +1065,144 @@ under the License.
</fail-widgets>
</section>
</screen>
+
+ <screen name="ImageResize">
+ <section>
+ <actions>
+ <set field="userTabButtonImage" value="ImageResize"/>
+ <set field="productId" from-field="parameters.productId"/>
+ <entity-one value-field="product" entity-name="Product"/>
+ <entity-condition entity-name="ProductContentAndInfo" list="productContentAndInfos">
+ <condition-list combine="and">
+ <condition-expr field-name="productId" from-field="parameters.productId"/>
+ <condition-expr field-name="productContentTypeId" value="IMAGE"/>
+ <!--<condition-expr field-name="statusId" value="IM_APPROVED"/>-->
+ </condition-list>
+ </entity-condition>
+ <set field="parameters.contentIdAccos" from-field="productContentAndInfos[0].contentId"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <section>
+ <condition>
+ <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+ </condition>
+ <widgets>
+ <!--<label style="h1">${uiLabelMap.Product} ${uiLabelMap.CommonFor}: ${product.internalName} [${uiLabelMap.CommonId}:${product.productId}]</label>-->
+ <screenlet title="Size Existing In Product : ${product.internalName} [${uiLabelMap.CommonId}:${product.productId}]">
+ <include-form name="sizeListOfProduct" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+ </screenlet>
+ <screenlet title="${uiLabelMap.Resize}">
+ <include-form name="ImageResize" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+ </screenlet>
+ </widgets>
+ <fail-widgets>
+ <label text="You do not have permission to access this page. ("IMAGE_MANAGEMENT_ADMIN" needed)"/>
+ </fail-widgets>
+ </section>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+
+ <screen name="ImageRename">
+ <section>
+ <actions>
+ <set field="userTabButtonImage" value="ImageRename"/>
+ <set field="productId" from-field="parameters.productId"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <section>
+ <condition>
+ <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+ </condition>
+ <widgets>
+ <screenlet title="${uiLabelMap.Rename}">
+ <include-form name="ImageRename" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+ </screenlet>
+ </widgets>
+ <fail-widgets>
+ <label text="You do not have permission to access this page. ("IMAGE_MANAGEMENT_ADMIN" needed)"/>
+ </fail-widgets>
+ </section>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+
+ <screen name="ListImageRename">
+ <section>
+ <condition>
+ <not><if-empty field="parameters.productId"/></not>
+ </condition>
+ <actions>
+ <set field="userTabButtonImage" value="ImageRename"/>
+ <!--<set field="statusForm" value="IM_PENDING"/>-->
+ <set field="productId" from-field="parameters.productId"/>
+ <entity-one value-field="product" entity-name="Product"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <section>
+ <condition>
+ <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+ </condition>
+ <widgets>
+ <section>
+ <condition>
+ <not><if-empty field="product"/></not>
+ </condition>
+ <widgets>
+ <label style="h1">${uiLabelMap.Product} ${uiLabelMap.CommonFor}: ${product.internalName} [${uiLabelMap.CommonId}:${product.productId}]</label>
+ <screenlet title="${uiLabelMap.Rename}">
+ <include-form name="ListImageRename" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+ </screenlet>
+ </widgets>
+ <fail-widgets>
+ <label text="${uiLabelMap.ProductNoExistingProductsFound}"/>
+ </fail-widgets>
+ </section>
+ </widgets>
+ <fail-widgets>
+ <label text="You do not have permission to access this page. ("IMAGE_MANAGEMENT_ADMIN" needed)"/>
+ </fail-widgets>
+ </section>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ <fail-widgets>
+ <section>
+ <actions>
+ <set field="userTabButtonImage" value="ImageRename"/>
+ <!--<set field="errorMessage" value="There is no a selected product, please insert or select the product to view image(s)."/>-->
+ </actions>
+ <widgets>
+ <decorator-screen name="ImageManagementDecorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <section>
+ <condition>
+ <if-has-permission permission="IMAGE_MANAGEMENT_ADMIN"/>
+ </condition>
+ <widgets>
+ <screenlet title="${uiLabelMap.Rename}">
+ <include-form name="ImageRename" location="component://product/widget/catalog/ImageManagementForms.xml"/>
+ </screenlet>
+ </widgets>
+ <fail-widgets>
+ <label text="You do not have permission to access this page. ("IMAGE_MANAGEMENT_ADMIN" needed)"/>
+ </fail-widgets>
+ </section>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </fail-widgets>
+ </section>
+ </screen>
</screens>