}
} else {
var view = args[1];
- if (this.currentPage == -1) {
- if (view == 'multimedia' || view == 'video') {
- var $this = this;
+ if (this.currentPage === -1) {
+ if (view === 'multimedia' || view === 'video' || view === 'iframe') {
var searchURL = args.join('/');
$.each(this.datas.links, function (pageNr, links) {
var hl = $('<root>' + links + '</root>');
return false;
}
});
- if (this.currentPage == -1) {
+ if (this.currentPage === -1) {
this.currentPage = 0;
}
} else {
this.currentPage = 0;
}
- $this.pageTransition(this.currentPage);
+ $this.pagetransitions.pageTransition(this.currentPage);
}
this.menu.openView(view, args[2], args[3], function () {
$this.hideSplash();
return this.fluidbook.datas.linksData[uid];
},
+ getLinkByHref: function (href) {
+ for (var i = 1; i <= this.fluidbook.datas.pages; i++) {
+ var res = $(this.fluidbook.datas.links[i]).find('a[href="' + href + '"]');
+ if (res.length > 0) {
+ return res.eq('0');
+ }
+ }
+ return null;
+ },
+
animateLinks: function (linksContainer, additionalDelay) {
var container = $(document);
if (linksContainer !== undefined) {
openIframe: function (iframe, callback) {
var $this = this;
- var a = $('a[href="#/iframe/' + iframe + '"]');
+ var href = '#/iframe/' + iframe;
+ var a = $('a[href="' + href + '"]');
+ if ($(a).length === 0) {
+ a = this.fluidbook.links.getLinkByHref(href);
+ }
var markup = decodeURIComponent($(a).attr('data-iframe'));
var view = '<div class="caption">' + this.closeButton() + '</div>';
view += '<div class="content noscroll"><div class="iframeHolder">';
if (!fullscreen) {
var ih = -1;
try {
- ih = $(iframe).get(0).contentWindow.document.body.offsetHeight;
+ ih = $(iframe).get(0).contentWindow.document.body.getBoundingClientRect().bottom;
} catch (e) {
ih = -1;
}
h = Math.min(ih, h);
}
}
-
break;
case 'cart':
w = 1024;