Upgraded imagemagick and manually altered pdf to image module to handle changes....
[yaffs-website] / web / modules / contrib / paragraphs / js / paragraphs.actions.js
1 /**
2  * @file
3  * Paragraphs actions JS code for paragraphs actions button.
4  */
5
6 (function ($, Drupal) {
7
8   'use strict';
9
10   /**
11    * Process paragraph_actions elements.
12    *
13    * @type {Drupal~behavior}
14    *
15    * @prop {Drupal~behaviorAttach} attach
16    *   Attaches paragraphsActions behaviors.
17    */
18   Drupal.behaviors.paragraphsActions = {
19     attach: function (context, settings) {
20       var $actionsElement = $(context).find('.paragraphs-dropdown').once('paragraphs-dropdown');
21       // Attach event handlers to toggle button.
22       $actionsElement.each(function () {
23         var $this = $(this);
24         var $toggle = $this.find('.paragraphs-dropdown-toggle');
25
26         $toggle.on('click', function (e) {
27           e.preventDefault();
28           $this.toggleClass('open');
29         });
30
31         $toggle.on('focusout', function (e) {
32           $this.removeClass('open');
33         });
34       });
35     }
36   };
37
38 })(jQuery, Drupal);