CoreFiles by mySites.guru
admin-fields-modal.js30 lines, 1,178 bytes, from Joomla_3.7.2-Stable-Full_Package.zip
Raw History Compare with 3.7.1
md5
3b584724119272db219989523b89dc15
sha1
fe24ac565a0f75085dfb4c37097455f77a71fd85
sha256
7cbdf47a8bdca1b67835a669ae8c2acf75ef986b07fa233824b75af3f1f11f1c
/**
 * @copyright  Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 * @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 27 releases, Joomla 3.7.0-rc4 to 4.0.0-alpha2. See them all, or every version of this file.