CoreFiles by mySites.guru
admin-fields-modal.js30 lines, 1,165 bytes, from Joomla_3.10.5-Stable-Full_Package.zip
Raw History Compare with 3.10.4
md5
02817fea14d1f37050182db814998ccf
sha1
8f9f03e2846339b88e51f3782c6aaa2d9720bc7c
sha256
1be9f1112b7025afad7d71509dc831a6a15956ef860f2a574b225ac0694e20c5
/**
 * @copyright  (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

Joomla = window.Joomla || {};

(function(Joomla) {
	Joomla.fieldIns = function(id, editor) {
		/** Use the API, if editor supports it **/
		if (window.parent.Joomla && window.parent.Joomla.editors && window.parent.Joomla.editors.instances && window.parent.Joomla.editors.instances.hasOwnProperty(editor)) {
			window.parent.Joomla.editors.instances[editor].replaceSelection("{field " + id + "}")
		} else {
			window.parent.jInsertEditorText("{field " + id + "}", editor);
		}

		window.parent.jModalClose();
	};

	Joomla.fieldgroupIns = function(id, editor) {
		/** Use the API, if editor supports it **/
		if (window.parent.Joomla && window.parent.Joomla.editors && window.parent.Joomla.editors.instances && window.parent.Joomla.editors.instances.hasOwnProperty(editor)) {
			window.parent.Joomla.editors.instances[editor].replaceSelection("{fieldgroup " + id + "}")
		} else {
			window.parent.jInsertEditorText("{fieldgroup " + id + "}", editor);
		}

		window.parent.jModalClose();
	};
})(Joomla);

The same content is in 25 releases, Joomla 3.10.0-alpha2 to 3.10.12. See them all, or every version of this file.