CoreFiles by mySites.guru
admin-menus-default.js41 lines, 1,199 bytes, from Joomla_4.0.0-alpha5-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha3
md5
355f08319b9f1387c1223d3704f01487
sha1
eae313a61886df7d69d6504224fc06130a8e0fdd
sha256
c73fbfea5cefac7481daf651ac4feef049dbdf47bbe08994075b4918875b61c6
/**
* 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_' + item] = function (name) {
          document.getElementById(item).value = name;
          Joomla.Modal.getCurrent().close();
        };
      });
    }

    Joomla.Modal.getCurrent().addEventListener('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.