CoreFiles by mySites.guru
admin-fields-modal-es5.js34 lines, 915 bytes, from Joomla_4.0.0-Stable-Full_Package.zip
Raw History Compare with 3.10.12
md5
42e7044e65d5c9b68830f8a2c64ed9a8
sha1
568320d22c69854e78c5cfefa90bfd2169e51e59
sha256
a6f80470d1b809ffaac807487ae016eb4254fd3c32fb6b07e534afc33900d8e0
(function () {
  'use strict';

  /**
   * @copyright  (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
   * @license    GNU General Public License version 2 or later; see LICENSE.txt
   */
  (function (Joomla) {
    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 " + 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 " + id + "}");

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

}());

The same content is in 23 releases, Joomla 4.0.0-rc1 to 4.1.0-beta2. See them all, or every version of this file.