$.each(ids, function (k, id) {
$('div.link[data-id="' + id + '"]').hide();
});
+ $this.updateAttachedLinks();
return false;
}
if (mode === 'toggle') {
$.each(ids, function (k, id) {
- console.log('toggle ' + id);
$('div.link[data-id$="' + id + '"]').toggleClass('show');
+ $this.updateAttachedLinks();
});
return false;
}
$.each(ids, function (k, id) {
if ($('[data-id="' + id + '"].show').length > 0) {
current = id;
- console.log(current);
}
}
);
$(l).find('img').css('pointer-events', 'none');
}
- console.log(maxZindex);
if (maxZindex !== undefined) {
$(l).css('z-index', maxZindex + 1)
}
$this.animateContentLink($(l), true, true);
}
$(l).addClass('show');
+ $this.updateAttachedLinks();
}, 10);
});
});
+
+
return false;
});
});
},
- stopLinkById: function (id) {
+ updateAttachedLinks: function () {
+ $('[data-attached]').each(function () {
+ var attached = $('.link[data-id="' + $(this).data('attached') + '"]');
+ var visible = true;
+ if (attached.length === 0 || !$(attached).is(':visible') || ($(attached).attr('data-hidden') === '1' && !$(attached).hasClass('show'))) {
+ console.log(attached,this);
+ visible = false;
+ }
+ if (visible) {
+ $(this).show();
+ } else {
+ $(this).hide();
+ }
+ });
+ },
+
+ stopLinkById: function (id) {
var link = $('.link[data-id="' + id + '"]');
if ($(link).length === 0) {
console.warn('Link ' + id + ' cant be stopped');
},
showLinkById: function (id) {
+ var $this = this;
var s = $('div.link[data-id="' + id + '"]');
s.show();
setTimeout(function () {
s.addClass('show');
+ $this.updateAttachedLinks();
}, 10);
},
hideLinkById: function (id) {
+ var $this = this;
var s = $('div.link[data-id="' + id + '"]');
if ($(s).attr('data-hidden') != '1') {
$(s).attr('data-hidden', '1').addClass('show');
}
setTimeout(function () {
$(s).removeClass('show');
+ $this.updateAttachedLinks();
}, 10);
},
hidePlacedLink: function (p, timeout) {
+ var $this = this;
if ($(p).length === 0) {
return;
}
$(p).find('.linkshowclose').remove();
setTimeout(function () {
$(p).hide();
- }, 500)
+ $this.updateAttachedLinks();
+ }, 500);
+ $this.updateAttachedLinks();
}, timeout);
},
$this.fluidbook.audioplayer.initAudios();
$this.initInlineSlideshows();
$this.fluidbook.l10n.translateAttributes();
+ $this.updateAttachedLinks();
}, 200);
$(this.fluidbook).trigger('fluidbook.links.ready');
+ $this.updateAttachedLinks();
this.resize();
},
if (animateBookmarks) {
this._blink($("#links .bookmark:not([data-enabled])"));
}
+ this.updateAttachedLinks();
},
_blink: function (el, delay) {
.css({width: iw, height: ih, transform: 'scale(' + scale + ')'});
}
});
+ this.updateAttachedLinks();
},
rolloverEnter: function (iid) {