Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • idhla Friend
    #183558

    I’m not sure where to post this, but I’m guessing this is the right place. I am getting huge chunks of white space at in certain positions within my site (using JA Teline IV), namely in the user 6, 7, 8 and user 11 positons. When I check the site in Chrome/Firebug, I am finding:


    <!-- SPOTLIGHT -->
    <div class="ja-box-wrap column ja-box-full" style="width: 100%;">
    <div class="ja-box clearfix" style="min-height: 3438px;">
    <!-- SPOTLIGHT -->

    Obviously, the problem is the style=”min-height: 3438px; but I do not know where I can find this file to edit. Looking in the spotlight.php file yields nothing. Is this an issue with JAT3v2? Can anyone suggest a fix or tell me how to roll this back to the old version?

    Many thanks.

    Saguaros Moderator
    #478046

    Hi idhla,

    In templates/ja_telineiv/blocks/spotlight.php file, we use equalHeight() function:


    <script type="text/javascript">
    window.addEvent('load', function (){ equalHeight ('#ja-<?php echo $name ?> .ja-box') });
    </script>

    This function is defined in JAT3 core : pluginssystemjat3jat3base-themesdefaultjscore.js

    If you don’t want to use, you could remove above script in spotlight.php file and make your own CSS changes.

    Let me know if you need further helps.

    Happy New Year.:)

    idhla Friend
    #478334

    <em>@Saguaros 352942 wrote:</em><blockquote>Hi idhla,

    In templates/ja_telineiv/blocks/spotlight.php file, we use equalHeight() function:


    <script type="text/javascript">
    window.addEvent('load', function (){ equalHeight ('#ja-<?php echo $name ?> .ja-box') });
    </script>

    This function is defined in JAT3 core : pluginssystemjat3jat3base-themesdefaultjscore.js

    If you don’t want to use, you could remove above script in spotlight.php file and make your own CSS changes.

    Let me know if you need further helps.

    Happy New Year.:)</blockquote>

    Thank you for your response. I actually had to completely remove this from core.js:


    function equalHeight (els) {
    els = $$_(els);
    if (!els || els.length < 2) return;
    var maxh = 0;
    var els_ = [];
    els.each(function(el, i){
    if (!el) return;
    //els_ = getDeepestWrapper (el);
    els_ = el;
    var ch = els_.getCoordinates().height;
    maxh = (maxh < ch) ? ch : maxh;
    },this);

    els_.each(function(el, i) {
    if (!el) return;
    if (el.getStyle('padding-top')!=null && el.getStyle('padding-bottom')!=null) {
    if (maxh-el.getStyle('padding-top').toInt()-el.getStyle('padding-bottom').toInt() > 0) {
    el.setStyle('min-height', maxh-el.getStyle('padding-top').toInt()-el.getStyle('padding-bottom').toInt());
    }
    } else {
    if (maxh > 0) el.setStyle('min-height', maxh);
    }
    }, this);
    }

    Can you explain what this snippet of code is actually meant to do? My site seems to run fine without it, but I don’t want to run into problems down the line. However, it doesn’t seem like this is necessary especially when, in my case, it adds acres of white space to the bottom of my site.

    Anyway, thanks for your help.

    Saguaros Moderator
    #478356

    Hi,

    This script helps to calculate the min-height of spotlight blocks. If one block has long content, this script will automatically calculate the height and set the min-height for other blocks so that all have the same min-height. This feature is from JAT3 framework.

    FYI: you could know more about the width of spotlight in this wiki: http://wiki.joomlart.com/wiki/JA_T3_Framework_2/Guides#Spotlight_parameters

    idhla Friend
    #478464

    <em>@Saguaros 353332 wrote:</em><blockquote>Hi,

    This script helps to calculate the min-height of spotlight blocks. If one block has long content, this script will automatically calculate the height and set the min-height for other blocks so that all have the same min-height. This feature is from JAT3 framework.

    FYI: you could know more about the width of spotlight in this wiki: http://wiki.joomlart.com/wiki/JA_T3_Framework_2/Guides#Spotlight_parameters</blockquote>

    Thanks for your response. I wasn’t worried about the width, just the height. For whatever reason, it was adding more than 3000px of white space in two separate modules on my site (so more than 6000px total). It really isn’t a useful feature, at least not for my site.

    Anyway, thanks again for your assistance.

    Saguaros Moderator
    #478500

    You are welcome.

    Have a great 2013 :laugh:

    bit stupid Friend
    #508748

    <em>@idhla 353300 wrote:</em><blockquote>Thank you for your response. I actually had to completely remove this from core.js:


    function equalHeight (els) {
    els = $$_(els);
    if (!els || els.length < 2) return;
    var maxh = 0;
    var els_ = [];
    els.each(function(el, i){
    if (!el) return;
    //els_ = getDeepestWrapper (el);
    els_ = el;
    var ch = els_.getCoordinates().height;
    maxh = (maxh < ch) ? ch : maxh;
    },this);

    els_.each(function(el, i) {
    if (!el) return;
    if (el.getStyle('padding-top')!=null && el.getStyle('padding-bottom')!=null) {
    if (maxh-el.getStyle('padding-top').toInt()-el.getStyle('padding-bottom').toInt() > 0) {
    el.setStyle('min-height', maxh-el.getStyle('padding-top').toInt()-el.getStyle('padding-bottom').toInt());
    }
    } else {
    if (maxh > 0) el.setStyle('min-height', maxh);
    }
    }, this);
    }

    Can you explain what this snippet of code is actually meant to do? My site seems to run fine without it, but I don’t want to run into problems down the line. However, it doesn’t seem like this is necessary especially when, in my case, it adds acres of white space to the bottom of my site.

    Anyway, thanks for your help.</blockquote>

    Hope this helps someone, as I struggled with this and was worried about removing stuff that I do not really understand.

    I did not need to remove the core.js code (using JAt3 template on joomla 2.5). I just commented out the spotlight.php code and bobs your whatsit (prefered commenting in case of future issues with other spotlight positions).

Viewing 7 posts - 1 through 7 (of 7 total)

This topic contains 7 replies, has 3 voices, and was last updated by  bit stupid 11 years, 1 month ago.

We moved to new unified forum. Please post all new support queries in our New Forum