mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-47576-master' of git://github.com/jethac/moodle
Conflicts: theme/bootstrapbase/style/moodle.css
This commit is contained in:
commit
529e38d141
3 changed files with 266 additions and 133 deletions
|
@ -3040,10 +3040,9 @@ EOD;
|
||||||
|
|
||||||
$am = new action_menu();
|
$am = new action_menu();
|
||||||
$am->initialise_js($this->page);
|
$am->initialise_js($this->page);
|
||||||
$am->set_menu_trigger(html_writer::span(
|
$am->set_menu_trigger(
|
||||||
get_string('usermenu', 'moodle'),
|
$returnstr
|
||||||
"accesshide"
|
);
|
||||||
));
|
|
||||||
$am->set_alignment(action_menu::TR, action_menu::BR);
|
$am->set_alignment(action_menu::TR, action_menu::BR);
|
||||||
if ($withlinks) {
|
if ($withlinks) {
|
||||||
$navitemcount = count($opts->navitems);
|
$navitemcount = count($opts->navitems);
|
||||||
|
@ -3072,10 +3071,6 @@ EOD;
|
||||||
}
|
}
|
||||||
|
|
||||||
return html_writer::div(
|
return html_writer::div(
|
||||||
html_writer::div(
|
|
||||||
$returnstr,
|
|
||||||
'userinfo'
|
|
||||||
) .
|
|
||||||
$this->render($am),
|
$this->render($am),
|
||||||
$usermenuclasses
|
$usermenuclasses
|
||||||
);
|
);
|
||||||
|
|
|
@ -343,44 +343,40 @@ div#dock {
|
||||||
|
|
||||||
// Usermenu
|
// Usermenu
|
||||||
.usermenu {
|
.usermenu {
|
||||||
font-size: 14px;
|
|
||||||
&.withoutlinks {
|
|
||||||
.withoutlinks {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.login {
|
.login {
|
||||||
color: @navbarText;
|
color: @navbarText;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
a {
|
a {
|
||||||
color: @navbarLinkColor;
|
color: @linkColor;
|
||||||
}
|
&:hover,
|
||||||
}
|
&:focus {
|
||||||
> .moodle-actionmenu > .menubar {
|
color: @linkColorHover;
|
||||||
display: block;
|
text-decoration: underline;
|
||||||
margin: -40px 0px 2px 0px;
|
|
||||||
li {
|
|
||||||
display: block;
|
|
||||||
a {
|
|
||||||
line-height: 40px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
> div {
|
.moodle-actionmenu {
|
||||||
height: 40px;
|
|
||||||
}
|
|
||||||
.toggle-display {
|
.toggle-display {
|
||||||
|
display: block;
|
||||||
|
opacity: 1;
|
||||||
color: @navbarLinkColor;
|
color: @navbarLinkColor;
|
||||||
outline: none;
|
line-height: 40px;
|
||||||
|
height: 40px;
|
||||||
|
&:hover {
|
||||||
|
color: @navbarLinkColorHover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.userbutton {
|
.userbutton {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
.avatars{
|
.avatars{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
|
width: 36px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
|
margin-left: 6px;
|
||||||
|
|
||||||
.avatar,
|
.avatar,
|
||||||
img {
|
img {
|
||||||
|
@ -391,6 +387,7 @@ div#dock {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
line-height: 1em;
|
line-height: 1em;
|
||||||
|
color: inherit;
|
||||||
.meta,
|
.meta,
|
||||||
.role {
|
.role {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -404,46 +401,43 @@ div#dock {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.moodle-actionmenu[data-enhanced].show .menu a {
|
|
||||||
white-space: nowrap;
|
// Hide caret when JS is disabled.
|
||||||
}
|
|
||||||
.menu .filler {
|
|
||||||
width: auto;
|
|
||||||
height: 1px;
|
|
||||||
margin: 4px 0px;
|
|
||||||
display: block;
|
|
||||||
background: #e5e5e5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.userloggedinas .usermenu .userbutton .avatars {
|
|
||||||
.avatar {
|
|
||||||
&.current {
|
|
||||||
position: relative;
|
|
||||||
top: 4px;
|
|
||||||
left: 4px;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
margin-top: 11px;
|
|
||||||
border: 1px solid #fff;
|
|
||||||
border-radius: 50%;
|
|
||||||
box-shadow: -2px -2px 16px rgba(0,0,0,0.25);
|
|
||||||
}
|
|
||||||
img {
|
|
||||||
width: inherit;
|
|
||||||
height: inherit;
|
|
||||||
}
|
|
||||||
display: inline-block;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.jsenabled .usermenu .moodle-actionmenu[data-enhanced] .toggle-display.textmenu {
|
|
||||||
position: relative;
|
|
||||||
.caret {
|
.caret {
|
||||||
margin-top: 0;
|
display: none;
|
||||||
vertical-align: middle;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.jsenabled .navbar-inverse {
|
|
||||||
|
|
||||||
|
// A little bit of visual feedback for the action menu when Javascript is disabled.
|
||||||
|
.menu {
|
||||||
|
.menu-action.icon {
|
||||||
|
img {
|
||||||
|
border-radius: 0;
|
||||||
|
background: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
&:hover img {
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.125);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&[data-enhanced] .menu {
|
||||||
|
.menu-action.icon,
|
||||||
|
.menu-action.icon:hover {
|
||||||
|
img {
|
||||||
|
border-radius: 0;
|
||||||
|
background: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.navbar-inverse {
|
||||||
.usermenu {
|
.usermenu {
|
||||||
.login {
|
.login {
|
||||||
color: @navbarInverseText;
|
color: @navbarInverseText;
|
||||||
|
@ -454,10 +448,12 @@ div#dock {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.moodle-actionmenu {
|
||||||
.toggle-display {
|
.toggle-display {
|
||||||
color: @navbarInverseLinkColor;
|
color: @navbarInverseLinkColor;
|
||||||
}
|
}
|
||||||
.userinfo .usertext {
|
.userbutton {
|
||||||
|
.usertext {
|
||||||
color: @navbarInverseLinkColor;
|
color: @navbarInverseLinkColor;
|
||||||
.meta {
|
.meta {
|
||||||
color: @navbarInverseText;
|
color: @navbarInverseText;
|
||||||
|
@ -466,8 +462,9 @@ div#dock {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
&:hover {
|
&:hover {
|
||||||
.userinfo .usertext {
|
.usertext {
|
||||||
color: @navbarInverseLinkColorHover;
|
color: @navbarInverseLinkColorHover;
|
||||||
.meta {
|
.meta {
|
||||||
color: @navbarInverseText;
|
color: @navbarInverseText;
|
||||||
|
@ -476,35 +473,149 @@ div#dock {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.moodle-actionmenu[data-enhanced] .toggle-display.textmenu {
|
}
|
||||||
|
&[data-enhanced] .toggle-display.textmenu {
|
||||||
.caret {
|
.caret {
|
||||||
border-top-color: @navbarInverseLinkColorHover;
|
border-top-color: @navbarInverseLinkColorHover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A little bit of visual feedback for the action menu when Javascript is disabled.
|
||||||
|
.menu {
|
||||||
|
.menu-action.icon {
|
||||||
|
img {
|
||||||
|
border-radius: 0;
|
||||||
|
background: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
&:hover img {
|
||||||
|
background: #333;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0px 0px 16px rgba(255, 255, 255, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&[data-enhanced] .menu {
|
||||||
|
.menu-action.icon,
|
||||||
|
.menu-action.icon:hover {
|
||||||
|
img {
|
||||||
|
border-radius: 0;
|
||||||
|
background: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.jsenabled {
|
||||||
|
.usermenu {
|
||||||
|
.moodle-actionmenu {
|
||||||
|
.toggle-display {
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
&.textmenu {
|
||||||
|
padding-left: 8px;
|
||||||
|
padding-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show caret when JS is enabled.
|
||||||
|
.caret {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
top: 9px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .menubar {
|
||||||
|
display: block;
|
||||||
|
margin: 0px 0px 2px 0px;
|
||||||
|
}
|
||||||
|
> .menu {
|
||||||
|
min-width: 160px;
|
||||||
|
.filler {
|
||||||
|
display: block;
|
||||||
|
.nav-divider();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.show {
|
||||||
|
background-color: @navbarLinkBackgroundActive;
|
||||||
|
.menu {
|
||||||
|
padding: 5px 0;
|
||||||
|
margin: 2px 0 0;
|
||||||
|
background-clip: padding-box;
|
||||||
|
&:before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
border-left: 7px solid transparent;
|
||||||
|
border-right: 7px solid transparent;
|
||||||
|
border-bottom: 7px solid #ccc;
|
||||||
|
border-bottom-color: @dropdownBorder;
|
||||||
|
position: absolute;
|
||||||
|
top: -7px;
|
||||||
|
}
|
||||||
|
&:after {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
border-left: 6px solid transparent;
|
||||||
|
border-right: 6px solid transparent;
|
||||||
|
border-bottom: 6px solid @dropdownBackground;
|
||||||
|
position: absolute;
|
||||||
|
top: -6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
white-space: nowrap;
|
||||||
|
border-radius: 0;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
#gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover, 5%));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.align-tr-br {
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
.box-shadow (0 5px 10px rgba(0, 0, 0, 0.2));
|
||||||
|
}
|
||||||
|
&:hover .toggle-display {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.navbar-inverse {
|
||||||
|
.usermenu {
|
||||||
|
.moodle-actionmenu {
|
||||||
|
|
||||||
|
&.show {
|
||||||
|
background-color: @navbarInverseLinkBackgroundActive;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.dir-ltr {
|
.dir-ltr {
|
||||||
.usermenu {
|
.usermenu {
|
||||||
float: right;
|
float: right;
|
||||||
.userinfo {
|
> .moodle-actionmenu {
|
||||||
padding-left: 20px;
|
> .menu {
|
||||||
|
&:before {
|
||||||
|
right: 9px;
|
||||||
}
|
}
|
||||||
.userbutton {
|
&:after {
|
||||||
margin-right: 4px;
|
right: 10px;
|
||||||
padding-right: 8px;
|
|
||||||
.avatars{
|
|
||||||
margin-left: 6px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
> .moodle-actionmenu > .menubar li a {
|
> .menubar li a {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
&.userloggedinas .usermenu .userbutton .avatars {
|
&.userloggedinas .usermenu .userbutton .avatars {
|
||||||
.avatar {
|
.avatar {
|
||||||
&.current {
|
&.current {
|
||||||
margin-right: -34px;
|
left: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -513,22 +624,49 @@ div#dock {
|
||||||
.dir-rtl {
|
.dir-rtl {
|
||||||
.usermenu {
|
.usermenu {
|
||||||
float: left;
|
float: left;
|
||||||
.userbutton {
|
> .moodle-actionmenu {
|
||||||
margin-left: 4px;
|
> .menu {
|
||||||
padding-left: 8px;
|
margin-right: 0px;
|
||||||
.avatars{
|
&:before {
|
||||||
margin-right: 6px;
|
left: 9px;
|
||||||
|
}
|
||||||
|
&:after {
|
||||||
|
left: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
> .moodle-actionmenu > .menubar li a {
|
> .menubar li a {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
&.userloggedinas .usermenu .userbutton .avatars {
|
&.userloggedinas .usermenu .userbutton .avatars {
|
||||||
.avatar {
|
.avatar {
|
||||||
&.current {
|
&.current {
|
||||||
margin-left: -42px;
|
left: -14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.userloggedinas .usermenu .userbutton .avatars {
|
||||||
|
.avatar {
|
||||||
|
&.current {
|
||||||
|
position: relative;
|
||||||
|
top: 4px;
|
||||||
|
left: 4px;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin-top: 11px;
|
||||||
|
margin-bottom: -34px;
|
||||||
|
border: 1px solid #fff;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: -2px -2px 16px rgba(0,0,0,0.25);
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
width: inherit;
|
||||||
|
height: inherit;
|
||||||
|
}
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue