CoreFiles by mySites.guru
admin-history-modal.js50 lines, 1,975 bytes, from Joomla_4.0.0-alpha3-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha2
md5
60e6ff43f824a8fae07c8bede0999206
sha1
aa0fd2ee574a6e85a3f54cc9dbc5a548732c6e06
sha256
9ba306cbd7a89f1f2c14672db22e630fde2f8c74dfcab4c7bdc35a0ab9519f96
/**
 * @copyright  Copyright (C) 2005 - 2018 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.