?
Path : /home/admin/public_html/old/happy2/templates/ja_travel/blocks/ |
Current File : /home/admin/public_html/old/happy2/templates/ja_travel/blocks/fixheight.php |
<?php /** * ------------------------------------------------------------------------ * JA Travel Template for Joomla 2.5 & 3.0 * ------------------------------------------------------------------------ * Copyright (C) 2004-2011 J.O.O.M Solutions Co., Ltd. All Rights Reserved. * @license - Copyrighted Commercial Software * Author: J.O.O.M Solutions Co., Ltd * Websites: http://www.joomlart.com - http://www.joomlancers.com * This file may not be redistributed in whole or significant part. * ------------------------------------------------------------------------ */ // No direct access defined('_JEXEC') or die; ?> <script type="text/javascript"> /*fix height for middle area columns*/ function fixColsHeight () { resetMinHeight('ja-left1'); resetMinHeight('ja-left2'); resetMinHeight('ja-left'); resetMinHeight('ja-right1'); resetMinHeight('ja-right2'); resetMinHeight('ja-right'); resetMinHeight('ja-current-content'); resetMinHeight('ja-content-main'); resetMinHeight('ja-inset1'); resetMinHeight('ja-inset2'); resetMinHeight('ja-main'); equalHeight (['ja-left', 'ja-main', 'ja-right']); fixHeight (['ja-right1', 'ja-right2'], ['ja-right'], ['ja-right-mass-top', 'ja-right-mass-bottom']); fixHeight (['ja-left1', 'ja-left2'], ['ja-left'], ['ja-left-mass-top', 'ja-left-mass-bottom']); fixHeight (['ja-current-content', 'ja-inset1', 'ja-inset2'],['ja-main'], ['ja-content-mass-top','ja-content-mass-bottom']); fixHeight (['ja-content-main'], ['ja-current-content'], ['ja-content-top', 'ja-content-bottom']); } function resetMinHeight(el) { el = $(el); if (el) el.setStyle('min-height', '0px'); } window.addEvent ('load', function () { //fixColsHeight.delay (100, this); updateHeight.periodical(500); }); function updateHeight () { if ($('ja-container')) { var newH = $('ja-container').getCoordinates().height; if (!this.oldH || this.oldH != newH) { fixColsHeight(); //update newH after fix var newH = $('ja-container').getCoordinates().height; this.oldH = newH; } } } </script>