CoreFiles by mySites.guru
tiny-close.js38 lines, 1,340 bytes, from Joomla_3.6.2-Stable-Full_Package.zip
Raw History Compare with 3.6.1
md5
2e6e577b6b8f42c79bab184d98d07568
sha1
7abd8dcb2122d296bd4b7e627c32938c4eaca289
sha256
3f7038d2829f71c5da085605305d6cadd34009477efc379b88bcb4769dbf3b24
/**
 * @copyright   Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

/**
 * This is used by tinyMCE in order to allow both mootools and bootstrap modals
 * to close correctly, more tinyMCE related functionality maybe added in the future
 *
 * @package     Joomla
 * @since       3.5.1
 * @version     1.0
 */
document.onreadystatechange = function () {
	if (document.readyState == "interactive" && typeof tinyMCE != 'undefined' && tinyMCE)
	{
		if (typeof window.jModalClose_no_tinyMCE === 'undefined')
		{	
			window.jModalClose_no_tinyMCE = typeof(jModalClose) == 'function'  ?  jModalClose  :  false;
			
			jModalClose = function () {
				if (window.jModalClose_no_tinyMCE) window.jModalClose_no_tinyMCE.apply(this, arguments);
				tinyMCE.activeEditor.windowManager.close();
			};
		}

		if (typeof window.SqueezeBoxClose_no_tinyMCE === 'undefined')
		{
			if (typeof(SqueezeBox) == 'undefined')  SqueezeBox = {};
			window.SqueezeBoxClose_no_tinyMCE = typeof(SqueezeBox.close) == 'function'  ?  SqueezeBox.close  :  false;

			SqueezeBox.close = function () {
				if (window.SqueezeBoxClose_no_tinyMCE)  window.SqueezeBoxClose_no_tinyMCE.apply(this, arguments);
				tinyMCE.activeEditor.windowManager.close();
			};
		}
	}
};

The same content is in 6 releases, Joomla 3.6.1-rc1 to 3.6.3-rc2. See them all, or every version of this file.