CoreFiles by mySites.guru
admin-module-edit_assignment.es6.js30 lines, 897 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
c3e68216156e809c5628400a6c51905c
sha1
db9c9dc36c433ee30cf4949454cef05ed4a64bf5
sha256
c7b5b724f766f572cdecbeb84a98518ae4cea5a7842af433a952351ed9dce524
/**
 * @copyright  Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
(() => {
  'use strict';

  const onChange = (value) => {
    if (value === '-' || parseInt(value, 10) === 0) {
      document.getElementById('menuselect-group').style.display = 'none';
    } else {
      document.getElementById('menuselect-group').style.display = 'block';
    }
  };

  const onBoot = () => {
    const element = document.getElementById('jform_assignment');

    if (element) {
      // Initialise the state
      onChange(element.value);

      // Check for changes in the state
      element.addEventListener('change', (event) => { onChange(event.target.value); });
    }

    document.removeEventListener('DOMContentLoaded', onBoot);
  };
  document.addEventListener('DOMContentLoaded', onBoot);
})();

The same content is in 2 releases, Joomla 4.0.0-alpha5 to 4.0.0-alpha6. See them all, or every version of this file.