Commit cbeaf157 authored by Dries's avatar Dries
Browse files

- Patch #308668 by jpetso, boombatower: make test selection page work when Javascript is disabled.

parent d35f1517
......@@ -5,6 +5,10 @@
*/
Drupal.behaviors.simpleTestMenuCollapse = function() {
// Adds expand-collapse functionality.
$('div.simpletest-image').each(function() {
direction = Drupal.settings.simpleTest[$(this).attr('id')].imageDirection;
$(this).html(Drupal.settings.simpleTest.images[direction]);
});
$('div.simpletest-image').click(function() {
// Toggle all of the trs.
if (!Drupal.settings.simpleTest[$(this).attr('id')].clickActive) {
......
......@@ -229,7 +229,7 @@ function theme_simpletest_test_table($table) {
// Expand/collapse image and group title.
$row[] = array(
'data' => '<div class="simpletest-image" id="simpletest-test-group-' . $test_class . '">' . $js['images'][0] . '</div>&nbsp;' .
'data' => '<div class="simpletest-image" id="simpletest-test-group-' . $test_class . '"></div>&nbsp;' .
'<label for="' . $test_class . '-select-all" class="simpletest-group-label">' . $key . '</label>',
'style' => 'font-weight: bold;'
);
......@@ -258,7 +258,7 @@ function theme_simpletest_test_table($table) {
$row[] = drupal_render($test);
$row[] = theme('indentation', 1) . '<label for="edit-' . $test_name . '">' . $title . '</label>';
$row[] = '<div class="description">' . $description . '</div>';
$rows[] = array('data' => $row, 'style' => 'display: none;', 'class' => $test_class . '-test');
$rows[] = array('data' => $row, 'class' => $test_class . '-test js-hide');
}
$js['simpletest-test-group-'. $test_class] = $current_js;
unset($table[$key]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment