1(function ($) { 2 "use strict"; 3 4 /** 5 * Match Heights 6 */ 7 Drupal.behaviors.openyMatchHeight = { 8 attach: function (context, settings) { 9 if (settings.matchheight) { 10 if (settings.matchheight.selectors) { 11 var selectors = settings.matchheight.selectors; 12 // make them all equal heights. 13 $.each(selectors, function (index, value) { 14 $(value).matchHeight(); 15 }); 16 } 17 } 18 } 19 }; 20 21})(jQuery); 22; 23(function ($) { 24 "use strict"; 25 Drupal.openy_tour = Drupal.openy_tour || {}; 26 27 $(document).ajaxSuccess(function() { 28 var queryString = decodeURI(window.location.search); 29 if (/tour=?/i.test(queryString) || window.location.hash == '#tour=1') { 30 var processed = true; 31 $('.joyride-tip-guide').each(function() { 32 if ($(this).css('display') == 'block' && processed) { 33 $(this).find('.joyride-next-tip').trigger('click'); 34 processed = false; 35 } 36 }); 37 } 38 }); 39 40 Drupal.behaviors.openy_tour = { 41 attach: function (context, settings) { 42 $('body').on('tourStart', function () { 43 window.location.hash = 'tour=1'; 44 Drupal.openy_tour.click_button(); 45 }); 46 $('body').on('tourStop', function () { 47 window.location.hash = ''; 48 }); 49 Drupal.openy_tour.focus_on_button(); 50 } 51 }; 52 53 Drupal.openy_tour.click_button = function () { 54 $('.joyride-tip-guide').each(function() { 55 // Hide original next button if custom is appear. 56 if ($(this).find('.openy-click-button').length > 0) { 57 $(this).find('.joyride-next-tip').hide(); 58 } 59 }); 60 $('.openy-click-button').on('click', function (e) { 61 e.preventDefault(); 62 var selector = $(this).data('tour-selector'), 63 element = {}; 64 // Click on link if class/id is provided. 65 if ($(selector).length > 0) { 66 element = $(selector); 67 } 68 // Click on input if data selector is provided. 69 if ($('[data-drupal-selector="' + selector + '"]').length > 0) { 70 element = $('[data-drupal-selector="' + selector + '"]'); 71 element.parents('details').attr('open', true); 72 element.trigger('mousedown'); 73 } 74 else { 75 element.parents('details').attr('open', true); 76 element.trigger('click'); 77 $(this) 78 .hide() 79 .parent() 80 .parent() 81 .find('.joyride-next-tip') 82 .trigger('click'); 83 } 84 }); 85 }; 86 87 Drupal.openy_tour.focus_on_button = function () { 88 $(document).click(function(e) { 89 if ($('.joyride-next-tip').on('clicked')) { 90 if (this.activeElement.classList.contains('joyride-next-tip')) { 91 let parentEl = this.activeElement.parentElement.parentElement.classList; 92 let activeTip = parentEl[parentEl.length - 1]; 93 let precessedEl = ''; 94 if (!$('#tour li.' + activeTip).next().data('class')) { 95 precessedEl = $('#tour li.' + activeTip).next().data('id'); 96 } 97 else { 98 precessedEl = $('#tour li.' + activeTip).next().data('class'); 99 } 100 if ($('#' + precessedEl).length > 0) { 101 $('#' + precessedEl ).attr('open', true); 102 $('#' + precessedEl + ' summary').mousedown(); 103 } 104 } 105 $('.openy-click-button:visible').focus(); 106 } 107 }); 108 }; 109 110})(jQuery); 111; 112/** 113 * @file 114 * Faq paragraph behaviour. 115 */ 116(function ($) { 117 Drupal.behaviors.openyFaqParagraph = { 118 attach: function( context ) { 119 $( context ).find( '.paragraph--type--faq-item' ).once( 'paragraphFaq' ).each( function () { 120 // Q/A wrapper. 121 var wrapper = $( this ); 122 // Question click event. 123 $( '.field-question', wrapper ).on( 'click', function() { 124 $( '.field-answer', wrapper ).toggle(200); 125 126 if (wrapper.hasClass('conceal')) { 127 wrapper.removeClass('conceal').addClass('show'); 128 } 129 else { 130 wrapper.removeClass('show').addClass('conceal'); 131 } 132 }); 133 134 }); 135 } 136 }; 137 138})(jQuery); 139; 140/** 141 * @file openy_gtranslate.js 142 */ 143(function ($, Drupal, drupalSettings) { 144 Drupal.googleTranslateElementInit = function() { 145 var elem = $('.openy-google-translate:visible').get(0); 146 if (elem === undefined) { 147 console.log('Placeholder for google translate widget not found.'); 148 } 149 else { 150 new google.translate.TranslateElement( 151 { 152 pageLanguage: drupalSettings.path.currentLanguage, 153 layout: google.translate.TranslateElement.InlineLayout.VERTICAL, 154 }, 155 elem 156 ); 157 var removePopup = document.getElementById('goog-gt-tt'); 158 removePopup.parentNode.removeChild(removePopup); 159 } 160 }; 161}(jQuery, Drupal, drupalSettings)); 162;
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.