CoreFiles by mySites.guru
admin-menus-default.es6.js43 lines, 1,125 bytes, from Joomla_4.0.0-beta7-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta6
md5
d85caca436aa1287e62bc3af2be2f8c5
sha1
89ad746b9351928dc5138cda41118168d4238783
sha256
6b59734cfa1313bb7592e72c5b1b84465d0aa3a00fa79c3936afea13609efeb0
/**
* PLEASE DO NOT MODIFY THIS FILE. WORK ON THE ES6 VERSION.
* OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD.
**/

/**
 * @copyright  (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
(Joomla => {
  'use strict';

  if (Joomla.getOptions('menus-default')) {
    // eslint-disable-next-line prefer-destructuring
    const items = Joomla.getOptions('menus-default').items;
    items.forEach(item => {
      window[`jSelectPosition_${item}`] = name => {
        document.getElementById(item).value = name;
        Joomla.Modal.getCurrent().close();
      };
    });
  }

  Array.from(document.querySelectorAll('.modal')).forEach(modalEl => {
    modalEl.addEventListener('hidden.bs.modal', () => {
      setTimeout(() => {
        window.parent.location.reload();
      }, 1000);
    });
  });
})(Joomla);

(originalFn => {
  'use strict';

  Joomla.submitform = (task, form) => {
    originalFn(task, form);

    if (task === 'menu.exportXml') {
      document.adminForm.task.value = '';
    }
  };
})(Joomla.submitform);

No other release has this exact content. See every version of this file.