From 1bcd53f5825cff52658d541e3c550a889f0ecd8f Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 27 Jul 2011 16:46:49 +0200 Subject: [PATCH] Fixing thematic coloring when changing radiobuttons --- main/course_progress/index.php | 11 ++++++----- main/course_progress/thematic.php | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/main/course_progress/index.php b/main/course_progress/index.php index 4f09402edd..19d1d31404 100755 --- a/main/course_progress/index.php +++ b/main/course_progress/index.php @@ -109,16 +109,17 @@ function update_done_thematic_advance(selected_value) { }); // clean all radios - for (var i=0; i<$("input[@name=\'done_thematic\']").length;i++) { - var id_radio_thematic = $("input[@name=\'done_thematic\']").get(i).id; + + for (var i=0; i< $(".done_thematic").length;i++) { + var id_radio_thematic = $(".done_thematic").get(i).id; $("#td_"+id_radio_thematic).css({"background-color":"#FFF"}); } // set background to previous radios - for (var i=0; i<$("input[@name=\'done_thematic\']").length;i++) { - var id_radio_thematic = $("input[@name=\'done_thematic\']").get(i).id; + for (var i=0; i < $(".done_thematic").length;i++) { + var id_radio_thematic = $(".done_thematic").get(i).id; $("#td_"+id_radio_thematic).css({"background-color":"#E5EDF9"}); - if ($("input[@name=\'done_thematic\']").get(i).value == selected_value) { + if ($(".done_thematic").get(i).value == selected_value) { break; } } diff --git a/main/course_progress/thematic.php b/main/course_progress/thematic.php index 37de4fe379..44003de4fc 100755 --- a/main/course_progress/thematic.php +++ b/main/course_progress/thematic.php @@ -218,9 +218,9 @@ if ($action == 'thematic_list') { $style = ' style="background-color:#E5EDF9" '; } else { $style = ' style="background-color:#fff" '; - } + } echo '
'; - echo ''; + echo ''; echo '
'; } else {