HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.34
System: Linux atalantini.com 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64
User: root (0)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: /var/www/html/coreplad/sites/all/modules/metatag/metatag.admin.js
/**
 * @file
 * Custom admin-side JS for the Metatag module.
 */

(function ($) {
  'use strict';

  Drupal.behaviors.metatagUIConfigListing = {
    attach: function (context) {
      // Hidden elements to be visible if JavaScript is enabled.
      $('.js-show').show();

      // Make the leaf arrow clickable.
      $('.metatag-config-label').hover(function(){
        $(this).css({'cursor': 'pointer'});
      })
        .click(function(){
          $(this).find('a.toggle-details', context).trigger('click');
        });

      // Show or hide the summary.
      $('table.metatag-config-overview a.toggle-details', context).click(function(event) {
        $(this).parent('div').siblings('div.metatag-config-details').each(function() {
          if ($(this).hasClass('js-hide')) {
            $(this).slideDown('slow').removeClass('js-hide');
          }
          else {
            $(this).slideUp('slow').addClass('js-hide');
          }
        });

        // Change the expanded or collapsed state of the instance label.
        if ($(this).parent('div').hasClass('collapsed')) {
          $(this).parent('div').removeClass('collapsed').addClass('expanded');
        }
        else {
          $(this).parent('div').removeClass('expanded').addClass('collapsed');
        }

        // This event may be triggered by a parent element click - so we don't
        // want the click to bubble up otherwise we get recursive click events.
        event.stopPropagation();
      });
    }
  };

})(jQuery);