Файловый менеджер - Редактировать - /var/www/iplanru/data/www/i-plan.ru/modules/mod_zooslider/tmpl/default.php
Назад
<?php // No direct access defined( '_JEXEC' ) or die; $lang=JFactory::getLanguage(); $lang=$lang->getTag(); $lang = substr($lang,0,2); if ($lang<>'ru'){$langtourl="&lang={$lang}";} ?> <script type="text/javascript"> jQuery(document).ready(function(){ function htmSlider(){ /* Зададим следующие параметры */ /* обертка слайдера */ var slideWrap = jQuery('.slide-wrap'); /* кнопки вперед/назад и старт/пауза */ var nextLink = jQuery('.next-slide'); var prevLink = jQuery('.prev-slide'); var playLink = jQuery('.auto'); /* Проверка на анимацию */ var is_animate = false; /* Изменяем клас у кнопки на клас паузы */ playLink.removeClass('play').addClass('pause'); /* Добавляем кнопкам вперед/назад клас который их скрывает */ jQuery('.navy').addClass('disable'); /* Инициализируем функцию autoplay() через переменную чтобы потом можно было ее отключить */ timer = setInterval(autoplay, 30000); /* ширина слайда с отступами */ var slideWidth = jQuery('.slide-item').outerWidth(); /* смещение слайдера */ var scrollSlider = slideWrap.position().left - slideWidth-12; /* Клик по ссылке на следующий слайд */ nextLink.click(function(){ if(!slideWrap.is(':animated')) { slideWrap.animate({left: scrollSlider}, 1000, function(){ slideWrap .find('.slide-item:first') .appendTo(slideWrap) .parent() .css({'left': 0}); }); } }); /* Клик по ссылке на предыдующий слайд */ prevLink.click(function(){ if(!slideWrap.is(':animated')) { slideWrap .css({'left': scrollSlider}) .find('.slide-item:last') .prependTo(slideWrap) .parent() .animate({left: 0}, 1000); } }); /* Функция автоматической прокрутки слайдера */ function autoplay(){ if(!is_animate){ is_animate = true; slideWrap.animate({left: scrollSlider}, 1000, function(){ slideWrap .find('.slide-item:first') .appendTo(slideWrap) .parent() .css({'left': 0}); is_animate = false; }); } } /* Клики по ссылкам старт/пауза */ playLink.click(function(){ if(playLink.hasClass('play')){ /* Изменяем клас у кнопки на клас паузы */ playLink.removeClass('play').addClass('pause'); /* Добавляем кнопкам вперед/назад клас который их скрывает */ jQuery('.navy').addClass('disable'); /* Инициализируем функцию autoplay() через переменную чтобы потом можно было ее отключить */ timer = setInterval(autoplay, 30000); } else { playLink.removeClass('pause').addClass('play'); /* показываем кнопки вперед/назад */ jQuery('.navy').removeClass('disable'); /* Отключаем функцию autoplay() */ clearInterval(timer); } }); } /* иницилизируем функцию слайдера */ htmSlider(); }); </script> <div class="module<?php echo $moduleclass_sfx; ?>"> <div class="zoosl-cat-description"> <?php if ($lang=="ru") echo "Выберите интересующую Вас отрасль"; ?> <?php if ($lang=="en") echo "Select your industry"; ?> </div> <div class="slider"> <div class="slide-list"> <div class="slide-wrap"> <?php echo modZoosliderHelper::getcat(); ?> </div> <div class="clear"></div> </div> </div> <div name="prev" class="navy prev-slide"></div> <div name="next" class="navy next-slide"></div> <div class="auto play" style="display: none;"></div> </div> <style> .clear { margin-top: -1px; height: 1px; clear:both; zoom: 1; } .slider{ font-family: "cuprumbold"; width: 496px; position: relative; overflow: hidden; overflow-x: scroll; margin: auto; } .zoosl-cat-description{ font-weight: 700; text-align: center; margin: 10px; font-size: 20px; } .slide-list{ font-family: "cuprumbold"; /*width: 2976px;*/ width: 3100px; display: inline-block; position: relative; margin: 0; padding: 0; } .slide-wrap { position: relative; left: 0px; top: 0; /* максимально возможная ширина обертки слайдера */ /*width: 10000000px;*/ } .zoosl-cat-title{ color: green; font-size: 14px; text-align: center; margin-top: 10px; } .slide-item{ border: 1px solid #ccc; border-radius: 5px; float: left; height: 84px; margin: 6px; width: 110px; -webkit-box-shadow: 0px 2px 2px 0px rgba(50, 50, 50, 0.75); -moz-box-shadow: 0px 2px 2px 0px rgba(50, 50, 50, 0.75); box-shadow: 0px 2px 2px 0px rgba(50, 50, 50, 0.75); } .slide-item:hover{ -webkit-box-shadow: 0px 1px 1px 0px rgba(50, 50, 50, 0.75); -moz-box-shadow: 0px 1px 1px 0px rgba(50, 50, 50, 0.75); box-shadow: 0px 1px 1px 0px rgba(50, 50, 50, 0.75); } .slide-item img{ display: inline-block; height: 32px; margin: 5px 40px; width: 32px; } .zoosl-name{ width: 110px; text-align: center; } .slide-item span{ display: inline-block; text-align: center; margin: 5px; font-size: 13px; } .slide-list > .slide-wrap > .active span{ color: #70B424; } .slider::-moz-selection { background: transparent; color: #fff; text-shadow: none; } .slider::selection { background: transparent; color: #fff; text-shadow: none; } /* навигация вперед/назад */ .navy { /* абсолютное позиционирование */ position: absolute; margin-top: -80px; z-index: 1; height: 25px; /* ширина элементов */ width: 50px; cursor: pointer; } .prev-slide { left: 0; background: url(/modules/mod_zooslider/tmpl/images/left-arrow.png) 11px 55% no-repeat; } .next-slide { right: 0; background: url(/modules/mod_zooslider/tmpl/images/right-arrow.png) 11px 55% no-repeat; } .navy.disable { /*background: #dbdbdb;*/ } /* навигация старт/пауза */ .auto { cursor: pointer; height: 26px; margin: 3px auto; width: 26px; } .play { background: url(/modules/mod_zooslider/tmpl/images/play.png) center no-repeat; } .pause { background: url(/modules/mod_zooslider/tmpl/images/pause.png) center no-repeat; } </style>
| ver. 1.4 |
Github
|
.
| PHP 5.4.45-1~dotdeb+6.1 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка