Pathologic was missing because of a .git folder inside.
[yaffs-website] / web / modules / contrib / superfish / js / superfish.js
1 /**
2  * @file
3  * The Superfish Drupal Behavior to apply the Superfish jQuery plugin to lists.
4  */
5
6 (function ($, Drupal, drupalSettings) {
7
8   'use strict';
9
10   /**
11    * jQuery Superfish plugin.
12    *
13    * @type {Drupal~behavior}
14    *
15    * @prop {Drupal~behaviorAttach} attach
16    *   Attaches the behavior to an applicable <ul> element.
17    */
18   Drupal.behaviors.superfish = {
19     attach: function (context, drupalSettings) {
20       // Take a look at each menu to apply Superfish to.
21       $.each(drupalSettings.superfish || {}, function (index, options) {
22         var $menu = $('ul#' + options.id, context);
23
24         // Check if we are to apply the Supersubs plug-in to it.
25         if (options.plugins || false) {
26           if (options.plugins.supersubs || false) {
27             $menu.supersubs(options.plugins.supersubs);
28           }
29         }
30
31         // Apply Superfish to the menu.
32         $menu.superfish(options.sf);
33
34         // Check if we are to apply any other plug-in to it.
35         if (options.plugins || false) {
36           if (options.plugins.touchscreen || false) {
37             $menu.sftouchscreen(options.plugins.touchscreen);
38           }
39           if (options.plugins.smallscreen || false) {
40             $menu.sfsmallscreen(options.plugins.smallscreen);
41           }
42           if (options.plugins.supposition || false) {
43             $menu.supposition();
44           }
45         }
46       });
47     }
48   };
49 })(jQuery, Drupal, drupalSettings);