MDL-48026 mod_quiz: convert menu nowrap from CSS to method

This commit is contained in:
Sam Hemelryk 2014-11-03 13:35:29 +13:00
parent a2a9468f01
commit 8a375d27f2
2 changed files with 3 additions and 4 deletions

View File

@ -435,6 +435,9 @@ class edit_renderer extends \plugin_renderer_base {
$menu->set_constraint('.mod-quiz-edit-content');
$trigger = html_writer::tag('span', get_string('add', 'quiz'), array('class' => 'add-menu'));
$menu->set_menu_trigger($trigger);
// The menu appears within an absolutely positioned element causing width problems.
// Make sure no-wrap is set so that we don't get a squashed menu.
$menu->set_nowrap_on_items(true);
// Disable the link if quiz has attempts.
if (!$structure->can_be_edited()) {

View File

@ -556,10 +556,6 @@ table.quizreviewsummary td.cell {
left: 0;
}
#page-mod-quiz-edit .mod-quiz-edit-content .moodle-actionmenu[data-enhanced].show .menu a {
white-space: nowrap;
}
#page-mod-quiz-edit .slotnumber {
background-color: #D3D3D3;
text-align: center;