CoreFiles by mySites.guru
admin-menus-default.js42 lines, 1,163 bytes, from Joomla_4.0.0-beta1-Beta-Full_Package.zip
Raw History Compare with 3.9.0-beta4
md5
d6480f647997550a240ec80a7860f4d1
sha1
20eb94d32578834df33b83c7f1ec996b58d5a810
sha256
53c51b8b4044989317e46378e39b73153b0d3c9d8765bdecc421666c010533f4
/**
* 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 - 2020 Open Source Matters, Inc. All rights reserved.
 * @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);

The same content is in 5 releases, Joomla 4.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.