-
AuthorPosts
-
idhla Friend
idhla
- Join date:
- February 2011
- Posts:
- 72
- Downloads:
- 23
- Uploads:
- 30
- Thanks:
- 9
- Thanked:
- 1 times in 1 posts
January 1, 2013 at 9:14 pm #183558I’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 ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
January 2, 2013 at 5:08 am #478046Hi 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.jsIf 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 Friendidhla
- Join date:
- February 2011
- Posts:
- 72
- Downloads:
- 23
- Uploads:
- 30
- Thanks:
- 9
- Thanked:
- 1 times in 1 posts
January 3, 2013 at 9:46 pm #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.jsIf 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 ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
January 4, 2013 at 2:33 am #478356Hi,
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 Friendidhla
- Join date:
- February 2011
- Posts:
- 72
- Downloads:
- 23
- Uploads:
- 30
- Thanks:
- 9
- Thanked:
- 1 times in 1 posts
January 4, 2013 at 5:58 pm #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 ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
January 5, 2013 at 7:47 am #478500You are welcome.
Have a great 2013 :laugh:
bit stupid Friendbit stupid
- Join date:
- September 2012
- Posts:
- 21
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 3
- Thanked:
- 4 times in 1 posts
October 11, 2013 at 12:45 pm #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).
1 user says Thank You to bit stupid for this useful post
-
AuthorPosts
This topic contains 7 replies, has 3 voices, and was last updated by bit stupid 11 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum