mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
Merge branch 'MDL-67863-master' of git://github.com/bmbrands/moodle
This commit is contained in:
commit
4767b7bff1
2
theme/boost/amd/build/drawer.min.js
vendored
2
theme/boost/amd/build/drawer.min.js
vendored
@ -1,2 +1,2 @@
|
||||
define ("theme_boost/drawer",["jquery","core/custom_interaction_events","core/log","core/pubsub"],function(a,b,c,d){var f={TOGGLE_REGION:"[data-region=\"drawer-toggle\"]",TOGGLE_ACTION:"[data-action=\"toggle-drawer\"]",TOGGLE_TARGET:"aria-controls",TOGGLE_SIDE:"left",BODY:"body",SECTION:".list-group-item[href*=\"#section-\"]",DRAWER:"#nav-drawer"},g=768>a(document).width(),h=function(){if(!a(f.TOGGLE_REGION).length){c.debug("Page is missing a drawer region")}if(!a(f.TOGGLE_ACTION).length){c.debug("Page is missing a drawer toggle link")}a(f.TOGGLE_REGION).each(function(b,c){var d=a(c).find(f.TOGGLE_ACTION),e=d.attr("aria-controls"),h=a(document.getElementById(e)),i="false"==d.attr("aria-expanded"),j=d.attr("data-side"),k=a(f.BODY),l=d.attr("data-preference");if(g){M.util.set_user_preference(l,"false")}h.on("mousewheel DOMMouseScroll",this.preventPageScroll);if(!i){k.addClass("drawer-open-"+j);d.attr("aria-expanded","true")}else{d.attr("aria-expanded","false")}}.bind(this));this.registerEventListeners();if(g){this.closeAll()}};h.prototype.closeAll=function(){a(f.TOGGLE_REGION).each(function(b,c){var d=a(c).find(f.TOGGLE_ACTION),e=d.attr("data-side"),h=a(f.BODY),i=d.attr("aria-controls"),j=a(document.getElementById(i)),k=d.attr("data-preference");d.attr("aria-expanded","false");h.removeClass("drawer-open-"+e);j.attr("aria-hidden","true");j.addClass("closed");if(!g){M.util.set_user_preference(k,"false")}})};h.prototype.toggleDrawer=function(b){var c=a(b.target).closest("[data-action=toggle-drawer]"),e=c.attr("aria-controls"),h=a(document.getElementById(e)),i=a(f.BODY),j=c.attr("data-side"),k=c.attr("data-preference");if(g){M.util.set_user_preference(k,"false")}i.addClass("drawer-ease");var l="true"==c.attr("aria-expanded");if(!l){c.attr("aria-expanded","true");h.attr("aria-hidden","false");h.focus();i.addClass("drawer-open-"+j);h.removeClass("closed");if(!g){M.util.set_user_preference(k,"true")}}else{i.removeClass("drawer-open-"+j);c.attr("aria-expanded","false");h.attr("aria-hidden","true");h.addClass("closed");if(!g){M.util.set_user_preference(k,"false")}}d.publish("nav-drawer-toggle-start",l)};h.prototype.preventPageScroll=function(b){var c=b.wheelDelta||b.originalEvent&&b.originalEvent.wheelDelta||-b.originalEvent.detail,d=0<=this.scrollTop+a(this).outerHeight()-this.scrollHeight,e=0>=this.scrollTop;if(0>c&&d||0<c&&e){b.preventDefault()}};h.prototype.registerEventListeners=function(){a(f.TOGGLE_ACTION).each(function(c,d){b.define(a(d),[b.events.activate]);a(d).on(b.events.activate,function(a,b){this.toggleDrawer(b.originalEvent);b.originalEvent.preventDefault()}.bind(this))}.bind(this));a(f.SECTION).click(function(){if(g){this.closeAll()}}.bind(this));a(f.DRAWER).on("webkitTransitionEnd msTransitionEnd transitionend",function(b){var c=a(b.target).closest(f.DRAWER),e="false"==c.attr("aria-hidden");d.publish("nav-drawer-toggle-end",e)})};return{init:function init(){return new h}}});
|
||||
define ("theme_boost/drawer",["jquery","core/custom_interaction_events","core/log","core/pubsub"],function(a,b,c,d){var f={TOGGLE_REGION:"[data-region=\"drawer-toggle\"]",TOGGLE_ACTION:"[data-action=\"toggle-drawer\"]",TOGGLE_TARGET:"aria-controls",TOGGLE_SIDE:"left",BODY:"body",SECTION:".list-group-item[href*=\"#section-\"]",DRAWER:"#nav-drawer"},g=768>a(document).width(),h=function(){if(!a(f.TOGGLE_REGION).length){c.debug("Page is missing a drawer region")}if(!a(f.TOGGLE_ACTION).length){c.debug("Page is missing a drawer toggle link")}a(f.TOGGLE_REGION).each(function(b,c){var d=a(c).find(f.TOGGLE_ACTION),e=d.attr("aria-controls"),h=a(document.getElementById(e)),i="false"==d.attr("aria-expanded"),j=d.attr("data-side"),k=a(f.BODY),l=d.attr("data-preference");if(g){M.util.set_user_preference(l,"false")}h.on("mousewheel DOMMouseScroll",this.preventPageScroll);if(!i){k.addClass("drawer-open-"+j);d.attr("aria-expanded","true")}else{d.attr("aria-expanded","false")}}.bind(this));this.registerEventListeners();if(g){this.closeAll()}};h.prototype.closeAll=function(){a(f.TOGGLE_REGION).each(function(b,c){var d=a(c).find(f.TOGGLE_ACTION),e=d.attr("data-side"),h=a(f.BODY),i=d.attr("aria-controls"),j=a(document.getElementById(i)),k=d.attr("data-preference");d.attr("aria-expanded","false");h.removeClass("drawer-open-"+e);j.attr("aria-hidden","true");j.addClass("closed");if(!g){M.util.set_user_preference(k,"false")}})};h.prototype.toggleDrawer=function(b){var c=a(b.target).closest("[data-action=toggle-drawer]"),e=c.attr("aria-controls"),h=a(document.getElementById(e)),i=a(f.BODY),j=c.attr("data-side"),k=c.attr("data-preference");if(g){M.util.set_user_preference(k,"false")}i.addClass("drawer-ease");var l="true"==c.attr("aria-expanded");if(!l){c.attr("aria-expanded","true");h.attr("aria-hidden","false");h.focus();i.addClass("drawer-open-"+j);h.removeClass("closed");if(!g){M.util.set_user_preference(k,"true")}}else{i.removeClass("drawer-open-"+j);c.attr("aria-expanded","false");h.addClass("closed").delay(500).queue(function(){a(this).attr("aria-hidden","true").dequeue()});if(!g){M.util.set_user_preference(k,"false")}}d.publish("nav-drawer-toggle-start",l)};h.prototype.preventPageScroll=function(b){var c=b.wheelDelta||b.originalEvent&&b.originalEvent.wheelDelta||-b.originalEvent.detail,d=0<=this.scrollTop+a(this).outerHeight()-this.scrollHeight,e=0>=this.scrollTop;if(0>c&&d||0<c&&e){b.preventDefault()}};h.prototype.registerEventListeners=function(){a(f.TOGGLE_ACTION).each(function(c,d){b.define(a(d),[b.events.activate]);a(d).on(b.events.activate,function(a,b){this.toggleDrawer(b.originalEvent);b.originalEvent.preventDefault()}.bind(this))}.bind(this));a(f.SECTION).click(function(){if(g){this.closeAll()}}.bind(this));a(f.DRAWER).on("webkitTransitionEnd msTransitionEnd transitionend",function(b){var c=a(b.target).closest(f.DRAWER),e="false"==c.attr("aria-hidden");d.publish("nav-drawer-toggle-end",e)})};return{init:function init(){return new h}}});
|
||||
//# sourceMappingURL=drawer.min.js.map
|
||||
|
File diff suppressed because one or more lines are too long
@ -128,8 +128,9 @@ define(['jquery', 'core/custom_interaction_events', 'core/log', 'core/pubsub'],
|
||||
// Close.
|
||||
body.removeClass('drawer-open-' + side);
|
||||
trigger.attr('aria-expanded', 'false');
|
||||
drawer.attr('aria-hidden', 'true');
|
||||
drawer.addClass('closed');
|
||||
drawer.addClass('closed').delay(500).queue(function() {
|
||||
$(this).attr('aria-hidden', 'true').dequeue();
|
||||
});
|
||||
if (!small) {
|
||||
M.util.set_user_preference(preference, 'false');
|
||||
}
|
||||
|
@ -24,6 +24,10 @@ $drawer-offscreen-gutter: 20px !default;
|
||||
left: -($drawer-width + $drawer-offscreen-gutter);
|
||||
}
|
||||
|
||||
#nav-drawer[aria-hidden=true] .list-group-item {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Use a variable for the drawer background colors. */
|
||||
$drawer-bg: darken($body-bg, 5%) !default;
|
||||
|
||||
|
@ -13389,6 +13389,9 @@ span.editinstructions {
|
||||
#nav-drawer.closed {
|
||||
left: -305px; }
|
||||
|
||||
#nav-drawer[aria-hidden=true] .list-group-item {
|
||||
display: none; }
|
||||
|
||||
/* Use a variable for the drawer background colors. */
|
||||
[data-region="drawer"] {
|
||||
position: fixed;
|
||||
|
@ -58,6 +58,7 @@
|
||||
{{{ output.standard_top_of_body_html }}}
|
||||
|
||||
{{> theme_boost/navbar }}
|
||||
{{> theme_boost/nav-drawer }}
|
||||
|
||||
<div id="page" class="container-fluid d-print-block">
|
||||
{{{ output.full_header }}}
|
||||
@ -89,7 +90,6 @@
|
||||
</div>
|
||||
</div>
|
||||
{{{ output.standard_after_main_region_html }}}
|
||||
{{> theme_boost/nav-drawer }}
|
||||
{{> theme_boost/footer }}
|
||||
</div>
|
||||
|
||||
|
@ -13603,6 +13603,9 @@ span.editinstructions {
|
||||
#nav-drawer.closed {
|
||||
left: -305px; }
|
||||
|
||||
#nav-drawer[aria-hidden=true] .list-group-item {
|
||||
display: none; }
|
||||
|
||||
/* Use a variable for the drawer background colors. */
|
||||
[data-region="drawer"] {
|
||||
position: fixed;
|
||||
|
@ -113,12 +113,12 @@ Feature: View course participants
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to course participants
|
||||
And I follow "Email address"
|
||||
When I follow "2"
|
||||
When I click on "2" "link" in the "//nav[@aria-label='Page']" "xpath_element"
|
||||
Then I should not see "student0x@example.com"
|
||||
And I should not see "student19x@example.com"
|
||||
And I should see "teacher1x@example.com"
|
||||
And I follow "Email address"
|
||||
And I follow "2"
|
||||
And I click on "2" "link" in the "//nav[@aria-label='Page']" "xpath_element"
|
||||
And I should not see "teacher1x@example.com"
|
||||
And I should not see "student19x@example.com"
|
||||
And I should not see "student1x@example.com"
|
||||
|
Loading…
x
Reference in New Issue
Block a user