},
autoHideArrows: function () {
- var res = this.arrowsEnabled && this.fluidbook.resize.reduceHorizontalMargins() && this.areArrowsOverlapingPublication() && ($("#helpView:visible").length === 0);
+ var res = this.arrowsEnabled && (this.fluidbook.resize===undefined || this.fluidbook.resize.reduceHorizontalMargins()) && this.areArrowsOverlapingPublication() && ($("#helpView:visible").length === 0);
return res;
},
$(document).on('click', ':not(a)', function () {
var selector = '#fluidbook';
if (!$(this).is(selector) && $(this).closest(selector).length === 0) {
- console.log('nok', $(this));
return true;
}
- console.log('ok', $(this));
$this.toggleInterface(1000);
return true;
});
this.contentlock.init();
+ this.nav = new FluidbookNav(this);
this.interface = new FluidbookInterface(this);
this.resize = new FluidbookResize(this);
this.pagetransitions = new FluidbookPageTransition(this);
$("#main").css('display', 'block');
- this.nav = new FluidbookNav(this);
if (!this.mobilefirst.enabled) {
this.slider = new FluidbookSlider(this);
}
$('body').addClass('menu-open');
$this.menuIsOpen = true;
- setInterval($this.fluidbook.resize.resizeMenu, 500);
+ setInterval(function () {
+ $this.fluidbook.resize.resizeMenu()
+ }, 500);
//$('#q').focus(); // Disabled for now because it triggers the keyboard to open on some mobile devices
});
});
// Recalculate available size for menu search results
- $(this.fluidbook).on('fluidbook.resize', this.fluidbook.resize.resizeMenu);
+ $(this.fluidbook).on('fluidbook.resize', function () {
+ $this.fluidbook.resize.resizeMenu();
+ });
// Handle swipe to close (it's only really practical to have this because swipe to open would interfere with main Fluidbook swipes)
// We are not using MMenu's "Drag" add-on because it doesn't close the main menu, only submenus on swipe.
}
}
- if (navType == 'menu') {
+ if (navType === 'menu') {
// Insert Chapters submenus
- if (this.chaptersMenuHTML != '') {
+ if (this.chaptersMenuHTML !=='') {
$('#menu_chapters').parent().append(this.chaptersMenuHTML);
}