This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new aa84e8a754 Improved: Imagepreview - Content Management (OFBIZ-12751)
aa84e8a754 is described below

commit aa84e8a7547309097538d13fa47fb2aadfa589b0
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Fri Feb 3 18:20:46 2023 +0100

    Improved: Imagepreview - Content Management (OFBIZ-12751)
    
    It would be nice, if the image preview in  "image management" would be 
displayed
    in thumbnail size.
    /catalog/control/ListImageManage?productId
    The full size image can be displayed via the "view" button.
    
    Thanks: Ingo Wolfmayr
    jleroux: I have added rainbow as it's our current default theme. Other 
themes
    can easily be changed as well...
---
 .../widget/catalog/ImageManagementForms.xml        | 27 +++++++++++-----------
 .../webapp/helveticus/helveticus-main-theme.less   |  6 +++++
 .../rainbowstone/rainbowstone-main-theme.less      |  7 ++++++
 3 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/applications/product/widget/catalog/ImageManagementForms.xml 
b/applications/product/widget/catalog/ImageManagementForms.xml
index 3891973cd0..5ccfa01404 100644
--- a/applications/product/widget/catalog/ImageManagementForms.xml
+++ b/applications/product/widget/catalog/ImageManagementForms.xml
@@ -44,7 +44,7 @@ under the License.
                 <field-map field-name="contentId"/>
             </entity-and>
         </row-actions>
-        <field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image 
style="cssImgLarge"/></field>
+        <field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image 
style="cssImgThumb"/></field>
         <field name="drDataResourceName" 
title="${uiLabelMap.ImageManagementImageName}">
             <hyperlink description="${drDataResourceName}" 
target="${currentFormName}">
                 <parameter param-name="productId"/>
@@ -106,7 +106,7 @@ under the License.
             </radio>
         </field>
         <field name="_rowSubmit" position="2" title=" " 
widget-style="hidden"><check all-checked="true"/></field>
-        <field name="drObjectInfo" position="2" 
title="${uiLabelMap.CommonImage}"><image style="cssImgLarge"/></field>
+        <field name="drObjectInfo" position="2" 
title="${uiLabelMap.CommonImage}"><image style="cssImgThumb"/></field>
         <field name="checkStatusId" position="2" 
title="${uiLabelMap.CommonStatus}">
             <radio no-current-selected-key="${checkRadio}">
                 <option key="IM_APPROVED/${productId}" 
description="${uiLabelMap.FormFieldTitle_approve}"/>
@@ -153,7 +153,7 @@ under the License.
         <field name="productId" title="${uiLabelMap.ProductProductName} 
[${uiLabelMap.ProductProductId}] - ${uiLabelMap.FormFieldTitle_categoryName}" 
entry-name="productId" position="1" use-when="${groovy:String 
prev=(String)previousItem.get(&quot;productId&quot;);return new 
Boolean(!(prev!=null&amp;&amp;prev.equals(productId)));}">
             <display-entity entity-name="Product" key-field-name="productId" 
description="${internalName} [${productId}] - ${productCategory.categoryName}" 
also-hidden="false"/>
         </field>
-        <field name="drObjectInfo" position="2" 
title="${uiLabelMap.CommonImage}"><image style="cssImgLarge"/></field>
+        <field name="drObjectInfo" position="2" 
title="${uiLabelMap.CommonImage}"><image style="cssImgThumb"/></field>
         <field name="drDataResourceName" position="2" 
title="${uiLabelMap.ImageManagementImageName}"><display/></field>
         <field name="contentId" position="2"><display/></field>
         <field name="dataResourceId" 
title="${uiLabelMap.ContentDataResourceId}" position="2"><display/></field>
@@ -192,8 +192,7 @@ under the License.
         <field name="productId" title="${uiLabelMap.ProductProductName} 
[${uiLabelMap.ProductProductId}] - ${uiLabelMap.FormFieldTitle_categoryName}" 
entry-name="productId" position="1" use-when="${groovy:String 
prev=(String)previousItem.get(&quot;productId&quot;);return new 
Boolean(!(prev!=null&amp;&amp;prev.equals(productId)));}">
             <display-entity entity-name="Product" key-field-name="productId" 
