Merge branch 'wip-MDL-46470-master' of git://github.com/marinaglancy/moodle

Conflicts:
	theme/bootstrapbase/style/moodle.css
This commit is contained in:
Eloy Lafuente (stronk7) 2014-08-13 00:24:51 +02:00
commit b8475d375c
3 changed files with 11 additions and 8 deletions

View File

@ -130,16 +130,18 @@
}
}
// Active state, and it's :hover/:focus to override normal :hover/:focus
.nav-tabs > .active > a,
.nav-tabs > .active > a:hover,
.nav-tabs > .active > a:focus {
color: @gray;
.nav-tabs > .active > a {
background-color: @bodyBackground;
border: 1px solid #ddd;
border-bottom-color: transparent;
cursor: default;
}
.nav-tabs > .active > a:not([href]),
.nav-tabs > .active > a:not([href]):hover,
.nav-tabs > .active > a:not([href]):focus {
color: @gray;
cursor: default;
}
// PILLS
// -----

View File

@ -217,7 +217,7 @@ class theme_bootstrapbase_core_renderer extends core_renderer {
* @return string HTML fragment
*/
protected function render_tabobject(tabobject $tab) {
if ($tab->selected or $tab->activated) {
if (($tab->selected and (!$tab->linkedwhenselected)) or $tab->activated) {
return html_writer::tag('li', html_writer::tag('a', $tab->text), array('class' => 'active'));
} else if ($tab->inactive) {
return html_writer::tag('li', html_writer::tag('a', $tab->text), array('class' => 'disabled'));
@ -228,7 +228,8 @@ class theme_bootstrapbase_core_renderer extends core_renderer {
} else {
$link = html_writer::link($tab->link, $tab->text, array('title' => $tab->title));
}
return html_writer::tag('li', $link);
$params = $tab->selected ? array('class' => 'active') : null;
return html_writer::tag('li', $link, $params);
}
}
}

File diff suppressed because one or more lines are too long