CoreFiles by mySites.guru
admin-fields-modal.js36 lines, 995 bytes, from Joomla_4.0.0-alpha9-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha8
md5
297f6c71580e196b876b79cbdfdc030d
sha1
18bfe7e8d3e82b6f7e65fc0fd3f08286dd32e915
sha256
9a75a8bae891db5b34d0dbf0d322f40bd235f81767a0be690c3166098b3de16a
/**
* 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 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
(function (Joomla) {
  'use strict';

  if (window.parent.Joomla) {
    throw new Error('core.js was not properly initialised');
  }

  if (!Joomla) {
    window.Joomla = {};
  }

  Joomla.fieldIns = function (id, editor) {
    window.parent.Joomla.editors.instances[editor].replaceSelection("{field ".concat(id, "}"));

    if (window.parent.Joomla.Modal) {
      window.parent.Joomla.Modal.getCurrent().close();
    }
  };

  Joomla.fieldgroupIns = function (id, editor) {
    window.parent.Joomla.editors.instances[editor].replaceSelection("{fieldgroup ".concat(id, "}"));

    if (window.parent.Joomla.Modal) {
      window.parent.Joomla.Modal.getCurrent().close();
    }
  };
})(Joomla);

The same content is in 6 releases, Joomla 4.0.0-alpha7 to 4.0.0-alpha12. See them all, or every version of this file.