CoreFiles by mySites.guru
admin-menus-default.js42 lines, 1,244 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
45ccc2145a9321c45336f2028221aac1
sha1
2f01121f606dd31d4e0ab6f9e24d2209d3902bcb
sha256
26dee8e3ccce88ffda297fcc5b979a4a711da28b8c0dc60e95effc854bb6c53b
/**
* PLEASE DO NOT MODIFY THIS FILE. WORK ON THE ES6 VERSION.
* OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD.
**/

/**
 * @copyright  Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
(function (Joomla) {
  'use strict';

  document.addEventListener('DOMContentLoaded', function () {
    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();
        };
      });
    } // @Todo make vanilla, when modals are custom elements


    window.jQuery('.modal').on('hidden.bs.modal', function () {
      setTimeout(function () {
        window.parent.location.reload();
      }, 1000);
    });
  });
})(Joomla);

(function (originalFn) {
  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.