CoreFiles by mySites.guru
admin-fields-modal.js36 lines, 1,440 bytes, from Joomla_4.0.0-alpha3-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha2
md5
2157c1464f0ad50a89cb11ff44b7fbfc
sha1
dd03a6747fea712abcdc0b3af6ad8f9e229b3753
sha256
da14e6e12ba5be03974b29e1cd6da8ec4c88b393b6523b089c2209429043cf0a
/**
 * @copyright  Copyright (C) 2005 - 2018 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);
		}

		if (window.parent.Joomla.currentModal) {
			// @TODO Remove jQuery, use Joomla-UI
			parent.window.jQuery(window.parent.Joomla.currentModal).modal('hide');
		}
	};

	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);
		}

		if (window.parent.Joomla.currentModal) {
			// @TODO Remove jQuery, use Joomla-UI
			parent.window.jQuery(window.parent.Joomla.currentModal).modal('hide');
		}
	};
})(Joomla);

No other release has this exact content. See every version of this file.