MDL-62884 privacy: Fix styles

An action menu displayed inside a table needs to be tested on every theme. It is
required to ensure that the menu displays correctly, even when it would display outside
the scrollable region for the table.
This commit is contained in:
Damyon Wiese
2018-08-17 16:07:07 +08:00
committed by Jake Dallimore
parent 9028bd17a5
commit aaf055af33
3 changed files with 8 additions and 0 deletions
@@ -220,6 +220,7 @@ class data_requests_table extends table_sql {
$actionsmenu->set_menu_trigger(get_string('actions'));
$actionsmenu->set_owner_selector('request-actions-' . $requestid);
$actionsmenu->set_alignment(\action_menu::TL, \action_menu::BL);
$actionsmenu->set_constraint('[data-region=data-requests-table] > .no-overflow');
return $OUTPUT->render($actionsmenu);
}
+4
View File
@@ -24,3 +24,7 @@ dd a.contactdpo {
/* Reverting dd's left margin */
margin-left: inherit;
}
[data-region="data-requests-table"] .moodle-actionmenu {
min-width: 150px;
}
+3
View File
@@ -4383,6 +4383,9 @@ class action_menu implements renderable, templatable {
* The constraint is applied when the dialogue is shown and limits the display of the dialogue to within the
* element the constraint identifies.
*
* This is required whenever the action menu is displayed inside any CSS element with the .no-overflow class
* (flexible_table and any of it's child classes are a likely candidate).
*
* @param string $ancestorselector A snippet of CSS used to identify the ancestor to contrain the dialogue to.
*/
public function set_constraint($ancestorselector) {