Project

General

Profile

Defect #912 ยป toggle_selections.diff

Rocco Stanzione, 2008-03-24 16:33

View differences:

public/javascripts/context_menu.js (working copy)
147 147

  
148 148
function toggleIssuesSelection(el) {
149 149
	var boxes = el.getElementsBySelector('input[type=checkbox]');
150
	var all_checked = true;
151
	for (i = 0; i < boxes.length; i++) { if (boxes[i].checked == false) { all_checked = false; } }
152 150
	for (i = 0; i < boxes.length; i++) {
153
		if (all_checked) {
154
			boxes[i].checked = false;
155
			boxes[i].up('tr').removeClassName('context-menu-selection');
156
		} else if (boxes[i].checked == false) {
157
			boxes[i].checked = true;
158
			boxes[i].up('tr').addClassName('context-menu-selection');
159
		}
151
		boxes[i].checked = !boxes[i].checked;
152
		boxes[i].up('tr').toggleClassName('context-menu-selection');
160 153
	}
161 154
}
    (1-1/1)