CoreFiles by mySites.guru
admin-associations-modal.js27 lines, 759 bytes, from Joomla_4.0.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha9
md5
144ad840627f713b1e6da4ab66807e91
sha1
546546be133cb762132d7b7b6dad59bd9b981ca1
sha256
5029ed4ea14734174982847101e2a3f54e5083cd5168799e8c8fc2a637aff314
/**
 * @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, 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.