description="${internalName} [${productId}] - ${productCategory.categoryName}" 
also-hidden="false"/>
         </field>
-        <field name="_rowSubmit" position="2" title=" " 
widget-style="hidden"><check all-checked="true"/></field>
-        <field name="drObjectInfo" position="2" 
title="${uiLabelMap.CommonImage}"><image style="cssImgLarge"/></field>
+        <field name="_rowSubmit" position="2" title=" " 
widget-style="hidden"><check all-checked="trueThumb"/></field>
         <field name="drDataResourceName" position="2" 
title="${uiLabelMap.ImageManagementImageName}"><display/></field>
         <field name="contentId" position="2"><display/></field>
         <field name="dataResourceId" 
title="${uiLabelMap.ContentDataResourceId}" position="2"><display/></field>
@@ -247,7 +246,7 @@ under the License.
         <field name="productId" title="${uiLabelMap.ProductProductName} 
[${uiLabelMap.ProductProductId}] - ${uiLabelMap.FormFieldTitle_categoryName}" 
entry-name="productId" position="1" use-when="${groovy:String 
prev=(String)previousItem.get(&quot;productId&quot;);return new 
Boolean(!(prev!=null&amp;&amp;prev.equals(productId)));}">
             <display-entity entity-name="Product" key-field-name="productId" 
description="${internalName} [${productId}] - ${productCategory.categoryName}" 
also-hidden="false"/>
         </field>
-        <field name="drObjectInfo" position="2" 
title="${uiLabelMap.CommonImage}"><image style="cssImgLarge"/></field>
+        <field name="drObjectInfo" position="2" 
title="${uiLabelMap.CommonImage}"><image style="cssImgThumb"/></field>
         <field name="drDataResourceName" position="2" 
title="${uiLabelMap.ImageManagementImageName}"><display/></field>
         <field name="contentId" position="2"><display/></field>
         <field name="dataResourceId" 
title="${uiLabelMap.ContentDataResourceId}" position="2"><display/></field>
@@ -305,7 +304,7 @@ under the License.
         <field name="dataResourceId"><hidden/></field>
         <field name="fromDate"><hidden/></field>
         <field name="_rowSubmit" title=" " widget-style="hidden"><check 
all-checked="true"/></field>
-        <field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image 
style="cssImgLarge"/></field>
+        <field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image 
style="cssImgThumb"/></field>
         <field name="action" use-when="${groovy: return context.drMimeTypeId 
== 'image/jpeg';}" title="${uiLabelMap.ImageManagementAction}" event="onChange" 
action="javascript:
             
document.ListImageManage.action='checkAction?productId=${productId}&amp;contentId=${contentId}&amp;dataResourceId=${dataResourceId}';
 
             document.ListImageManage.submit();">
@@ -380,7 +379,7 @@ under the License.
                 <field-map field-name="contentId"/>
             </entity-and>
         </actions>
-        <field name="drObjectInfo" title=" "><image 
style="cssImgLarge"/></field>
+        <field name="drObjectInfo" title=" "><image 
style="cssImgThumb"/></field>
     </form>
     
     <form name="ImageFrames" type="single" title="" target="uploadFrame" 
header-row-style="header-row" default-table-style="basic-table" 
target-window="_self">
@@ -556,7 +555,7 @@ under the License.
             <set field="drObjectInfo" 
from-field="contentDataResourceViews[0].drObjectInfo"/>
         </row-actions>
         <field name="productId"><hidden/></field>
-        <field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image 
style="cssImgLarge"/></field>
+        <field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image 
style="cssImgThumb"/></field>
         <field name="drDataResourceName" 
title="${uiLabelMap.ImageManagementImageName}"><display/></field>
         <field name="fromDate"><display/></field>
         <field name="status"><display description="Uploaded"/></field>
@@ -594,7 +593,7 @@ under the License.
                 <field-map field-name="contentId"/>
             </entity-and>
         </row-actions>
