1/** 2 * @file 3 * Controller para efectos aos 4 */ 5 6(($, Drupal, drupalSettings) => { 7 Drupal.behaviors.aosController = { 8 attach: (context) => { 9 10 AOS.init({duration: 1200, disable: 'mobile', once: false}); 11 12 $(".agenda__event-on").click(function () { 13jQuery(this).parent().parent().find(".agenda__event").fadeOut(); 14jQuery(this).parent().parent().addClass("expanded"); 15 16jQuery(this).parent().parent().attr('style', 'padding-bottom: ' + (Math.ceil(jQuery(this).find(".agenda__event").children().length / 2)*115 + 15) + 'px') 17 18jQuery(this).find(".agenda__event").fadeIn(); 19 20 21 22 }); 23 24 $(".agenda__event-on").mouseleave(function () { 25 // jQuery(this).find(".agenda__event").fadeOut(); 26 }); 27 28 } 29 }; 30 31})(jQuery, Drupal, drupalSettings); 32; 33/** 34 * JavaScript súper simple para "Ver más" 35 */ 36console.log('=== ARCHIVO JS CARGADO ==='); 37(function ($, Drupal) { 38 'use strict'; 39 40 Drupal.behaviors.cardsShowMore = { 41 attach: function (context, settings) { 42 console.log('Behavior cardsShowMore attached'); 43 44 // Usar delegación de eventos 45 $(document).off('click.cardsShowMore').on('click.cardsShowMore', '.btn-show-more', function(e) { 46 e.preventDefault(); 47 48 const $btn = $(this); 49 const $container = $btn.closest('.block-card__wrapper'); 50 const $hiddenCards = $container.find('[data-hidden]'); 51 52 console.log('Container:', $container.length); 53 console.log('Cards ocultas:', $hiddenCards.length); 54 55 if ($hiddenCards.length > 0) { 56 $hiddenCards.show(300).removeAttr('data-hidden'); 57 $btn.hide(); 58 console.log('Cards mostradas'); 59 } else { 60 console.log('No se encontraron cards ocultas'); 61 } 62 }); 63 } 64 }; 65 66})(jQuery, Drupal);;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.