CoreFiles by mySites.guru
admin-history-modal.js50 lines, 1,975 bytes, from Joomla_4.0.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha9
md5
8c65622e6f70590e2d8442ecc44bd00e
sha1
a2c8f0cf07125eced16f57fb150881633935d591
sha256
e9dc4cdedb2dc749c2e3cfcb6d4cabd23eb6a39304313fc303ea94d54c016467
/**
 * @copyright  Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
(function() {
	document.addEventListener('DOMContentLoaded', function () {
		document.getElementById('toolbar-load').addEventListener('click', function() {
			var ids = document.querySelectorAll('input[id*="cb"]:checked');
			if (ids.length == 1) {
				// Add version item id to URL
				var url = document.getElementById('toolbar-load').getAttribute('data-url') + '&version_id=' + ids[0].value;
				if (window.parent && url) {
					window.parent.location = url;
				}
			} else {
				alert(Joomla.JText._('COM_CONTENTHISTORY_BUTTON_SELECT_ONE'));
			}
		});

		document.getElementById('toolbar-preview').addEventListener('click', function() {
			var windowSizeArray = ['width=800, height=600, resizable=yes, scrollbars=yes'],
			    ids = document.querySelectorAll('input[id*="cb"]:checked');
			if (ids.length == 1) {
				// Add version item id to URL
				var url = document.getElementById('toolbar-preview').getAttribute('data-url') + '&version_id=' + ids[0].value;
				if (window.parent && url) {
					window.open(url, '', windowSizeArray);
					return false;
				}
			} else {
				alert(Joomla.JText._('COM_CONTENTHISTORY_BUTTON_SELECT_ONE'));
			}
		});

		document.getElementById('toolbar-compare').addEventListener('click', function() {
			var windowSizeArray = ['width=1000, height=600, resizable=yes, scrollbars=yes'],
			    ids = document.querySelectorAll('input[id*="cb"]:checked');
			if (ids.length == 2) {
				// Add version item ids to URL
				var url = document.getElementById('toolbar-compare').getAttribute('data-url') + '&id1=' + ids[0].value + '&id2=' + ids[1].value;
				if (window.parent && url) {
					window.open(url, '', windowSizeArray);
					return false;
				}
			} else {
				alert(Joomla.JText._('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST'));
			}
		});
	});
})();

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