CoreFiles by mySites.guru
toolbar.js51 lines, 1,513 bytes, from Joomla_4.0.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha9
md5
6b24c4c9aef5531d140bf67a3ffcc9c5
sha1
26b087d4754759c1292133f04727691ba1c2c154
sha256
3ca8008b094106ce5a36b0cd3f905f804a799252bc6f8f034c01af5455a167a5
/**
 * @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) {
	'use strict';

	/**
	 * USED IN: libraries/joomla/html/toolbar/button/help.php
	 *
	 * Pops up a new window in the middle of the screen
	 *
	 * @param {string}  mypage  The URL for the redirect
	 * @param {string}  myname  The name of the page
	 * @param {int}     w       The width of the new window
	 * @param {int}     h       The height of the new window
	 * @param {string}  scroll  The vertical/horizontal scroll bars
	 *
	 * @since __DEPLOY_VERSION__
	 */
	Joomla.popupWindow = function( mypage, myname, w, h, scroll ) {
		var winl = ( screen.width - w ) / 2,
		    wint = ( screen.height - h ) / 2,
		    winprops = 'height=' + h +
			    ',width=' + w +
			    ',top=' + wint +
			    ',left=' + winl +
			    ',scrollbars=' + scroll +
			    ',resizable';

		window.open( mypage, myname, winprops ).window.focus();
	};

	document.addEventListener('DOMContentLoaded', function() {
		/**
		 * Fix the alignment of the Options and Help toolbar buttons
		 */
		var toolbarOptions = document.getElementById('toolbar-options'),
		    toolbarHelp = document.getElementById('toolbar-help');

		if (toolbarHelp && !toolbarOptions) {
			toolbarHelp.classList.add('ml-auto');
		}
		if (toolbarOptions && !toolbarHelp) {
			toolbarOptions.classList.add('ml-auto');
		}
	});
})(Joomla);

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