svn commit: r1736855 - in /ofbiz/branches/release15.12: ./ applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1736855 - in /ofbiz/branches/release15.12: ./ applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl

jleroux@apache.org
Author: jleroux
Date: Mon Mar 28 10:11:17 2016
New Revision: 1736855

URL: http://svn.apache.org/viewvc?rev=1736855&view=rev
Log:
"Applied fix from trunk for revision: 1736851  "
------------------------------------------------------------------------
r1736851 | jleroux | 2016-03-28 11:55:17 +0200 (lun. 28 mars 2016) | 25 lignes

A patch from James Yong for <<popup fades in and out non-stop when hovers on a product image in list view>> https://issues.apache.org/jira/browse/OFBIZ-6961

Problem
========
Go to https://localhost:8443/ecommerce/gift-cards-GC-100-c
When the mouse hovers on a product image in a list view, the popup fades in and out non-stop.
 
Cause
=====
The list view has a narrower height than the grid (matrix) view. This causes the popup to overlay on the target and results in the cycling.

Quick Fix
==============
To illustrate the problem, we change the display to grid view, instead of list view, by append the following to the CatalogDetail.groovy file
{quote}
context.put("numCol", 3);
context.viewSize = 12;
{quote}

Better Solution
===============
Use tooltip from jQuery UI. Works correctly when the products are displayed in list view / grid view. A patch will be provided.


jleroux: I checked, there should not be other cases like this
------------------------------------------------------------------------


Modified:
    ofbiz/branches/release15.12/   (props changed)
    ofbiz/branches/release15.12/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl

Propchange: ofbiz/branches/release15.12/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Mar 28 10:11:17 2016
@@ -9,4 +9,4 @@
 /ofbiz/branches/json-integration-refactoring:1634077-1635900
 /ofbiz/branches/multitenant20100310:921280-927264
 /ofbiz/branches/release13.07:1547657
-/ofbiz/trunk:1722712,1723007,1723248,1724402,1724411,1724566,1724689,1724763,1724916,1724918,1724925,1724930,1724940,1724943,1724946,1724951,1724957,1724975,1724978,1725006,1725217,1725257,1725561,1725574,1726388,1726486,1726493,1726828,1728398,1728411,1729005,1729078,1729609,1729809,1730035,1730456,1730735-1730736,1730747,1730758,1730882,1730889,1731382,1731396,1732454,1732570,1732721,1733951,1733956,1734246,1734269,1734276,1734912,1734918,1735244,1735385,1735398,1735569,1735731,1735734,1735750,1735753,1735756,1735759,1735773,1736083,1736087,1736272,1736434,1736628
+/ofbiz/trunk:1722712,1723007,1723248,1724402,1724411,1724566,1724689,1724763,1724916,1724918,1724925,1724930,1724940,1724943,1724946,1724951,1724957,1724975,1724978,1725006,1725217,1725257,1725561,1725574,1726388,1726486,1726493,1726828,1728398,1728411,1729005,1729078,1729609,1729809,1730035,1730456,1730735-1730736,1730747,1730758,1730882,1730889,1731382,1731396,1732454,1732570,1732721,1733951,1733956,1734246,1734269,1734276,1734912,1734918,1735244,1735385,1735398,1735569,1735731,1735734,1735750,1735753,1735756,1735759,1735773,1736083,1736087,1736272,1736434,1736628,1736851

Modified: ofbiz/branches/release15.12/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release15.12/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl?rev=1736855&r1=1736854&r2=1736855&view=diff
==============================================================================
--- ofbiz/branches/release15.12/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl (original)
+++ ofbiz/branches/release15.12/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl Mon Mar 28 10:11:17 2016
@@ -88,11 +88,13 @@ ${virtualJavaScript!}
           </table>
         </div>
         <script type="text/javascript">
-          jQuery("#${productInfoLinkId}").hover(function() {
-                  jQuery("#${productDetailId}").fadeIn("slow");
-              }, function () {
-                  jQuery("#${productDetailId}").fadeOut("fast");
-              });
+          jQuery("#${productInfoLinkId}").attr('title', jQuery("#${productDetailId}").remove().html());
+          jQuery("#${productInfoLinkId}").tooltip({
+              content: function(){
+                  return this.getAttribute("title");
+              },
+              tooltipClass: "popup",  
+          });
         </script>
         <div class="productbuy">
           <#-- check to see if introductionDate hasn't passed yet -->