[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/media/com_menus/js/ -> admin-menus-default.js (source)

   1  /**
   2   * @copyright  (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
   3   * @license    GNU General Public License version 2 or later; see LICENSE.txt
   4   */
   5  (Joomla => {
   6  
   7    if (Joomla.getOptions('menus-default')) {
   8      // eslint-disable-next-line prefer-destructuring
   9      const items = Joomla.getOptions('menus-default').items;
  10      items.forEach(item => {
  11        window[`jSelectPosition_$item}`] = name => {
  12          document.getElementById(item).value = name;
  13          Joomla.Modal.getCurrent().close();
  14        };
  15      });
  16    }
  17  
  18    Array.from(document.querySelectorAll('.modal')).forEach(modalEl => {
  19      modalEl.addEventListener('hidden.bs.modal', () => {
  20        setTimeout(() => {
  21          window.parent.location.reload();
  22        }, 1000);
  23      });
  24    });
  25  })(Joomla);
  26  
  27  (originalFn => {
  28  
  29    Joomla.submitform = (task, form) => {
  30      originalFn(task, form);
  31  
  32      if (task === 'menu.exportXml') {
  33        document.adminForm.task.value = '';
  34      }
  35    };
  36  })(Joomla.submitform);


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer