HEX
Server: Apache
System: Linux dev.epsylon.net 3.10.0-1160.144.1.el7.tuxcare.els2.x86_64 #1 SMP Sun Feb 15 11:22:42 UTC 2026 x86_64
User: nexper (1054)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/nexper/public_html/sites/all/modules/media_gallery/media_gallery.form.js
(function ($) {

Drupal.behaviors.menuFieldsetSummaries = {
  attach: function (context) {
    $('fieldset.block-form', context).drupalSetSummary(function (context) {
      if ($('#edit-media-gallery-expose-block-und', context).attr('checked')) {
        return Drupal.t('Enabled');
      }
      else {
        return Drupal.t('Not enabled');
      }
    });
  }
};

Drupal.behaviors.media_gallery_form = {};
Drupal.behaviors.media_gallery_form.attach = function (context, settings) {
  // Change the "Presentation settings" image to match the radio buttons / checkbox.
  var inputs = $('.presentation-settings input', context);
  if (inputs.length) {
    inputs.bind('change', Drupal.behaviors.media_gallery_form.format_select);
    Drupal.behaviors.media_gallery_form.format_select();
  }
};

Drupal.behaviors.media_gallery_form.format_select = function (event) {
  var radioValue = $('.presentation-settings input:radio:checked').val();
  var icon = $('.presentation-settings .setting-icon');
  var checkbox = $('.presentation-settings .field-name-media-gallery-lightbox-extras input');

  // Depending on the radio button chosen add a class
  if (radioValue == 'node') {
    icon.attr('class', 'setting-icon display-page');
    // Disable the checkbox
    checkbox.attr('disabled', true);
  } else {
    icon.attr('class', 'setting-icon display-lightbox');
    // Turn on the checkbox
    checkbox.attr('disabled', false);
    // Add a class if the checkbox is checked
    if (checkbox.is(':checked')) {
      icon.attr('class', 'setting-icon display-extras');
    }
  }
};

})(jQuery);