CoreFiles by mySites.guru
admin-menus-default.js43 lines, 1,187 bytes, from Joomla_4.0.0-beta7-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta6
md5
fe92baa4eead1db1b7ad87914cd8eeab
sha1
380a4031c5a4413c7c5c759926ebe0f4f51064cc
sha256
d2dda77f861a3e8153e23b4b1d1207636cd821ccdbc6192f656a2ab4322cf5d5
/**
* 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
 */
(function (Joomla) {
  'use strict';

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

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

(function (originalFn) {
  'use strict';

  Joomla.submitform = function (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.