-        <field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image 
style="cssImgLarge"/></field>
+        <field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image 
style="cssImgThumb"/></field>
         <field name="drDataResourceName" 
title="${uiLabelMap.ImageManagementImageName}" widget-style="buttontext">
             <hyperlink description="${drDataResourceName}" 
target="javascript:set_value('${contentId}')" also-hidden="false" 
target-type="plain"/>
         </field>
@@ -645,7 +644,7 @@ under the License.
             <set field="ApprovedBy" 
value="${userLoginAndPartyDetails[0].firstName} 
${userLoginAndPartyDetails[0].middleName} 
${userLoginAndPartyDetails[0].lastName}"/>
         </row-actions>
         <field name="productId"><hidden/></field>
-        <field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image 
style="cssImgLarge"/></field>
+        <field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image 
style="cssImgThumb"/></field>
         <field name="drDataResourceName" 
title="${uiLabelMap.ImageManagementImageName}"><display/></field>
         <field name="contentId"><display/></field>
         <field name="dataResourceId" 
title="${uiLabelMap.ContentDataResourceId}"><display/></field>
@@ -682,7 +681,7 @@ under the License.
                 <field-map field-name="contentId"/>
             </entity-and>
         </row-actions>
-        <field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image 
style="cssImgLarge"/></field>
+        <field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image 
style="cssImgThumb"/></field>
         <field name="drDataResourceName" 
title="${uiLabelMap.ImageManagementImageName}">
             <hyperlink description="${drDataResourceName}" 
target="ListImageReplace">
                 <parameter param-name="productId"/>
@@ -723,7 +722,7 @@ under the License.
                 <field-map field-name="contentId"/>
             </entity-and>
         </row-actions>
-        <field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image 
style="cssImgLarge"/></field>
+        <field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image 
style="cssImgThumb"/></field>
         <field name="drDataResourceName" 
title="${uiLabelMap.ImageManagementImageName}">
             <hyperlink description="${drDataResourceName}" 
target="ListImageReplace">
                 <parameter param-name="productId"/>
@@ -748,7 +747,7 @@ under the License.
                 <condition-expr field-name="contentTypeId" 
value="IMAGE_FRAME"/>
             </entity-condition>
         </actions>
-        <field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image 
style="cssImgLarge"/></field>
+        <field name="drObjectInfo" title="${uiLabelMap.CommonImage}"><image 
style="cssImgThumb"/></field>
         <field name="drDataResourceName" 
title="${uiLabelMap.ImageManagementImageName}" widget-style="buttontext">
             <hyperlink description="${drDataResourceName}" 
target="javascript:set_value('${contentId}')" also-hidden="false" 
target-type="plain"/>
         </field>
diff --git a/themes/helveticus/webapp/helveticus/helveticus-main-theme.less 
b/themes/helveticus/webapp/helveticus/helveticus-main-theme.less
index 0ff04c666e..0617f467cd 100644
--- a/themes/helveticus/webapp/helveticus/helveticus-main-theme.less
+++ b/themes/helveticus/webapp/helveticus/helveticus-main-theme.less
@@ -1409,6 +1409,12 @@ form .basic-table,
     width: auto;
     height: auto;
 }
+.cssImgThumb{
+    max-width: 128px;
+    max-height: 128px;
+    width: auto;
+    height: auto;
+}
 
 #loginBar {
   width: 30%;
diff --git 
a/themes/rainbowstone/webapp/rainbowstone/rainbowstone-main-theme.less 
b/themes/rainbowstone/webapp/rainbowstone/rainbowstone-main-theme.less
index 2c60373dde..1a6ee86289 100644
--- a/themes/rainbowstone/webapp/rainbowstone/rainbowstone-main-theme.less
+++ b/themes/rainbowstone/webapp/rainbowstone/rainbowstone-main-theme.less
@@ -540,6 +540,13 @@ li.line-odd {
   }
 }
 
+.cssImgThumb{
+    max-width: 128px;
+    max-height: 128px;
+    width: auto;
+    height: auto;
+}
+
 #main-navigation-bar {
   position: relative;
   width: 100%;

Reply via email to