init: function () {
var $this = this;
- $(this.element).on('click', this.optionSelector, function () {
+ $(this.element).on(fluidbook.input.clickEvent, this.optionSelector, function () {
if ($(this).hasClass('disabled')) {
return true;
}
init: function () {
var $this = this;
this.items = this.fluidbook.cache.get('cart', []);
- $(document).on('click', '.exportCartPDF', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.exportCartPDF', function () {
$this.exportPDF();
return false;
});
this.slotHTML = '<div class="slot">' + getSpriteIcon('grandvision-add') + '</div>';
- $(document).on('click', '.slots [data-cart-delete]', function (e) {
+ $(document).on(this.fluidbook.input.clickEvent, '.slots [data-cart-delete]', function (e) {
$(this).closest('.item,.text').replaceWith($this.slotHTML);
$this.save();
$this.initRightSortable();
return false;
});
- $(document).on('click', '.slot', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.slot', function () {
$(this).replaceWith($this.getTextarea(''));
return false;
});
- $(document).on('click', '.grandvision-slideshow .next', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.grandvision-slideshow .next', function () {
$this.nextSlide();
return false;
});
- $(document).on('click', '.grandvision-slideshow .prev', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.grandvision-slideshow .prev', function () {
$this.prevSlide();
return false;
});
- $(document).on('click', '.grandvision-slideshow .dots a', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.grandvision-slideshow .dots a', function () {
var diff = $(this).data('i') - $this.currentSlide;
if (diff !== 0) {
$this.gotoSlide($(this).data('i'), diff >= 1 ? 1 : -1);
return true;
});
- $(document).on('click', '[data-action="delete"]', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '[data-action="delete"]', function () {
$.confirm({
backgroundDismiss: true,
title: 'Remove box ?',
return false;
});
- $(document).on('click', '.addbox', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.addbox', function () {
$this.addNewBox();
return false;
});
- $(document).on('click', '[data-action="rename"]', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '[data-action="rename"]', function () {
var h3 = $('.box>h3:eq(0)');
$.confirm({
title: 'Rename the box',
return false;
});
- $(document).on('click', '[data-action="export"]', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '[data-action="export"]', function () {
$this.exportBoxes();
return false;
});
- $(document).on('click', '[data-action="printbox"]', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '[data-action="printbox"]', function () {
$this.exportBoxes(true);
return false;
});
init: function () {
var $this = this;
this.items = this.fluidbook.cache.get('cart', []);
- $(document).on('click', '.exportCartPDF', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.exportCartPDF', function () {
$this.exportPDF();
return false;
});
- $(document).on('click', '.sendAsEmail', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.sendAsEmail', function () {
try {
$this.sendCartAsEmail();
} catch (err) {
return true;
});
- $(document).on('click', '#zoomPopupMenu a.button.ext', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '#zoomPopupMenu a.button.ext', function () {
var ref = $(this).parent().find('[data-cart-ref]').data('cart-ref');
$this.fluidbook.stats._ga('event', 'Fluidbook', 'see_website', ref);
return true;
});
- $(document).on('click', 'a[href$="customer/account/login/"]', function () {
+ $(document).on(this.fluidbook.input.clickEvent, 'a[href$="customer/account/login/"]', function () {
$this.fluidbook.stats._ga('event', 'Fluidbook', 'sign_in', $this.lastRefClicked);
return true;
})
init: function () {
var $this = this;
this.items = this.fluidbook.cache.get('cart', []);
- $(document).on('click', '.exportCartPDF', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.exportCartPDF', function () {
$this.exportPDF();
return false;
});
- $(document).on('click', '.exportCartXLS', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.exportCartXLS', function () {
try {
$this.exportXLS();
} catch (err) {
return false;
});
- $(document).on('click', '.emptyCart', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.emptyCart', function () {
$.confirm({
backgroundDismiss: true,
title: 'Empty my cart',
$this.resize();
});
- $(document).on('click touchend', '.mview[data-menu="article"] .articlesPrint', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.mview[data-menu="article"] .articlesPrint', function () {
var a = $(this).closest('article').attr('data-id');
var print_window = window.open('', 'print_article', 'height=400,width=600');
print_window.document.write($this.fluidbook.settings.articlesList[a].print);
return false;
});
- $(document).on('click touchend', '.mview[data-menu="article"] .articlesShare', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.mview[data-menu="article"] .articlesShare', function () {
$(".mview").remove();
$this.fluidbook.menu.openView('share', 'article:' + $(this).attr('data-id'), 'article');
return false;
this.audioplayerRight.addEventListener('ended', this.endPlaying.bind(this, this.audioplayerRight));
// Handle click
- $(document).on('click', '.' + this.buttonClass, function (e) {
+ $(document).on(this.fluidbook.input.clickEvent, '.' + this.buttonClass, function (e) {
var player, button;
FluidbookAudioPlayer.prototype = {
init: function () {
var $this = this;
- $(document).on('click', "audio + .visualPlayer", function () {
+ $(document).on(this.fluidbook.input.clickEvent, "audio + .visualPlayer", function () {
var audio = $(this).prev('audio').get(0);
if (audio.paused) {
audio.play();
FluidbookBookmarks.prototype = {
init: function () {
var $this = this;
- $(document).on('click touchend', '.bookmark', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.bookmark', function () {
$this.toggleBookmark(parseInt($(this).attr('data-page')));
$this.fluidbook.tooltip.hideTooltip();
return false;
});
- $(document).on('click', '.bookmarkssub a.send', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.bookmarkssub a.send', function () {
var subject = '%title%';
if ($this.fluidbook.settings.bookmark_email_title !== '') {
subject = $this.fluidbook.settings.bookmark_email_title;
return false;
});
- $(document).on('click', '.bookmarkssub a.download', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.bookmarkssub a.download', function () {
$(this).data('ios-preview', '1');
if (!navigator.onLine && $this.fluidbook.settings.phonegap) {
$this.fluidbook.alertInternetRequired();
this.enabled = true;
this.instance = this.createInstance();
- $(document).on('click', '[data-cart-delete]', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '[data-cart-delete]', function () {
if ($(this).closest('.override-delete').length > 0) {
return true;
}
return false;
});
- $(document).on('click', '[data-cart-ref]', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '[data-cart-ref]', function () {
try {
var qty = 1;
if ($(this).data('cart-qty') !== null) {
this.wrapper.prepend('<a href="#" class="minus">-</a>');
this.wrapper.append('<a href="#" class="plus">+</a>');
- this.wrapper.on('click', 'a', function () {
+ this.wrapper.on(this.fluidbook.input.clickEvent, 'a', function () {
if ($(this).hasClass('minus')) {
$this.increment(-1 * $this.step);
} else if ($(this).hasClass('plus')) {
initEvents: function () {
var $this = this;
- $(document).on('click', '.icon-help', function (e) {
+ $(document).on(this.fluidbook.input.clickEvent, '.icon-help', function (e) {
$this.show();
if ($this.fluidbook.nav.menuIsOpen) {
$this.fluidbook.nav.menuAPI.close();
$("body,#prev-arrows,#next-arrows").removeClass('help');
this.fluidbook.hideUnnecessaryButtons();
if (this.fluidbook.support.isMobile) {
- $("*").unbind('click', function () {
+ $("*").unbind(this.fluidbook.input.clickEvent, function () {
$this.hide();
});
}
this.hasKeyboard = false;
this.usingKeyboard = false;
this.forceKeyboard = false;
+ this.clickEvent = 'click';
+ this.hoverEvent = 'mouseover';
this.init();
}
FluidbookInput.prototype = {
init: function () {
var $this = this;
+
+ this.hoverEvent = 'mouseover'
+ this.clickEvent = 'click';
+ this.forceClickEvent = 'click';
+ if (this.fluidbook.settings.phonegap === 'ios') {
+ // document.body.addEventListener("touchstart", function (e) {
+ // e.preventDefault();
+ // e.stopPropagation();
+ // }, false);
+ this.clickEvent = 'touchend';
+ } else if (Modernizr.ftouch) {
+ this.clickEvent = 'click';
+ }
+
if (Modernizr.ftouch) {
this.hasTouch = true;
} else {
}
$('#interface').append(res);
- $(document).on('click', '#next', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '#next', function () {
if ($this.fluidbook.help.isVisible()) {
return false;
}
}
return false;
});
- $(document).on('click', '#previous', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '#previous', function () {
if ($this.fluidbook.help.isVisible()) {
return;
}
}
return false;
});
- $(document).on('click', '#first', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '#first', function () {
if ($this.fluidbook.help.isVisible()) {
return false;
}
$this.fluidbook.goFirstPage();
return false;
});
- $(document).on('click', '#last', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '#last', function () {
if ($this.fluidbook.help.isVisible()) {
return false;
}
return true;
});
} else {
- $(document).on('click', ':not(a)', function () {
+ $(document).on(this.fluidbook.input.clickEvent, ':not(a)', function () {
var selector = '#fluidbook';
if (!$(this).is(selector) && $(this).closest(selector).length === 0) {
return true;
// Click handler for all links inside iframe
// We must wait for the iframe to load before we can add a listener to the document
$('#landingPageIframe').on('load', function () {
- $(this).contents().on('click', 'a', $this.handleLink);
+ $(this).contents().on(this.fluidbook.input.clickEvent, 'a', $this.handleLink);
});
}
},
this.jumpToPageContainingLink = true;
var $this = this;
+
+ if (this.fluidbook.settings.phonegap === 'ios') {
+ $(document).on('touchstart touchend click', 'a.clickonly', function (e) {
+ e.preventDefault();
+ e.stopPropagation();
+ e.stopImmediatePropagation();
+
+ if (e.type === 'touchstart') {
+ $(this).data('touchstart', Date.now());
+ } else if (e.type === 'touchend') {
+ var start = $(this).data('touchstart');
+ if (start === null) {
+ return;
+ }
+ var diff = Date.now() - start;
+ if (diff > 300) {
+ return;
+ }
+ window.location = $(this).attr('href');
+ }
+ });
+ }
+
this.lowdef = this.fluidbook.support.android || this.fluidbook.support.iOS;
$(this.fluidbook).on('fluidbook.page.change.end', function () {
});
});
- $(document).on('click touchend', '[data-id] a', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '[data-id] a', function () {
var id = $(this).closest('[data-id]').attr('data-id');
$this.fluidbook.contentlock.addAction(id, 'click');
$this.fluidbook.gamify.linkClicked(id);
return true;
});
- $(document).on('click touchend', '.multimediaContainer[data-click-to-close="1"]', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.multimediaContainer[data-click-to-close="1"]', function () {
$this.fluidbook.menu.closeView();
return false;
});
- $(document).on('click', '[href^="#"]:not([href="#"])', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '[href^="#"]:not([href="#"])', function () {
location.hash = $(this).attr('href');
return false;
});
- $(document).on('click', '[data-wescosales-ref]', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '[data-wescosales-ref]', function () {
});
new ClipboardJS('[data-clipboard-text]');
- $(document).on('click', '[data-clipboard-text]', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '[data-clipboard-text]', function () {
$this.fluidbook.tooltip.displayTooltip($this.fluidbook.l10n.__('copied!'));
return true;
});
});
- $(document).on('click', 'a, [data-pseudolink-href]', function () {
+ $(document).on(this.fluidbook.input.clickEvent, 'a, [data-pseudolink-href]', function () {
if ($(this).is('#wopen')) {
return true;
}
return false;
});
+
$(document).on('mouseover', '[data-showid][data-showmode="showonhover"]', function () {
$this.showLinkById($(this).data('showid'));
return true;
}).on('mouseout', '[data-showid][data-showmode="showonhover"]', function () {
$this.hideLinkById($(this).data('showid'));
- }).on('click touchend', '[data-showid][data-showmode="showonhover"]', function () {
+ }).on(this.fluidbook.input.clickEvent, '[data-showid][data-showmode="showonhover"]', function () {
return false;
});
- $(document).on('click touchend', '[data-showid]:not([data-showmode="showonhover"])', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '[data-showid]:not([data-showmode="showonhover"])', function () {
var mode = $(this).data('showmode');
if (mode === 'toggle') {
return false;
});
- $(document).on('click touchend', '.linkshowclose', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.linkshowclose', function () {
var id = $(this).closest('[data-id]').data('id');
$('div.link[data-id="' + id + '"]').each(function () {
$this.hidePlacedLink(this);
return false;
});
- $(document).on('click touchend', '.textpopup', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.textpopup', function () {
$this.fluidbook.menu.__openView('text', $(this).data('text'), function () {
});
return false;
});
- $(document).on('click touchend', 'a.triggerlink[data-trigger-event="click"]', function () {
+ $(document).on(this.fluidbook.input.clickEvent, 'a.triggerlink[data-trigger-event="click"]', function () {
var ids = $(this).data('trigger-id').split(',');
$.each(ids, function (k, id) {
$this.triggerLinkById(id);
return false;
});
- $(document).on('click touchend', '[data-action]', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '[data-action]', function () {
var map = {'pdf': 'print', 'fullScreen': "fullscreen", 'locales': 'localesContainers', 'basket': 'cart'};
var action = $(this).data('action');
var extra = $(this).data('extra');
// Note: iOS won't catch click events unless the element has a cursor:pointer style
// This was added for #viewOverlay in the CSS
// More details: https://stackoverflow.com/a/16006333
- $(document).on('click', ".mview .button.back, #viewOverlay", function (e) {
+ $(document).on(this.fluidbook.input.clickEvent, ".mview .button.back, #viewOverlay", function (e) {
e.stopImmediatePropagation();
e.stopPropagation();
e.preventDefault();
});
- $(document).on('click', '#menuOpener', function (e) {
+ $(document).on(this.fluidbook.input.clickEvent, '#menuOpener', function (e) {
e.preventDefault();
$this.menuAPI.open();
});
// Close menu when a search result is clicked
- $(document).on('click', '#menuSearchResults a', function (e) {
+ $(document).on(this.fluidbook.input.clickEvent, '#menuSearchResults a', function (e) {
$this.menuAPI.close();
});
}
- $(link).on('click', function () {
+ $(link).on(this.fluidbook.input.clickEvent, function () {
if (homeRequireLoader) {
var $thislink = this;
fluidbook.displayLoader();
var $this = this;
// Home icon
- $(document).on('click', '.icon-home', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.icon-home', function () {
var $this = this;
fluidbook.displayLoader();
setTimeout(function () {
});
// Search icon in horizontal menu
- $(document).on('click', '#horizontalNav_searchIcon', function (event) {
+ $(document).on(this.fluidbook.input.clickEvent, '#horizontalNav_searchIcon', function (event) {
event.preventDefault()
$this.openSearch();
});
// Share icon
- $(document).on('click', '.icon-share', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.icon-share', function () {
if ($this.fluidbook.settings.phonegap !== 'android') {
return true;
}
});
// Download icon
- $(document).on('click', '.icon-download', function (event) {
+ $(document).on(this.fluidbook.input.clickEvent, '.icon-download', function (event) {
event.preventDefault();
// Should we show complex PDF download options? Or just give them the full PDF?
});
// Print icon
- $(document).on('click', '.icon-print', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.icon-print', function () {
if (!$this.fluidbook.printing.advancedPrint()) {
$this.fluidbook.print($(this));
return false;
});
// Bookmarks icon
- $(document).on('click', '.icon-bookmarks', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.icon-bookmarks', function () {
if ($(this).data('extra') !== null && $(this).data('extra') !== undefined) {
$this.fluidbook.menu.openView('bookmark', $(this).data('extra'), null, function () {
});
});
// Zoom In icon
- $(document).on('click', '.icon-zoomin', function (e) {
+ $(document).on(this.fluidbook.input.clickEvent, '.icon-zoomin', function (e) {
$this.fluidbook.desktop.clickZoom(e, 'in');
return false;
});
// Zoom Out icon
- $(document).on('click', '.icon-zoomout', function (e) {
+ $(document).on(this.fluidbook.input.clickEvent, '.icon-zoomout', function (e) {
$this.fluidbook.desktop.clickZoom(e, 'out');
return false;
});
var $this = this;
// Full screen toggle
- $(document).on('click', '.icon-fullscreen', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.icon-fullscreen', function () {
$this.menuAPI.close();
screenfull.toggle();
return false;
buttonID = 'menuClose';
// Click handler to close menu
- $(document).on('click', '#' + buttonID, function (e) {
+ $(document).on(this.fluidbook.input.clickEvent, '#' + buttonID, function (e) {
e.preventDefault();
// If the search is active, the close button should clear the search
search.append(res);
// Search submit button
- $(document).on('click', '#submitSearch', function (e) {
+ $(document).on(this.fluidbook.input.clickEvent, '#submitSearch', function (e) {
$("#searchForm").submit();
e.preventDefault();
return false;
}
});
- $(document).on('click', ".hint", function () {
+ $(document).on(this.fluidbook.input.clickEvent, ".hint", function () {
var e = $("#q").val().split(' ');
e.pop();
e.push($(this).attr('term'));
FluidbookNotes.prototype = {
init: function () {
var $this = this;
- $(document).on('click', '#horizontalNav_notes,[data-action="notes"]', function (event) {
+ $(document).on(this.fluidbook.input.clickEvent, '#horizontalNav_notes,[data-action="notes"]', function (event) {
event.preventDefault()
var rect = $(this).get(0).getBoundingClientRect();
left: -30 + rect.x + (rect.width / 2)
})
});
- $(document).on('click', '#notes-add', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '#notes-add', function () {
$this.addNote();
return false;
});
- $(document).on('click', '.note .remove', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.note .remove', function () {
$this.removeNote($(this).closest('.note'));
return false;
});
}, 150);
});
- $(document).on('click', '.notes-toggle', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.notes-toggle', function () {
$this.toggleNotes();
return false;
});
},\r
initEvents: function() {\r
var $this = this;\r
- $(document).on('click', '#down', function() {\r
+ $(document).on(this.fluidbook.input.clickEvent, '#down', function() {\r
if ($this.fluidbook.help.isVisible()) {\r
return;\r
}\r
var $this = this;
// Handle click on Print/Download button inside dialogue
- $(document).on('click', '#confirmChoice', function (event) {
+ $(document).on(this.fluidbook.input.clickEvent, '#confirmChoice', function (event) {
event.preventDefault();
// ToDo: Consider what happens if Fluidbook is self-hosted or offline (maybe here is not the best place to handle that)
});
// When there are no bookmarks a click on the bookmarks option will open the bookmarks help modal
- $(document).on('click', '.bookmarks-option.disabled', function (event) {
+ $(document).on(this.fluidbook.input.clickEvent, '.bookmarks-option.disabled', function (event) {
event.preventDefault();
$this.fluidbook.menu.quickCloseView();
this.linksToComplete = this.fluidbook.settings.scorm_variables.linkstocomplete.split(',');
}
- $(document).on('click', 'a', function () {
+ $(document).on(this.fluidbook.input.clickEvent, 'a', function () {
var link = $(this).closest('.link[data-id]');
if (link.length > 0) {
var id = link.data('id');
this.resultsNav = $('#' + this.resultsNavID);
//=== Event handlers
- $(document).on('click', '#menuSearchResults a', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '#menuSearchResults a', function () {
// Find the page number of the result so we can see where it sits in the list of returned results
var pageNumber = parseInt($(this).parents('.doubleThumb').attr('page'));
$this.openResultsNav(pageNumber);
});
- $(document).on('click', '.searchResultsNavField', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.searchResultsNavField', function () {
$this.closeResultsNav(true);
$this.fluidbook.nav.openSearch();
});
- $(document).on('click', '.searchResultsNext', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.searchResultsNext', function () {
$this.nextResultsPage();
});
- $(document).on('click', '.searchResultsPrev', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.searchResultsPrev', function () {
$this.previousResultsPage();
});
- $(document).on('click', '.searchResultsNavClose', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.searchResultsNavClose', function () {
$this.closeResultsNav();
});
if (this.isEnabled()) {
var $this = this;
if (this.fluidbook.settings.phonegap !== 'android') {
- $(document).on('click', '.share', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.share', function () {
var f = 'send' + ucfirst($(this).data('service'));
var url = $(this).data("url");
if (url === undefined || url === null || url === 'undefined') {
});
}
- $(document).on('click touchend', '[data-action="share"]', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '[data-action="share"]', function () {
$this.fluidbook.menu.openView("share", $(this).data('extra'), $(this).data('context'));
return false;
});
});
if (this.fluidbook.settings.phonegap === 'android') {
- $(document).on('click', '#shareLinks, #shareLinks a', function (e) {
+ $(document).on(this.fluidbook.input.clickEvent, '#shareLinks, #shareLinks a', function (e) {
e.stopPropagation();
e.stopImmediatePropagation();
e.preventDefault();
FluidbookSlider.prototype = {
init: function () {
var $this = this;
- $(document).on('click', function () {
+ $(document).on(this.fluidbook.input.clickEvent, function () {
$("#slider").removeClass('drag');
return true;
});
- $(document).on('click', '#sliderthumb a[data-page]', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '#sliderthumb a[data-page]', function () {
if ($this.fluidbook.canChangePage()) {
$this.fluidbook.setCurrentPage(parseInt($(this).attr('data-page')));
}
$this.updateCursorPosition();
});
- $("#sliderback").on('click', function (e) {
+ $("#sliderback").on(this.fluidbook.input.clickEvent, function (e) {
if ($this.fluidbook.pagetransitions.transitionning) {
return;
}
$(this.fluidbook).on('fluidbook.ready', function () {
$this.init();
});
- $(document).on('click touchend', '.icon-sound-off,.icon-sound-on', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.icon-sound-off,.icon-sound-on', function () {
$this.toggle();
return false;
});
$this.playSoundForPage(data);
});
- $(document).one('click', '*', function () {
+ $(document).one(this.fluidbook.input.clickEvent, '*', function () {
try {
$this.audios['empty'].play();
$this.playing = $this.audios['empty'];
FluidbookStats.prototype = {\r
init: function () {\r
var $this = this;\r
- $(document).on('click', 'a[data-track]', function () {\r
+ $(document).on(this.fluidbook.input.clickEvent, 'a[data-track]', function () {\r
$this.track(6, 0, $(this).attr('data-track'));\r
return true;\r
});\r
});
- $(document).on('mouseover', 'a[data-tooltip]', function (e) {
+ $(document).on(this.fluidbook.input.hoverEvent, 'a[data-tooltip]', function (e) {
$this.type = 'mouse';
$this.updateMousePosition(e);
$this.eventTriggered(this);
$(document).on('blur', 'a[data-tooltip],a[data-keyboard-tooltip]', function (e) {
$this.hideTooltip();
});
- $(document).on('click', '[data-tooltip-hide-on-click]', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '[data-tooltip-hide-on-click]', function () {
$this.hideTooltip();
});
showFixedTooltip: function (e, posX, posY, css) {
this.hideTooltip();
$(e).attr('data-pos-x', posX).attr('data-pos-y', posY).css(css).show();
- $(document).one('click', '*', function () {
+ $(document).one(this.fluidbook.input.clickEvent, '*', function () {
$(e).hide();
});
},
$this.update();
});
- $("#fluidbook").on('click', function () {
+ $("#fluidbook").on(this.fluidbook.input.clickEvent, function () {
return $this.click();
});
this.update(true);
init: function () {
var $this = this;
- $(document).on('click', '.mview[data-form="avery"] a.submit', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.mview[data-form="avery"] a.submit', function () {
$this.formInstance = $(".avery-form").parsley();
if ($this.formInstance.validate()) {
$this.submitForm();
return false;
});
- $(document).on('click', '.mview[data-form="avery"] a.close-avery', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.mview[data-form="avery"] a.close-avery', function () {
Cookies.set('form', '0', {expires: 365});
return false;
});
this.fluidbook.menu.openSuggest = this.openSuggest;
- $(document).on('click', '.cart-bourbon-suggest .submit', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.cart-bourbon-suggest .submit', function () {
$this.formInstance = $(".cart-bourbon-suggest").parsley();
if ($this.formInstance.validate()) {
$this.sendSuggestion();
// ToDo: consider re-using existing popinOverlay div?
$('body').append('<div id="zoomPopupOverlay"></div><div id="zoomPopupGroupWrapper"></div>');
- $(document).on('click', '.zoomPopup', function (e) {
+ $(document).on(this.fluidbook.input.clickEvent, '.zoomPopup', function (e) {
e.preventDefault();
$this.zoomLink(this);
return false;
$this.zoomLinkReset(true);
});
- $(document).on('click', '#zoomPopupOverlay, .zoomPopupWrapper, .zoomPopupClose, #zoomPopupBackground .bg', function (e) {
+ $(document).on(this.fluidbook.input.clickEvent, '#zoomPopupOverlay, .zoomPopupWrapper, .zoomPopupClose, #zoomPopupBackground .bg', function (e) {
$this.zoomLinkReset();
return false;
});
}
});
- $(document).on('click', '.zoomhdControls a', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.zoomhdControls a', function () {
var s = $this.scale;
if ($(this).hasClass('minus')) {
s -= 0.5;
initCascadeEvents: function () {
this.cascadeEventsInited = true;
if (this.style == 'ina') {
- $(document).on('click', 'ul.chapters a .right', function (e) {
+ $(document).on(this.fluidbook.input.forceClickEvent, 'ul.chapters a .right', function (e) {
var p = $(this).data('page');
if (p != '') {
$this.fluidbook.setCurrentPage(p);
});
}
- $(document).on('click', 'ul.chapters a', function () {
+ $(document).on(this.fluidbook.input.forceClickEvent, 'ul.chapters a', function () {
var li = $(this).parent();
var subnav = $(li).children('ul');
if ($(subnav).length) {
href = this.cascade ? 'href="#"' : "nohref";
}
if (this.style == 'classic') {
- res += '<li data-level="' + level + '" data-page="' + p + '"><a ' + href + ' class="level' + level + '">';
+ res += '<li data-level="' + level + '" data-page="' + p + '"><a ' + href + ' class="level clickonly ' + level + '">';
} else if (this.style == 'ina') {
- res += '<li style="background-color:#' + color + ';" data-level="' + level + '" data-page="' + p + '"><a ' + href + ' class="nodark level' + level + '">';
+ res += '<li style="background-color:#' + color + ';" data-level="' + level + '" data-page="' + p + '"><a ' + href + ' class="nodark level clickonly ' + level + '">';
}
res += '<span>' + chapter.label + '</span>';
if (href != 'nohref') {
}
var res = '<div class="thumb ' + side + '" ' + dim.thumb + '>';
if (link) {
- res += '<a role="button" aria-label="' + sprintf(this.fluidbook.l10n.__('goto page %s'), label) + '" href="#/page/' + page + '">';
+ res += '<a role="button" aria-label="' + sprintf(this.fluidbook.l10n.__('goto page %s'), label) + '" class="clickonly" href="#/page/' + page + '">';
}
res += this.fluidbook.loader.getThumbImage(page, true, dim.thumb);
if (link) {
initEvents: function () {
var $this = this;
- $(document).on('click', '.fb-slideshow-wrapper.vacheron .fb-slideshow-nav-next', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.fb-slideshow-wrapper.vacheron .fb-slideshow-nav-next', function () {
$this.gotoNextIndex($(this).closest('.fb-slideshow'));
return false;
});
- $(document).on('click', '.fb-slideshow-wrapper.vacheron .fb-slideshow-nav-prev', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.fb-slideshow-wrapper.vacheron .fb-slideshow-nav-prev', function () {
$this.gotoPrevIndex($(this).closest('.fb-slideshow'));
return false;
});
- $(document).on('click', '.fb-slideshow-wrapper.vacheron .fb-slideshow-nav-index', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.fb-slideshow-wrapper.vacheron .fb-slideshow-nav-index', function () {
$this.gotoIndex($(this).data('index'), $(this).closest('.fb-slideshow'));
return false;
});
init: function () {
var self = AtlanticDL;
- $(document).on('click', '[data-atlanticdownload-ref]', function (e) {
+ $(document).on(this.fluidbook.input.clickEvent, '[data-atlanticdownload-ref]', function (e) {
self.filterData($(this).data('atlanticdownload-ref'));
self.openPopup();
return false;
});
- $(document).on('click touchend', '#' + self.popupID + ' .close', function () {
+ $(document).on(fluidbook.input.clickEvent, '#' + self.popupID + ' .close', function () {
$(this).closest('#' + self.popupID).remove();
return false;
});
- $(document).on('click', '.language-link', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.language-link', function () {
self.currentLanguage = $(this).data('language');
$('#AtlanticDownloads').html(self.generateRows());
return false;
});
- $(document).on('click', '.atlantic-download-icon', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.atlantic-download-icon', function () {
fluidbook.stats._ga('event', 'documentdownload', 'file', $(this).attr('href'));
return true;
});
var MiraklEaster2021 = {
init: function () {
var $this = this;
- $(document).on('click', '[data-answers]', function () {
+ $(document).on(fluidbook.input.clickEvent, '[data-answers]', function () {
var answers = $(this).data('answers').toString().toLowerCase().trim().split(';');
$.confirm({
escapeKey: true,
function initWesco() {
fluidbook.search.registerPlugin(new WescoSalesSearchPlugin());
- $(document).on('click', '[data-wescosales-ref]', function (e) {
+ $(document).on(fluidbook.input.clickEvent, '[data-wescosales-ref]', function (e) {
setWescoSalesPanel($(this).data('wescosales-ref'), e);
return false;
});
- $(document).on('click touchend', '.wescosaleswindow .close', function () {
+ $(document).on(fluidbook.input.clickEvent, '.wescosaleswindow .close', function () {
$(this).closest('.wescosaleswindow').remove();
return false;
});
INITED = false;
if (SETTINGS && SETTINGS.phonegap) {
+ $('body').addClass('cordova').addClass('cordova-' + SETTINGS.phonegap);
loadPhonegap();
} else {
setTimeout(function () {
}
});
- $(document).on('click', "#popinOverlay", function () {
+ $(document).on(fluidbook.input.clickEvent, "#popinOverlay", function () {
closePopin();
return false;
});
- $(document).on('click', 'a.popin', function () {
+ $(document).on(fluidbook.input.clickEvent, 'a.popin', function () {
var iframeid = 'iframe_' + Math.round(Math.random() * 100000);
var html = '<div style="width:' + $(this).data('width') + 'px;height:' + $(this).data('height') + 'px"><iframe id="' + iframeid + '" width="' + $(this).data('width') + '" height="' + $(this).data('height') + '" src="' + $(this).data('src') + '" frameborder="0"></iframe></div>';
return false;
});
- $(document).on('click', 'a.appswitchlocale', function () {
+ $(document).on(this.fluidbook.input.clickEvent, 'a.appswitchlocale', function () {
try {
fluidbook.displayLoader();
if ($(".mview").length > 0) {
$("#logo").click(clickLogo);
- $(document).on('click', '.lazy', function () {
+ $(document).on(this.fluidbook.input.clickEvent, '.lazy', function () {
return false;
});
-webkit-font-smoothing: antialiased;
}
+body.cordova-ios * {
+ -webkit-user-select: none;
+}
+
img {
border: 0;
box-sizing: content-box;
opacity: 0;
pointer-events: none;
position: absolute;
- top:-20000px;
+ top: -20000px;
}
@import "mobilefirst.less";