Skip to content
Snippets Groups Projects
Commit 1ae69fd6 authored by Kathrin Osswald's avatar Kathrin Osswald
Browse files

Re-ordered in course course settings to be displayed within the course header.

parent 3ed93f5f
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ Changes
### Unreleased
* 2020-02-11 - Re-ordered in course course settings to be displayed within the course header.
* 2020-02-07 - Added missing information to README.md for the changes to the activity navigation links.
* 2020-02-06 - Made changes to icons in course category overview undone as the alignment of them were improved in theme Boost (MDL-65357).
* 2020-01-29 - Adjusted navbar.mustache template due to upstream changes in theme Boost.
......
define(["jquery"],function(a){"use strict";function b(){var b=a("#boost-campus-course-settings"),c=a("#boost-campus-activity-settings"),d=a("body").hasClass("pagelayout-frontpage");d||(a("#page-header .context-header-settings-menu").on("click",function(a){a.stopPropagation(),b.is(":visible")?b.hide(400):(b.show(400),c.is(":visible")&&c.hide(400))}),a("#region-main-settings-menu .action-menu .dropdown-toggle").on("click",function(a){a.stopPropagation(),c.is(":visible")?c.hide(400):(c.show(400),b.is(":visible")&&b.hide(400))}))}return{init:function(){b()}}});
\ No newline at end of file
define(["jquery"],function(a){"use strict";function b(){var b=a("#boost-campus-course-settings"),c=a("#boost-campus-activity-settings"),d=a("body").hasClass("pagelayout-frontpage"),e=a("#page-header .card").css("border-bottom");d||(a("#page-header .context-header-settings-menu").on("click",function(d){d.stopPropagation(),b.is(":visible")?(b.hide(400),setTimeout(function(){a("#page-header .card").css("border-bottom",e),a("#page-header > div").addClass("pb-3")},300)):(b.show(400),a("#page-header div").removeClass("pb-3"),a("#page-header .card").css("border-bottom","none"),b.css("border-top","none"),c.is(":visible")&&c.hide(400))}),a("#region-main-settings-menu .action-menu .dropdown-toggle").on("click",function(d){d.stopPropagation(),c.is(":visible")?c.hide(400):(c.show(400),setTimeout(function(){a("#page-header .card").css("border-bottom",e),a("#page-header > div").addClass("pb-3")},300),b.is(":visible")&&b.hide(400))}))}return{init:function(){b()}}});
\ No newline at end of file
......@@ -31,6 +31,7 @@ define(['jquery'], function($) {
var courseSettings = $('#boost-campus-course-settings');
var activitySettings = $('#boost-campus-activity-settings');
var frontpage = $('body').hasClass('pagelayout-frontpage');
var headerCardBorderBottom = $('#page-header .card').css("border-bottom");
// Only change the behaviour if the setting is enabled and we are not on the frontpage,
// because we did not change the settings menu there. So we need the default propagation here.
......@@ -39,8 +40,15 @@ define(['jquery'], function($) {
event.stopPropagation();
if (courseSettings.is(":visible")) {
courseSettings.hide(400);
setTimeout(function() {
$('#page-header .card').css('border-bottom', headerCardBorderBottom);
$('#page-header > div').addClass('pb-3');
}, 300);
} else {
courseSettings.show(400);
$('#page-header div').removeClass('pb-3');
$('#page-header .card').css('border-bottom', 'none');
courseSettings.css('border-top', 'none');
// Additionally close activity settings if they are currently open.
if (activitySettings.is(":visible")) {
activitySettings.hide(400);
......@@ -53,6 +61,10 @@ define(['jquery'], function($) {
activitySettings.hide(400);
} else {
activitySettings.show(400);
setTimeout(function() {
$('#page-header .card').css('border-bottom', headerCardBorderBottom);
$('#page-header > div').addClass('pb-3');
}, 300);
// Additionally close course settings if they are currently open.
if (courseSettings.is(":visible")) {
courseSettings.hide(400);
......
......@@ -914,11 +914,8 @@ a[href^="mailto"]::before {
#boost-campus-activity-settings {
/* Initially do not display the settings. Visibility will be changed on click with incoursesettings.js. */
display: none;
padding: 1rem;
padding-top: 0;
margin-bottom: 3rem;
margin-top: 1rem;
border: none;
margin-bottom: 1rem;
padding: 0 1rem 1.3rem 1rem;
.nav-tabs {
border: none;
......@@ -934,6 +931,11 @@ a[href^="mailto"]::before {
}
}
/* As this is already placed within the activity content card, the border around the settings card should be removed. */
#boost-campus-activity-settings {
border: none;
}
/* Setting to move 'Switch role to...' menu item to the course settings - but only if
setting showsettingsincourse is also enabled. */
@if (variable-exists(incoursesettingsswitchtoroleposition) and variable-exists(showsettingsincourse)) {
......
......@@ -39,12 +39,10 @@
{{! MODIFICATION:
* Added divs around the tab structure to be able to insert this on different sites.
* Changed the grid definitions for improved displaying.
* Inserted heading for the general course settings.
* Removed check for !is_short_branch to display all children of the course settings within an own tab.
}}
<div id="boost-campus-course-settings" class="card" >
<h2>{{incourse_node_heading}}</h2>
<div class="mx-2 pt-2">
<ul class="nav nav-tabs" role="tablist">
<!-- First the top most node and immediate children -->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment