0
Welcome Guest! Login
0 items Join Now

Possible homepage tabs bug in Quasar

  • Possible homepage tabs bug in Quasar

    Posted 8 years 5 months ago
    • There seems to be a problem with the homepage tabs delivered with the quasar free rocket launcher bundle. I have done a clean install which you can see here: www.freshpage.co.uk/sites/quasar_test/

      To see the problem, switch the view to list, then switch back to grid and click on a product. Then go back to the homepage. The tabs will be in list mode rather than grid. In fact, it will now be impossible to get the tabs to stay in grid mode.
    • Freshpage Web Design
    • Sam Mahoney's Avatar
    • Sam Mahoney
    • Preeminent Rocketeer
    • Posts: 7420
    • Thanks: 222

    Re: Possible homepage tabs bug in Quasar

    Posted 8 years 5 months ago
    • Works fine for me on FF4. The state is stored using a cookie - do you them enabled?
    • STEP 1 IN MAGENTO DEVELOPMENT - DISABLE YOUR CACHE OR YOU WON'T SEE ANY CHANGES.
      Use the new "secure" tab when replying for privately sharing links.
      Check the "Useful Snippets" post for tips.
  • Re: Possible homepage tabs bug in Quasar

    Posted 8 years 5 months ago
    • I've tested in FF 4.0.1, IE 8, Chrome and Safari and get the same problem in all of them. I also tested on a different PC. I have cookies enabled.
    • Freshpage Web Design
    • Sam Mahoney's Avatar
    • Sam Mahoney
    • Preeminent Rocketeer
    • Posts: 7420
    • Thanks: 222

    Re: Possible homepage tabs bug in Quasar

    Posted 8 years 5 months ago
    • Oooops, my bad, I had a left over cookie holding the data for me! You are correct, I have a line of code in the wrong place. To fix, try replacing lines 25 to 36 with the following:
                $j("span.switch_thumb").click(function () {
                     $j("span.switch_thumb").toggleClass("swap");
                     $j("ul.display").fadeOut("fast", function() {
                          $j(this).fadeIn("fast").toggleClass("thumb_view").toggleClass("list");
                          // Undo equalized heights for list
                          $j('ul.list div.product-container').css("height","auto");
                          // Equalize all thumb heights on switch if list view default
                          var maxHeight = 0;
                          $j('ul.thumb_view div.product-container').each(function() { maxHeight = Math.max(maxHeight, $j(this).height()); }).height(maxHeight);
                          $j.cookie('view_State', $j('ul.display').is('.thumb_view') ? 'thumbs' : 'list' );
                     });  
                });
    • STEP 1 IN MAGENTO DEVELOPMENT - DISABLE YOUR CACHE OR YOU WON'T SEE ANY CHANGES.
      Use the new "secure" tab when replying for privately sharing links.
      Check the "Useful Snippets" post for tips.
  • Re: Possible homepage tabs bug in Quasar

    Posted 8 years 5 months ago
  • Re: Possible homepage tabs bug in Quasar

    Posted 8 years 5 months ago
    • I found another bug I think. It's possible to go beyond the max and min font sizes by clicking on the increase or decrease button, then pressing refresh. This is because the value is set in the cookie even if it is beyond the max or min.

      To fix it I changed the code so that the line updatefontCookie(CookieName,newSize); is only called when the new value is within the constraints.
    • Freshpage Web Design
    • Sam Mahoney's Avatar
    • Sam Mahoney
    • Preeminent Rocketeer
    • Posts: 7420
    • Thanks: 222

    Re: Possible homepage tabs bug in Quasar

    Posted 8 years 5 months ago
    • Ah, had never tried that, but you're right. Can you post the code you used for the fix?
    • STEP 1 IN MAGENTO DEVELOPMENT - DISABLE YOUR CACHE OR YOU WON'T SEE ANY CHANGES.
      Use the new "secure" tab when replying for privately sharing links.
      Check the "Useful Snippets" post for tips.
  • Re: Possible homepage tabs bug in Quasar

    Posted 8 years 5 months ago
    • It was a client who spotted it (pesky clients, always clicking the wrong thing!)

      I moved the two lines shown below in fontSize()
       
              $j(container+" .smallFont").click(function(){
              curSize=parseInt($j(target).css("font-size"));
              newSize=curSize-2;
       
              if(newSize>=minSize){
                  $j(target).css('font-size',newSize);
                  updatefontCookie(CookieName,newSize); //<-------moved here
              }
              if(newSize<=minSize){
                  $j(container+" .smallFont").addClass("sdisabled")
              }
              if(newSize<maxSize){
                  $j(container+" .largeFont").removeClass("ldisabled")
              }
                //<-------was here        
          });
          $j(container+" .medFont").click(function(){
              $j(target).css('font-size',medSize);
              $j(container+" .smallFont").removeClass("sdisabled");
              $j(container+" .largeFont").removeClass("ldisabled");
              updatefontCookie(CookieName,medSize)
          });
          $j(container+" .largeFont").click(function(){
              curSize=parseInt($j(target).css("font-size"));
              newSize=curSize+2;
              
              if(newSize<=(maxSize)){
                  $j(target).css('font-size',newSize)
                  updatefontCookie(CookieName,newSize); //<-------moved here
              }
              if(newSize>minSize){
                  $j(container+" .smallFont").removeClass("sdisabled")
              }
              if(newSize>=maxSize){
                  $j(container+" .largeFont").addClass("ldisabled")
              }
                //<-------was here
          });
    • Freshpage Web Design

Time to create page: 0.084 seconds