$res .= '<div class="content">';
$res .= '<h1>' . $r->titre . '</h1>';
$res .= '<h2>' . Cubedesigners_Util::getCategoryById($r->categories) . '</h2>';
+ $res .= $this->view->link(__('Fermer'), $this->currentPage->getParent()->getHref(), array('class' => 'close'));
$res.='</div>';
$slides = array();
$res.=$this->imageSlideshowScroll($slides, 439, array(), array('shortcuts' => false));
$res.='<div class="content">';
- $res.=$this->_button($r->url);
+
+ if (!empty($r->url->url)) {
+ $res.=$this->_button($r->url);
+ }
+
$res.=$this->markupDotclear($r->description);
$res.='</div>';
$res.='</article>';
$('.close').css("top", $('#detailContent').offset().top);
/*
$( "#detail" ).slideDown( "slow", function() {
-
+
isAnim = false;
addCloseAction();
currentSlide = 1;
autoSlide = true;
initSlideShow();
-
+
}).animate(
{ opacity: 1 },
{ queue: true, duration: 'slow' }
(function ($) {
function JQtaglist(element) {
+
+ // Store name of the list
+ this.storageID = $(element).parent().attr('id') + '-filter';
+
this.element = element;
this.perline = parseInt(this.element.data('perline'));
this.list = $(this.element.data('list'));
- this.init();
+
+ var initFilter = 0;
+ if (Modernizr.sessionstorage) {
+ var f = sessionStorage.getItem(this.storageID);
+ if (f !== null) {
+ initFilter = f;
+ }
+ }
+
+ this.init(initFilter);
}
JQtaglist.prototype = {
- init: function () {
+ init: function (initFilter) {
var $this = this;
this.element.on('click', "li[data-id]", function () {
- if ($(this).hasClass('active')) {
- return false;
- }
var id = $(this).data('id');
$this.filter(id);
- $(this).siblings().removeClass('active');
- $(this).addClass('active');
return false;
});
- $this.filter(0);
+ $this.filter(initFilter);
},
filter: function (id) {
var $this = this;
this.list.find('[data-cat][data-cat!="' + id + '"]').hide();
}
+ this.element.find('[data-id]').removeClass('active');
+ this.element.find('[data-id="' + id + '"]').addClass('active');
+
this.updateMargins();
setTimeout(function () {
$this.updateMargins();
}, 500);
+
+ if (Modernizr.sessionstorage) {
+ sessionStorage.setItem(this.storageID, id);
+ }
},
updateMargins: function () {
var i = 1;
clear: both;
margin:30px 0 30px 0;
}
+
+ .content {
+ position: relative;
+
+ .close {
+ display: inline-block;
+ position: absolute;
+ right: 0;
+ top: 50%;
+ margin-top: -13px; // Half of line-height to position vertically in the centre
+ background-image: url(../images/close-portfolio.png);
+ background-repeat: no-repeat;
+ background-position: right center;
+ padding-right: 33px;
+ color: #545454;
+ font-size: 14px;
+ line-height: 26px;
+
+ &:hover {
+ color: #000;
+ }
+ }
+ }
}
\ No newline at end of file