Skip to content
Snippets Groups Projects
Commit cbeaf157 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

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

parent d35f1517
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment