CoreFiles by mySites.guru
modal-associations.js29 lines, 873 bytes, from Joomla_4.0.0-alpha3-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha2
md5
8f51a9bef20bf6f1d351f0a351391965
sha1
87970c23dead0a1e9adf15921250bca82225965b
sha256
b9da70a2e5e7a4ba0709aa8ca214a8a3b068747420aae041c4eb09e489e9d838
/**
 * @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, window) {
	'use strict';

	document.addEventListener('DOMContentLoaded', function() {
		if (Joomla.getOptions('modal-associations')) {
			var itemId = Joomla.getOptions('modal-associations').itemId;

			// @TODO function should not be global, move it to Joomla
			window['jSelectAssociation_' + itemId] = function(id) {
				var target = document.getElementById('target-association');

				if (target)
				{
					target.src = target.getAttribute('data-editurl') +
						'&task=' + target.getAttribute('data-item') + '.edit' + '&id=' + id;
				}
				jQuery('#associationSelect' + itemId + 'Modal').modal('hide');
			}
		}
	});

})(Joomla, window);

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