Permalink
Browse files

Merge branch 'MDL-37074-24' of git://github.com/damyon/moodle into MO…

…ODLE_24_STABLE
  • Loading branch information...
2 parents ccc32eb + 1d16b7f commit 519375f9fedc1a6170a587a496bcb37dd982aaf5 @danpoltawski danpoltawski committed Feb 12, 2013
Showing with 12 additions and 6 deletions.
  1. +12 −6 mod/assign/module.js
View
18 mod/assign/module.js
@@ -24,17 +24,21 @@ M.mod_assign.init_grading_table = function(Y) {
node.on('change', function(e) {
rowelement = e.currentTarget.get('parentNode').get('parentNode');
if (e.currentTarget.get('checked')) {
- rowelement.setAttribute('class', 'selectedrow');
+ rowelement.removeClass('unselectedrow');
+ rowelement.addClass('selectedrow');
} else {
- rowelement.setAttribute('class', 'unselectedrow');
+ rowelement.removeClass('selectedrow');
+ rowelement.addClass('unselectedrow');
}
});
rowelement = node.get('parentNode').get('parentNode');
if (node.get('checked')) {
- rowelement.setAttribute('class', 'selectedrow');
+ rowelement.removeClass('unselectedrow');
+ rowelement.addClass('selectedrow');
} else {
- rowelement.setAttribute('class', 'unselectedrow');
+ rowelement.removeClass('selectedrow');
+ rowelement.addClass('unselectedrow');
}
});
@@ -46,14 +50,16 @@ M.mod_assign.init_grading_table = function(Y) {
checkboxes.each(function(node) {
rowelement = node.get('parentNode').get('parentNode');
node.set('checked', true);
- rowelement.setAttribute('class', 'selectedrow');
+ rowelement.removeClass('unselectedrow');
+ rowelement.addClass('selectedrow');
});
} else {
checkboxes = Y.all('td.c0 input');
checkboxes.each(function(node) {
rowelement = node.get('parentNode').get('parentNode');
node.set('checked', false);
- rowelement.setAttribute('class', 'unselectedrow');
+ rowelement.removeClass('selectedrow');
+ rowelement.addClass('unselectedrow');
});
}
});

0 comments on commit 519375f

Please sign in to comment.