CoreFiles by mySites.guru
admin-fields-modal.js25 lines, 794 bytes, from Joomla_4.4.13-Stable-Full_Package.zip
Raw History Compare with 4.4.12
md5
0149f0eef50ecf6c89e8000759710088
sha1
bf1b2b4ada8633716b52eaea76fd4ded89ee3ba4
sha256
a3121658cf3703eb79dc79827771595d5c4ada140eb10bf84649e66d09a02c64
/**
 * @copyright  (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
(Joomla => {

  if (!window.parent.Joomla) {
    throw new Error('core.js was not properly initialised');
  }
  if (!Joomla) {
    window.Joomla = {};
  }
  Joomla.fieldIns = (id, editor) => {
    window.parent.Joomla.editors.instances[editor].replaceSelection(`{field ${id}}`);
    if (window.parent.Joomla.Modal) {
      window.parent.Joomla.Modal.getCurrent().close();
    }
  };
  Joomla.fieldgroupIns = (id, editor) => {
    window.parent.Joomla.editors.instances[editor].replaceSelection(`{fieldgroup ${id}}`);
    if (window.parent.Joomla.Modal) {
      window.parent.Joomla.Modal.getCurrent().close();
    }
  };
})(Joomla);

The same content is in 60 releases, Joomla 4.3.0-alpha1 to 5.0.0-alpha4. See them all, or every version of this file.