CoreFiles by mySites.guru
admin-users-groups.js32 lines, 782 bytes, from Joomla_4.0.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha9
md5
f0f1be598f49aa6b0e5372e883304a1a
sha1
96ce1e7d914109cabcab888b27189ee135891e97
sha256
f1517db1f297c7ccef0d4eefdc750e30c4bd1e17b658a1468b41bdc2c52f8c51
/**
 * @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';

	document.addEventListener('DOMContentLoaded', function() {

		Joomla.submitbutton = function(task) {
			if (task === 'groups.delete') {
				var i, cids = document.getElementsByName('cid[]');
				for (i = 0; i < cids.length; i++) {
					if (cids[i].checked && cids[i].parentNode.getAttribute('data-usercount') != 0) {
						if (confirm(Joomla.JText._('COM_USERS_GROUPS_CONFIRM_DELETE'))) {
							Joomla.submitform(task);
						}
						return false;
					}
				}
			}

			Joomla.submitform(task);
			return false;
		};

	});

})(Joomla);

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