diff --git a/README.md b/README.md index 68ce852..3201c0b 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ you create. libraries: * [jQuery Cycle 3.x](https://github.com/malsup/cycle) * [JSON2](https://github.com/douglascrockford/JSON-js) - * [jQuery HoverIntent](https://github.com/briancherne/jquery-hoverIntent) * [jQuery Pause](https://github.com/tobia/Pause) ## INSTALLATION @@ -50,7 +49,6 @@ install some JavaScript libraries. The required libraries are: * [jQuery Cycle 3.x](https://github.com/malsup/cycle) in `/libraries/jquery.cycle` * [JSON2](https://github.com/douglascrockford/JSON-js) in `/libraries/json2` -* [jQuery HoverIntent](https://github.com/briancherne/jquery-hoverIntent) in `/libraries/jquery.hoverIntent` * [jQuery Pause](https://github.com/tobia/Pause) in `/libraries/jquery.pause` diff --git a/js/views_slideshow.js b/js/views_slideshow.js index abb4bca..11d29d2 100644 --- a/js/views_slideshow.js +++ b/js/views_slideshow.js @@ -278,12 +278,8 @@ Drupal.viewsSlideshow.action({"action": 'play', "slideshowID": uniqueID}); }; - if (jQuery.fn.hoverIntent) { - $(pagerItem).hoverIntent(mouseIn, mouseOut); - } - else { - $(pagerItem).hover(mouseIn, mouseOut); - } + $(pagerItem).hover(mouseIn, mouseOut); + }); } else { diff --git a/modules/views_slideshow_cycle/js/views_slideshow_cycle.js b/modules/views_slideshow_cycle/js/views_slideshow_cycle.js index 57d13be..900c884 100644 --- a/modules/views_slideshow_cycle/js/views_slideshow_cycle.js +++ b/modules/views_slideshow_cycle/js/views_slideshow_cycle.js @@ -111,13 +111,7 @@ var mouseOut = function () { Drupal.viewsSlideshow.action({ "action": 'play', "slideshowID": settings.slideshowId }); } - - if (jQuery.fn.hoverIntent) { - $('#views_slideshow_cycle_teaser_section_' + settings.vss_id).hoverIntent(mouseIn, mouseOut); - } - else { - $('#views_slideshow_cycle_teaser_section_' + settings.vss_id).hover(mouseIn, mouseOut); - } + $('#views_slideshow_cycle_teaser_section_' + settings.vss_id).hover(mouseIn, mouseOut); } // Pause on clicking of the slide. diff --git a/modules/views_slideshow_cycle/src/Commands/ViewsSlideshowCycleCommands.php b/modules/views_slideshow_cycle/src/Commands/ViewsSlideshowCycleCommands.php index 95ccfe5..13323fa 100644 --- a/modules/views_slideshow_cycle/src/Commands/ViewsSlideshowCycleCommands.php +++ b/modules/views_slideshow_cycle/src/Commands/ViewsSlideshowCycleCommands.php @@ -40,21 +40,6 @@ class ViewsSlideshowCycleCommands extends DrushCommands { ); } - /** - * Download and install the jquery.hoverIntent library. - * - * @command views:slideshow:hoverintent - * @aliases dl-hoverintent,views-slideshow-cycle-hoverintent - */ - public function downloadHoverIntent() { - $this->installLibrary( - 'jQuery HoverIntent', - 'libraries/jquery.hoverIntent', - 'jquery.hoverIntent.js', - 'https://raw.githubusercontent.com/briancherne/jquery-hoverIntent/master/jquery.hoverIntent.js' - ); - } - /** * Download and install the jQuery.pause library. * @@ -73,14 +58,13 @@ class ViewsSlideshowCycleCommands extends DrushCommands { /** * Download and install the jQuery Cycle. * - * Download and install JQuery hoverIntent, JSON2 and Pause libraries. + * Download and install JSON2 and Pause libraries. * * @command views:slideshow:lib * @aliases dl-cycle-lib,views-slideshow-cycle-lib */ public function downloadLib() { $this->downloadCycle(); - $this->downloadHoverIntent(); $this->downloadJson2(); $this->downloadPause(); } diff --git a/modules/views_slideshow_cycle/views_slideshow_cycle.libraries.yml b/modules/views_slideshow_cycle/views_slideshow_cycle.libraries.yml index b475acb..f482c2e 100644 --- a/modules/views_slideshow_cycle/views_slideshow_cycle.libraries.yml +++ b/modules/views_slideshow_cycle/views_slideshow_cycle.libraries.yml @@ -24,7 +24,7 @@ jquery_cycle: url: http://jquery.malsup.com/license.html gpl-compatible: true js: - /libraries/jquery.cycle/jquery.cycle.all.js: {} + /libraries/cycle/jquery.cycle.all.js: {} dependencies: - core/jquery @@ -36,7 +36,7 @@ json2: url: https://github.com/douglascrockford/JSON-js/blob/master/README gpl-compatible: true js: - /libraries/json2/json2.js: {} + /libraries/json-js/json2.js: {} jquery_pause: remote: https://github.com/tobia/Pause diff --git a/modules/views_slideshow_cycle/views_slideshow_cycle.theme.inc b/modules/views_slideshow_cycle/views_slideshow_cycle.theme.inc index e6bd3b7..f8de273 100644 --- a/modules/views_slideshow_cycle/views_slideshow_cycle.theme.inc +++ b/modules/views_slideshow_cycle/views_slideshow_cycle.theme.inc @@ -96,11 +96,6 @@ function template_preprocess_views_slideshow_cycle_main_frame(&$vars) { $_views_slideshow_processedCycles['#views_slideshow_cycle_main_' . $vss_id] = '#views_slideshow_cycle_main_' . $vss_id; - // Add hover intent library. - if ($settings['pause']) { - $vars['#attached']['library'][] = 'views_slideshow/jquery_hoverIntent'; - } - // Add the slideshow elements. $vars['attributes']['class'][] = 'views_slideshow_cycle_teaser_section'; diff --git a/views_slideshow.libraries.yml b/views_slideshow.libraries.yml index 4967778..b43f030 100644 --- a/views_slideshow.libraries.yml +++ b/views_slideshow.libraries.yml @@ -25,13 +25,3 @@ pager_bullets: component: css/views-slideshow-pager-bullets.css: {} -jquery_hoverIntent: - remote: https://github.com/briancherne/jquery-hoverIntent - version: 1.9 - license: - name: MIT - gpl-compatible: true - js: - /libraries/jquery.hoverIntent/jquery.hoverIntent.js: {} - dependencies: - - core/jquery diff --git a/views_slideshow.theme.inc b/views_slideshow.theme.inc index 403576d..94f4249 100644 --- a/views_slideshow.theme.inc +++ b/views_slideshow.theme.inc @@ -231,11 +231,6 @@ function template_preprocess_views_slideshow_pager_fields(&$vars) { ], ]; - // Add hover intent library. - if ($vars['settings']['views_slideshow_pager_fields']['views_slideshow_pager_fields_hover']) { - $vars['#attached']['library'][] = 'views_slideshow/jquery_hoverIntent'; - } - $vars['widget_id'] = $vars['attributes']['id']; // Add our class to the wrapper. $vars['attributes']['class'][] = 'views_slideshow_pager_field';