aboutsummaryrefslogtreecommitdiff
path: root/htdocs/js/common.js
blob: f7256933e79cca229cd4b3aaafaa0da69b1627a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function confirm_delete(type, name)
{
	return confirm("Are you sure you want to delete the " + type +
			" '" + name + "'?");
}

function select_all(obj)
{
	var value = obj.checked;
	var form = obj.form;

	select_all_checkbox = obj;

	for (var i = 0; i < form.elements.length; i++ ) {
		var element = form.elements[i];
		if (element.type != 'checkbox') {
			continue;
		}
		if (element.name.substring(0, 9) != 'patch_id:') {
			continue;
		}
		element.checked = value;
	}
}