File manager - Edit - /home/jardides/www/Jardi-design/old/components/com_sitemap/js/sitemap.js
Back
var heightBorder = 0; var screenWidth = jQuery(window).width(); function resetWrapperStyleHeight(){ jQuery('.sitemap_wrapper_parent').each(function(){ jQuery(this).css("height", "auto"); }); } function checkDisplay(){ screenWidth = jQuery(window).width(); if( screenWidth > 400 ){ var pos = null; var previousPos = null; var lines = []; var line = []; var lineSize = []; var currentLine = null; var setSize = true; var height = 0; var max_height = 0; jQuery('.sitemap_wrapper_parent').each(function( index, value){ pos = jQuery( this ).position().top; if( index == 0 ){ //set same value -> first pass previousPos = pos; } if( pos > previousPos ){ //new line previousPos = pos; //add line to result lines.push(line); //reset line line = []; //add current line line.push( this ); }else{ line.push( this ); } }); //add line to result lines.push(line); for(i = 0; i < lines.length; i++) { currentLine = lines[i]; max_height = 0; for(j = 0; j < currentLine.length; j++) { height = 0; var height2 = 0; var height3 = 0; jQuery( '#'+currentLine[j].id ).children().each(function(index, value){ height += jQuery( this ).outerHeight(true); }); jQuery( '#'+currentLine[j].id+' > div > a' ).children().each(function(index, value){ height3 += jQuery( this ).outerHeight(true); }); if( currentLine.length > 1 ){ if( height < height3 ){ height = height3; }else{ height3 = height; } if( height > max_height ){ max_height = height; lineSize[i] = max_height; } } } } for(i = 0; i < lines.length; i++) { currentLine = lines[i]; for(j = 0; j < currentLine.length; j++) { if( heightBorder > 0 ){ jQuery( '#'+currentLine[j].id ).height( (lineSize[i] + heightBorder) ); }else{ jQuery( '#'+currentLine[j].id ).height( lineSize[i] ); } } } }else{ resetWrapperStyleHeight(); } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings