CoreFiles by mySites.guru
modal-associations.js29 lines, 873 bytes, from Joomla_4.0.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha9
md5
bc2a4299459a98be890d96318f796948
sha1
96eee9b88362d01f9c1baeeedc0fd63b86e071a9
sha256
27d557d21c085aaba44e278b0e78ddc65934cb83fd98184205b6b19a3327a7e8
/**
 * @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, 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.