CoreFiles by mySites.guru
admin-associations-modal.js27 lines, 759 bytes, from Joomla_4.0.0-alpha3-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha2
md5
176c2ba49f85b345d43682c1cc4339c1
sha1
d066b0dd665da30f5cd44fd15ca54ac9cc514b62
sha256
957a5d1b9af2787db8ab63f9dbcf348e3bddfa4f026a183a1cc37c45bac6d3e9
/**
 * @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, document ) {
	'use strict';

	document.addEventListener('DOMContentLoaded', function() {
		
		if (Joomla.getOptions('modal-associations')) {
			var fnName = Joomla.getOptions('modal-associations').func,
				links  = [].slice.call(document.querySelectorAll('.select-link'));

			links.forEach(function (item) {
				item.addEventListener('click', function (event) {
					if (self != top) {
						// Run function on parent window.
						window.parent[fnName](event.target.getAttribute('data-id'));
					}
				});
			});
		}
	});
})();

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