CoreFiles by mySites.guru
admin-menus-default.js42 lines, 1,150 bytes, from Joomla_4.0.0-beta6-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta5
md5
b197b0132d81f2e3e93be3d422939fa3
sha1
44d1755461cf229ccd717d90af40fc8b553577b7
sha256
0e23746fba89e6eb9564bf4f9000307c61061734dc62404f78dc861a79ddb806
/**
* 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();
      };
    });
  } // @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) {
  '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.