core/modules/system/system.admin.css | 30 ++++++++++++++++++++++++++++-- core/modules/system/system.admin.inc | 12 +++++------- core/modules/system/system.base.css | 1 + core/modules/system/system.modules.js | 18 ++++++++++++------ 4 files changed, 46 insertions(+), 15 deletions(-) diff --git a/core/modules/system/system.admin.css b/core/modules/system/system.admin.css index 5716d03..abeb5ce 100644 --- a/core/modules/system/system.admin.css +++ b/core/modules/system/system.admin.css @@ -61,6 +61,9 @@ small .admin-link:after { #system-modules div.incompatible { font-weight: bold; } +#system-modules th.priority-medium { + width: 100%; +} #system-modules td { vertical-align: top; } @@ -81,11 +84,34 @@ small .admin-link:after { color: #5c5c5b; height: 20px; line-height: 20px; + position: relative; +} +#system-modules .description .inner .details { overflow: hidden; /* truncates descriptions if too long */ + position: absolute; + white-space: nowrap; + width: 100%; + text-overflow: ellipsis; +} +#system-modules .expanded .description .inner { + position: static; + height: auto; } +#system-modules .expanded .description .inner .details { + overflow: auto; + position: static; + white-space: normal; + width: auto; +} +#system-modules .expanded .description .inner .details .text { + -webkit-hyphens: auto; + -moz-hyphens: auto; + hyphens: auto; +} + @media screen and (max-width: 40em) { - #system-modules .description .inner .text { - visibility: hidden; + #system-modules .description .inner .details .text { + display: none; } } #system-modules .description .version { diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 0f64653..78cbade 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -2514,10 +2514,11 @@ function theme_system_modules_fieldset($variables) { // Add the description, along with any modules it requires. $col3 = '
'; + $version = ''; if (!empty($module['version']['#markup'])) { - $col3 .= '' . drupal_render($module['version']) . ' - '; + $version = '' . drupal_render($module['version']) . ''; } - $col3 .= '' . drupal_render($module['description']) . '
'; + $col3 .= '' . $version . ' — ' . drupal_render($module['description']) . ''; $col3 .= '
'; if ($module['#requires']) { $col3 .= '
' . t('Requires: !module-list', array('!module-list' => implode(', ', $module['#requires']))) . '
'; @@ -2531,7 +2532,8 @@ function theme_system_modules_fieldset($variables) { foreach (array('help', 'permissions', 'configure') as $key) { $col3 .= drupal_render($module['links'][$key]); } - $row[] = $col3; + $col3 .= '
'; + $row[] = array('class' => array('description'), 'data' => $col3); $rows[] = $row; } @@ -2748,10 +2750,6 @@ function system_date_time_formats() { $row[] = array('data' => l(t('delete'), 'admin/config/regional/date-time/formats/' . $format['dfid'] . '/delete')); $rows[] = $row; } - $col3 .= ' '; - - $row[] = array('class' => array('description'), 'data' => $col3); - } $build['date_formats_table'] = array( diff --git a/core/modules/system/system.base.css b/core/modules/system/system.base.css index 610d94d..6d0ca78 100644 --- a/core/modules/system/system.base.css +++ b/core/modules/system/system.base.css @@ -144,6 +144,7 @@ div.tree-child-horizontal { table.sticky-header { background-color: #fff; margin-top: 0; + z-index: 200; } /** diff --git a/core/modules/system/system.modules.js b/core/modules/system/system.modules.js index 117cf64..7c8c424 100644 --- a/core/modules/system/system.modules.js +++ b/core/modules/system/system.modules.js @@ -5,13 +5,13 @@ $.extend(Drupal.settings, { hideModules: { method: 'slideToggle', - args: 'fast' + duration: 'fast' } }); - /** - * Show/hide the requirements information on modules page. - */ +/** + * Show/hide the requirements information on modules page. + */ Drupal.behaviors.hideModuleInformation = { attach: function (context, settings) { var $table = $('#system-modules').once('expand-modules'); @@ -23,8 +23,10 @@ Drupal.behaviors.hideModuleInformation = { if (e.type === 'click' || (e.type === 'keydown' && e.keyCode === 13)) { e.preventDefault(); var $tr = $(this); - $tr.toggleClass('expanded'); - $tr.find('.requirements, .links')[effect.method](effect.args); + $tr.find('.requirements, .links')[effect.method](effect.duration) + .promise().done(function() { + $tr.toggleClass('expanded'); + }); } }); // Makes the whole cell a click target. @@ -39,6 +41,10 @@ Drupal.behaviors.hideModuleInformation = { $tbodies.on('click', 'input', function (e) { e.stopPropagation(); }); + // Catch the event on the checkbox to avoid triggering previous handler. + $tbodies.on('mousedown', 'label', function (e) { + e.preventDefault(); + }); } $table.find('.requirements, .links').hide(); }