]> _ Git - fluidbook-html5.git/commitdiff
wait #4680 @4
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 10 Sep 2021 17:06:45 +0000 (19:06 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 10 Sep 2021 17:06:45 +0000 (19:06 +0200)
41 files changed:
js/libs/aria/radio.js
js/libs/fluidbook/cart/fluidbook.cart.flexipan.js
js/libs/fluidbook/cart/fluidbook.cart.grandvision.js
js/libs/fluidbook/cart/fluidbook.cart.mif.js
js/libs/fluidbook/cart/fluidbook.cart.mopec.js
js/libs/fluidbook/cart/fluidbook.cart.puma.js
js/libs/fluidbook/fluidbook.articles.js
js/libs/fluidbook/fluidbook.audiodescription.js
js/libs/fluidbook/fluidbook.audioplayer.js
js/libs/fluidbook/fluidbook.bookmarks.js
js/libs/fluidbook/fluidbook.cart.js
js/libs/fluidbook/fluidbook.help.js
js/libs/fluidbook/fluidbook.input.js
js/libs/fluidbook/fluidbook.interface.js
js/libs/fluidbook/fluidbook.landingpage.js
js/libs/fluidbook/fluidbook.links.js
js/libs/fluidbook/fluidbook.menu.js
js/libs/fluidbook/fluidbook.nav.js
js/libs/fluidbook/fluidbook.notes.js
js/libs/fluidbook/fluidbook.pad.js
js/libs/fluidbook/fluidbook.print.js
js/libs/fluidbook/fluidbook.scorm.js
js/libs/fluidbook/fluidbook.search.js
js/libs/fluidbook/fluidbook.share.js
js/libs/fluidbook/fluidbook.slider.js
js/libs/fluidbook/fluidbook.sound.js
js/libs/fluidbook/fluidbook.stats.js
js/libs/fluidbook/fluidbook.tooltip.js
js/libs/fluidbook/fluidbook.widget.js
js/libs/fluidbook/forms/fluidbook.form.avery.js
js/libs/fluidbook/forms/fluidbook.form.bourbon.js
js/libs/fluidbook/links/fluidbook.links.zoom.js
js/libs/fluidbook/links/fluidbook.links.zoomhd.js
js/libs/fluidbook/menu/fluidbook.chapters.js
js/libs/fluidbook/menu/fluidbook.index.js
js/libs/fluidbook/slideshow/fluidbook.slideshow.vacheron.js
js/libs/fluidbook/special/atlanticdownload.js
js/libs/fluidbook/special/mirakleaster2021.js
js/libs/fluidbook/special/wescosales.js
js/main.js
style/fluidbook.less

index 7b1968fa8cb1a35da6fb94ae1e5d986102ddc96d..97b3f13d1a087b683dbbb34129ee1077af5f87ca 100644 (file)
@@ -10,7 +10,7 @@
         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;
                 }
index 91c51849a91890a7b12002f7cf1f4c8bff659809..e2d646a5b459d8369e21e25f84f2b3ee62e6b329 100644 (file)
@@ -10,7 +10,7 @@ FluidbookCartFlexipan.prototype = {
     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;
         });
index 5c8d5ca5b0ada5bf6941be27ddea48d333210739..70d6cfffe3ad04d7100f669bf50d56c907b8b5c6 100644 (file)
@@ -19,7 +19,7 @@ FluidbookCartGrandVision.prototype = {
 
         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();
@@ -29,22 +29,22 @@ FluidbookCartGrandVision.prototype = {
             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);
@@ -63,7 +63,7 @@ FluidbookCartGrandVision.prototype = {
             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 ?',
@@ -84,12 +84,12 @@ FluidbookCartGrandVision.prototype = {
             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',
@@ -127,12 +127,12 @@ FluidbookCartGrandVision.prototype = {
             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;
         });
index 0e8c69b54f9ac7890d135e3089543b11d4e6fcc9..4970c9e3d4f58d03943dbd981de8acbe617a518a 100644 (file)
@@ -10,11 +10,11 @@ FluidbookCartMIF.prototype = {
     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) {
index 39f59e2d03920f37db5a978ccdd520bc26c6017a..e228490ed41fba6208569a5c801b141edfdf7123 100644 (file)
@@ -56,13 +56,13 @@ FluidbookCartMopec.prototype = {
             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;
         })
index 26925ef834ec9a33f58aa00c06085f4a77eeebf4..b9863e780b81e0a0e0a034d161a094f01898bce1 100644 (file)
@@ -10,12 +10,12 @@ FluidbookCartPuma.prototype = {
     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) {
@@ -24,7 +24,7 @@ FluidbookCartPuma.prototype = {
             return false;
         });
 
-        $(document).on('click', '.emptyCart', function () {
+        $(document).on(this.fluidbook.input.clickEvent, '.emptyCart', function () {
             $.confirm({
                 backgroundDismiss: true,
                 title: 'Empty my cart',
index 2cfabe8e5f26029e53fb0828678992a1e6367100..f84d5270a9a204bc47dff1a927a17258c1537b5a 100644 (file)
@@ -15,7 +15,7 @@ FluidbookArticles.prototype = {
             $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);
@@ -27,7 +27,7 @@ FluidbookArticles.prototype = {
             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;
index 3c954d07910864fa2ab7765dfbf0e160a1102538..4403a47e6988be3d4a9a03f6d262cc498c218089 100644 (file)
@@ -51,7 +51,7 @@ FluidbookAudioDescription.prototype = {
         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;
 
index 50ffac77f17b7922fb2058a1bb78bf468bab5ca7..ebb78e0790345f4965ca0114c6aa54b76f831b95 100644 (file)
@@ -6,7 +6,7 @@ function FluidbookAudioPlayer(fluidbook) {
 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();
index 8599e318a0d913a657aedb620b8c85bd5ca90730..38214edd77d35141d9a68eed4fb7422d96bc31ed 100644 (file)
@@ -26,13 +26,13 @@ function FluidbookBookmarks(fluidbook) {
 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;
@@ -52,7 +52,7 @@ FluidbookBookmarks.prototype = {
             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();
index 356629b05a78273a71f3a2742b7490a39c782e00..45852a29f749ffc93c197386509ec9aab996df24 100644 (file)
@@ -16,7 +16,7 @@ FluidbookCart.prototype = {
         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;
             }
@@ -25,7 +25,7 @@ FluidbookCart.prototype = {
             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) {
@@ -141,7 +141,7 @@ FluidbookCart.prototype = {
             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')) {
index efd47cf1f0fa051704c8c349eea9cac9c23dd599..1472ac87d8e298c0fd7e99f80d6953e6d8ebee83 100644 (file)
@@ -195,7 +195,7 @@ FluidbookHelp.prototype = {
     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();
@@ -275,7 +275,7 @@ FluidbookHelp.prototype = {
             $("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();
                 });
             }
index b6a6ac6251a6ff90997d72de9498fe57ae09c6b8..720da7d34aa5f39c780dbb54d4b5d20987ed7f77 100644 (file)
@@ -9,12 +9,28 @@ function FluidbookInput(fluidbook) {
     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 {
index bb3bc2b2db24c4cc8563f5451f34726db57005c5..a906201131383ff9086ae5ddc4c6b0246b7a1964 100644 (file)
@@ -40,7 +40,7 @@ FluidbookInterface.prototype = {
             }
 
             $('#interface').append(res);
-            $(document).on('click', '#next', function () {
+            $(document).on(this.fluidbook.input.clickEvent, '#next', function () {
                 if ($this.fluidbook.help.isVisible()) {
                     return false;
                 }
@@ -52,7 +52,7 @@ FluidbookInterface.prototype = {
                 }
                 return false;
             });
-            $(document).on('click', '#previous', function () {
+            $(document).on(this.fluidbook.input.clickEvent, '#previous', function () {
                 if ($this.fluidbook.help.isVisible()) {
                     return;
                 }
@@ -64,7 +64,7 @@ FluidbookInterface.prototype = {
                 }
                 return false;
             });
-            $(document).on('click', '#first', function () {
+            $(document).on(this.fluidbook.input.clickEvent, '#first', function () {
                 if ($this.fluidbook.help.isVisible()) {
                     return false;
                 }
@@ -72,7 +72,7 @@ FluidbookInterface.prototype = {
                 $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;
                 }
@@ -155,7 +155,7 @@ FluidbookInterface.prototype = {
                     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;
index 7ec58b7d1b3e28147695754ade2831352a3fecb9..bcdaef42208c3f7e72c7936fa385a11d2f6fd49b 100644 (file)
@@ -35,7 +35,7 @@ FluidbookLandingPage.prototype = {
             // 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);
             });
         }
     },
index d5df0bf4e64c0830668423bac1205d31266a1c12..8f33421c376329b7c5fece4c56c16409b7fc7b06 100644 (file)
@@ -29,6 +29,29 @@ FluidbookLinks.prototype = {
         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 () {
@@ -48,29 +71,29 @@ FluidbookLinks.prototype = {
             });
         });
 
-        $(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;
         });
@@ -93,7 +116,7 @@ FluidbookLinks.prototype = {
         });
 
 
-        $(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;
             }
@@ -143,16 +166,17 @@ FluidbookLinks.prototype = {
             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') {
@@ -231,7 +255,7 @@ FluidbookLinks.prototype = {
             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);
@@ -239,13 +263,13 @@ FluidbookLinks.prototype = {
             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);
@@ -253,7 +277,7 @@ FluidbookLinks.prototype = {
             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');
index ef9852ae1bed085d391e91457954dd90a3024bf1..110141501de5480967ffa3af2079ab5ec6711bf2 100644 (file)
@@ -11,7 +11,7 @@ FluidbookMenu.prototype = {
         // 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();
index 17b1e6ca3df7b19bcef3ea52e9214a83830bee58..13e2096cdbe0fe78038ca59c8e941d2d7293e1aa 100644 (file)
@@ -89,13 +89,13 @@ FluidbookNav.prototype = {
         });
 
 
-        $(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();
         });
 
@@ -404,7 +404,7 @@ FluidbookNav.prototype = {
 
                 }
 
-                $(link).on('click', function () {
+                $(link).on(this.fluidbook.input.clickEvent, function () {
                     if (homeRequireLoader) {
                         var $thislink = this;
                         fluidbook.displayLoader();
@@ -714,7 +714,7 @@ FluidbookNav.prototype = {
         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 () {
@@ -724,13 +724,13 @@ FluidbookNav.prototype = {
         });
 
         // 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;
             }
@@ -739,7 +739,7 @@ FluidbookNav.prototype = {
         });
 
         // 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?
@@ -753,7 +753,7 @@ FluidbookNav.prototype = {
         });
 
         // 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;
@@ -764,7 +764,7 @@ FluidbookNav.prototype = {
         });
 
         // 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 () {
                 });
@@ -773,13 +773,13 @@ FluidbookNav.prototype = {
         });
 
         // 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;
         });
@@ -793,7 +793,7 @@ FluidbookNav.prototype = {
         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;
@@ -845,7 +845,7 @@ FluidbookNav.prototype = {
             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
@@ -883,7 +883,7 @@ FluidbookNav.prototype = {
         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;
@@ -909,7 +909,7 @@ FluidbookNav.prototype = {
             }
         });
 
-        $(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'));
index c70665685a648523208ffeaca4188b41ee32689c..c8c7a6d76932b48fe531ea6561a479bf284182f7 100644 (file)
@@ -10,7 +10,7 @@ function FluidbookNotes(fluidbook) {
 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();
@@ -19,11 +19,11 @@ FluidbookNotes.prototype = {
                 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;
         });
@@ -45,7 +45,7 @@ FluidbookNotes.prototype = {
             }, 150);
         });
 
-        $(document).on('click', '.notes-toggle', function () {
+        $(document).on(this.fluidbook.input.clickEvent, '.notes-toggle', function () {
             $this.toggleNotes();
             return false;
         });
index 5d0aba9db34d0b0a0e40e53688534869ada310c4..34a245140e33e34a755ca53dd8c7a34dce0d4999 100644 (file)
@@ -14,7 +14,7 @@ FluidbookPad.prototype = {
        },\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
index 652fe6420b09a11da015478407d9d3b3e432d928..6352ad7bd86248df0b66f00144efa09cd1156242 100644 (file)
@@ -9,7 +9,7 @@ FluidbookPrint.prototype = {
         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)
@@ -65,7 +65,7 @@ FluidbookPrint.prototype = {
         });
 
         // 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();
index d3d2628e2dd5215389b35ac24f45216e84fa9380..553841e2ad0d6ebfb6b78f736ff62f84e29e6f69 100644 (file)
@@ -19,7 +19,7 @@ FluidbookScorm.prototype = {
             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');
index 1aed7e9bd7a13ccbb34a9f56b4d56d465109346b..6270325654ec44023a0fae254a27796e846229a5 100644 (file)
@@ -80,26 +80,26 @@ FluidbookSearch.prototype = {
         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();
         });
 
index 547221e9cae8e690784c92fbf2f4f50102d25abd..7555ace5c8e9c87a3c188091f36f4dbc6e007525 100644 (file)
@@ -3,7 +3,7 @@ function FluidbookShare(fluidbook) {
     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') {
@@ -17,7 +17,7 @@ function FluidbookShare(fluidbook) {
             });
         }
 
-        $(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;
         });
@@ -38,7 +38,7 @@ function FluidbookShare(fluidbook) {
         });
 
         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();
index a6f54b79f4c5bea637a07182a65b9e69b98c4ca1..d88a2e980cf0d6fd62048ae845b367cac83263a6 100644 (file)
@@ -10,11 +10,11 @@ function FluidbookSlider(fluidbook) {
 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')));
             }
@@ -27,7 +27,7 @@ FluidbookSlider.prototype = {
             $this.updateCursorPosition();
         });
 
-        $("#sliderback").on('click', function (e) {
+        $("#sliderback").on(this.fluidbook.input.clickEvent, function (e) {
             if ($this.fluidbook.pagetransitions.transitionning) {
                 return;
             }
index f84e1d20ccc20d855715a43f87dc97cec5f8243d..8456515a215a2642876cb98ecec0416bfec98c15 100644 (file)
@@ -23,7 +23,7 @@ FluidbookSound.prototype = {
         $(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;
         });
@@ -32,7 +32,7 @@ FluidbookSound.prototype = {
             $this.playSoundForPage(data);
         });
 
-        $(document).one('click', '*', function () {
+        $(document).one(this.fluidbook.input.clickEvent, '*', function () {
             try {
                 $this.audios['empty'].play();
                 $this.playing = $this.audios['empty'];
index d5f6c623b5982b74fe0082eecc073ce58a8deae5..d1f243d751d3bd9b9f0ee85dee2d695ee04177be 100644 (file)
@@ -45,7 +45,7 @@ function FluidbookStats(fluidbook) {
 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
index 50bdba0de793a42d71488f1fbe310930142ad3d2..d2042c0474d946261ac086f4351a48013e1668c2 100644 (file)
@@ -24,7 +24,7 @@ FluidbookTooltip.prototype = {
         });
 
 
-        $(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);
@@ -40,7 +40,7 @@ FluidbookTooltip.prototype = {
         $(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();
         });
 
@@ -212,7 +212,7 @@ FluidbookTooltip.prototype = {
     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();
         });
     },
index 2b7e34a14ed50af96aeff3a15983010903b54e78..f1c6bf59c5549e6089479af56adfdb11ca7c546d 100644 (file)
@@ -25,7 +25,7 @@ FluidbookWidget.prototype = {
             $this.update();
         });
 
-        $("#fluidbook").on('click', function () {
+        $("#fluidbook").on(this.fluidbook.input.clickEvent, function () {
             return $this.click();
         });
         this.update(true);
index 2650c3d197b9e378cb09f729f8de3cc9b3d52c54..126685bcdb0d9c8e8cb1d77c01368bda56170c45 100644 (file)
@@ -55,7 +55,7 @@ FluidbookAveryForm.prototype = {
     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();
@@ -65,7 +65,7 @@ FluidbookAveryForm.prototype = {
             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;
         });
index 30f6cf5d2642c44e079c05abf4e54c3c1efd10ca..f1db119c5c5cabecf844f0a9eb4e8ac2164eea87 100644 (file)
@@ -10,7 +10,7 @@ FluidbookBourbonForm.prototype = {
 
         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();
index 64997460a45f866406b92ec38a4c5ed35aa3b895..f40a46068b20e4edf6d2d016cc696eb76e4b8840 100644 (file)
@@ -11,7 +11,7 @@ FluidbookLinksZoom.prototype = {
         // 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;
@@ -26,7 +26,7 @@ FluidbookLinksZoom.prototype = {
             $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;
         });
index 1cd7a7ce253e5c27562017cfc5a042f2e3812f8d..c42a0b848235d71cb61200456f88dbab0f804e74 100644 (file)
@@ -44,7 +44,7 @@ FluidbookLinksZoomHD.prototype = {
             }
         });
 
-        $(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;
index 2ceb747f3e4f2fe65f893e35b555cf9223041de9..c4af374c94ea1b4bbcb618260f272b8abd39f986 100644 (file)
@@ -54,7 +54,7 @@ FluidbookChapters.prototype = {
     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);
@@ -66,7 +66,7 @@ FluidbookChapters.prototype = {
             });
         }
 
-        $(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) {
@@ -219,9 +219,9 @@ FluidbookChapters.prototype = {
             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') {
index 3cbfc9d9fd7f82a57aa981d444a0406275610b2b..6faeabc0d93ba08aa775dfcbfd38b2ab707123e8 100644 (file)
@@ -200,7 +200,7 @@ FluidbookIndex.prototype = {
         }
         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) {
index 14bb1443ba4b06d0a1844fe62706e2f5142f50c9..5d202ce790fea6d4188d41a2b72a3dfec5daec5e 100644 (file)
@@ -7,17 +7,17 @@ FluidbookVacheronSlideshow.prototype = {
 
     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;
         });
index f9cf9e17eb6f6ae7ed221f92dbc9fd80b49a76ae..7c8df02f30a7dc23f7f8efaff5197d306907c785 100644 (file)
@@ -8,18 +8,18 @@ var AtlanticDL = {
     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());
@@ -27,7 +27,7 @@ var AtlanticDL = {
             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;
         });
index dcb558486392edcf536e8b435b2594d5e543c5e7..6115465b123952514d81065965534958c86f4298 100644 (file)
@@ -1,7 +1,7 @@
 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,
index 12ff511f36acfb83bfd222259495c7848cc3a584..72b86ba8f99a69f54a52202f414f4207a90c71a6 100644 (file)
@@ -38,12 +38,12 @@ function initWescoNav() {
 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;
     });
index 58e25d16f6240c0f89a25a6aab298f0dc9bf7e42..01b0172a540a63814fbfb11a6aa0721896e0a80d 100644 (file)
@@ -37,6 +37,7 @@ try {
         INITED = false;
 
         if (SETTINGS && SETTINGS.phonegap) {
+            $('body').addClass('cordova').addClass('cordova-' + SETTINGS.phonegap);
             loadPhonegap();
         } else {
             setTimeout(function () {
@@ -310,12 +311,12 @@ try {
             }
         });
 
-        $(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>';
@@ -343,7 +344,7 @@ try {
             return false;
         });
 
-        $(document).on('click', 'a.appswitchlocale', function () {
+        $(document).on(this.fluidbook.input.clickEvent, 'a.appswitchlocale', function () {
             try {
                 fluidbook.displayLoader();
                 if ($(".mview").length > 0) {
@@ -377,7 +378,7 @@ try {
 
         $("#logo").click(clickLogo);
 
-        $(document).on('click', '.lazy', function () {
+        $(document).on(this.fluidbook.input.clickEvent, '.lazy', function () {
             return false;
         });
 
index a7d6e183bf4579dba470f5f7b9accea182599f91..3db3466ec6f16f1642086e111fc751d53d4b2fa9 100644 (file)
@@ -88,6 +88,10 @@ a {
   -webkit-font-smoothing: antialiased;
 }
 
+body.cordova-ios * {
+  -webkit-user-select: none;
+}
+
 img {
   border: 0;
   box-sizing: content-box;
@@ -3065,7 +3069,7 @@ body > input {
   opacity: 0;
   pointer-events: none;
   position: absolute;
-  top:-20000px;
+  top: -20000px;
 }
 
 @import "mobilefirst.less";