MDL-72456 theme_boost: style drawers

This commit is contained in:
Ferran Recio
2021-11-23 12:51:11 +01:00
parent 16a5169a43
commit 73cfbea3ee
27 changed files with 560 additions and 258 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
define ("core_courseformat/local/courseeditor/exporter",["exports"],function(a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;function b(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);if(b)d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable});c.push.apply(c,d)}return c}function c(a){for(var c=1,e;c<arguments.length;c++){e=null!=arguments[c]?arguments[c]:{};if(c%2){b(Object(e),!0).forEach(function(b){d(a,b,e[b])})}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(a,Object.getOwnPropertyDescriptors(e))}else{b(Object(e)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(e,b))})}}return a}function d(a,b,c){if(b in a){Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0})}else{a[b]=c}return a}function e(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function f(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function g(a,b,c){if(b)f(a.prototype,b);if(c)f(a,c);return a}var h=function(){function a(b){e(this,a);this.reactive=b;this.COMPLETIONS=["incomplete","complete","complete","fail"]}g(a,[{key:"course",value:function course(a){var b,c,d=this,e={sections:[],editmode:this.reactive.isEditing,highlighted:null!==(b=a.course.highlighted)&&void 0!==b?b:""},f=null!==(c=a.course.sectionlist)&&void 0!==c?c:[];f.forEach(function(b){var c,f=null!==(c=a.section.get(b))&&void 0!==c?c:{},g=d.section(a,f);e.sections.push(g)});e.hassections=0!=e.sections.length;return e}},{key:"section",value:function(a,b){var d,e=this,f=c({},b,{cms:[]}),g=null!==(d=b.cmlist)&&void 0!==d?d:[];g.forEach(function(b){var c=a.cm.get(b),d=e.cm(a,c);f.cms.push(d)});f.hascms=0!=f.cms.length;return f}},{key:"cm",value:function(a,b){var d=c({},b,{isactive:!1});return d}},{key:"cmDraggableData",value:function cmDraggableData(a,b){var c=a.cm.get(b);if(!c){return null}var d,e=a.section.get(c.sectionid),f=null===e||void 0===e?void 0:e.cmlist.indexOf(c.id);if(f!==void 0){d=null===e||void 0===e?void 0:e.cmlist[f+1]}return{type:"cm",id:c.id,name:c.name,sectionid:c.sectionid,nextcmid:d}}},{key:"sectionDraggableData",value:function sectionDraggableData(a,b){var c=a.section.get(b);if(!c){return null}return{type:"section",id:c.id,name:c.name,number:c.number}}},{key:"cmCompletion",value:function cmCompletion(a,b){var c={statename:"",state:"NaN"};if(b.completionstate!==void 0){var d;c.state=b.completionstate;c.hasstate=!0;var e=null!==(d=this.COMPLETIONS[b.completionstate])&&void 0!==d?d:"NaN";c["is".concat(e)]=!0}return c}}]);return a}();a.default=h;return a.default});
define ("core_courseformat/local/courseeditor/exporter",["exports"],function(a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;function b(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);if(b)d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable});c.push.apply(c,d)}return c}function c(a){for(var c=1,e;c<arguments.length;c++){e=null!=arguments[c]?arguments[c]:{};if(c%2){b(Object(e),!0).forEach(function(b){d(a,b,e[b])})}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(a,Object.getOwnPropertyDescriptors(e))}else{b(Object(e)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(e,b))})}}return a}function d(a,b,c){if(b in a){Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0})}else{a[b]=c}return a}function e(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function f(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function g(a,b,c){if(b)f(a.prototype,b);if(c)f(a,c);return a}var h=function(){function a(b){e(this,a);this.reactive=b;this.COMPLETIONS=["incomplete","complete","complete","fail"]}g(a,[{key:"course",value:function course(a){var b,c,d=this,e={sections:[],editmode:this.reactive.isEditing,highlighted:null!==(b=a.course.highlighted)&&void 0!==b?b:""},f=null!==(c=a.course.sectionlist)&&void 0!==c?c:[];f.forEach(function(b){var c,f=null!==(c=a.section.get(b))&&void 0!==c?c:{},g=d.section(a,f);e.sections.push(g)});e.hassections=0!=e.sections.length;return e}},{key:"section",value:function(a,b){var d,e,f=this,g=c({},b,{highlighted:null!==(d=a.course.highlighted)&&void 0!==d?d:"",cms:[]}),h=null!==(e=b.cmlist)&&void 0!==e?e:[];h.forEach(function(b){var c=a.cm.get(b),d=f.cm(a,c);g.cms.push(d)});g.hascms=0!=g.cms.length;return g}},{key:"cm",value:function(a,b){var d=c({},b,{isactive:!1});return d}},{key:"cmDraggableData",value:function cmDraggableData(a,b){var c=a.cm.get(b);if(!c){return null}var d,e=a.section.get(c.sectionid),f=null===e||void 0===e?void 0:e.cmlist.indexOf(c.id);if(f!==void 0){d=null===e||void 0===e?void 0:e.cmlist[f+1]}return{type:"cm",id:c.id,name:c.name,sectionid:c.sectionid,nextcmid:d}}},{key:"sectionDraggableData",value:function sectionDraggableData(a,b){var c=a.section.get(b);if(!c){return null}return{type:"section",id:c.id,name:c.name,number:c.number}}},{key:"cmCompletion",value:function cmCompletion(a,b){var c={statename:"",state:"NaN"};if(b.completionstate!==void 0){var d;c.state=b.completionstate;c.hasstate=!0;var e=null!==(d=this.COMPLETIONS[b.completionstate])&&void 0!==d?d:"NaN";c["is".concat(e)]=!0}return c}}]);return a}();a.default=h;return a.default});
//# sourceMappingURL=exporter.min.js.map
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,2 +1,2 @@
define ("core_courseformat/local/courseindex/cm",["exports","core_courseformat/local/courseeditor/dndcmitem","core/templates","core/prefetch"],function(a,b,c,d){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;b=e(b);c=e(c);d=e(d);function e(a){return a&&a.__esModule?a:{default:a}}function f(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){f=function(a){return typeof a}}else{f=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return f(a)}function g(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){c(a);return}if(h.done){b(i)}else{Promise.resolve(i).then(d,e)}}function h(a){return function(){var b=this,c=arguments;return new Promise(function(d,e){var i=a.apply(b,c);function f(a){g(i,d,e,f,h,"next",a)}function h(a){g(i,d,e,f,h,"throw",a)}f(void 0)})}}function i(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function j(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function k(a,b,c){if(b)j(a.prototype,b);if(c)j(a,c);return a}function l(a,b){if("function"!=typeof b&&null!==b){throw new TypeError("Super expression must either be null or a function")}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}});if(b)m(a,b)}function m(a,b){m=Object.setPrototypeOf||function(a,b){a.__proto__=b;return a};return m(a,b)}function n(a){return function(){var b=r(a),c;if(q()){var d=r(this).constructor;c=Reflect.construct(b,arguments,d)}else{c=b.apply(this,arguments)}return o(this,c)}}function o(a,b){if(b&&("object"===f(b)||"function"==typeof b)){return b}return p(a)}function p(a){if(void 0===a){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return a}function q(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return!0}catch(a){return!1}}function r(a){r=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)};return r(a)}d.default.prefetchTemplate("core_courseformat/local/courseindex/cmcompletion");var s=function(a){l(b,a);var d=n(b);function b(){i(this,b);return d.apply(this,arguments)}k(b,[{key:"create",value:function create(){this.name="courseindex_cm";this.selectors={CM_NAME:"[data-for='cm_name']",CM_COMPLETION:"[data-for='cm_completion']"};this.classes={CMHIDDEN:"dimmed",LOCKED:"editinprogress"};this.id=this.element.dataset.id}},{key:"stateReady",value:function stateReady(a){this.configDragDrop(this.id);this._refreshCompletion({state:a,element:a.cm.get(this.id)})}},{key:"getWatchers",value:function getWatchers(){return[{watch:"cm[".concat(this.id,"]:deleted"),handler:this.remove},{watch:"cm[".concat(this.id,"]:updated"),handler:this._refreshCm},{watch:"cm[".concat(this.id,"].completionstate:updated"),handler:this._refreshCompletion}]}},{key:"_refreshCm",value:function _refreshCm(a){var b,c,d=a.element;this.element.classList.toggle(this.classes.CMHIDDEN,!d.visible);this.getElement(this.selectors.CM_NAME).innerHTML=d.name;this.element.classList.toggle(this.classes.DRAGGING,null!==(b=d.dragging)&&void 0!==b?b:!1);this.element.classList.toggle(this.classes.LOCKED,null!==(c=d.locked)&&void 0!==c?c:!1);this.locked=d.locked}},{key:"_refreshCompletion",value:function(){var a=h(regeneratorRuntime.mark(function a(b){var d,e,f,g,h,i,j,k;return regeneratorRuntime.wrap(function(a){while(1){switch(a.prev=a.next){case 0:d=b.state,e=b.element;if(!(this.reactive.isEditing||!e.istrackeduser)){a.next=3;break}return a.abrupt("return");case 3:f=this.getElement(this.selectors.CM_COMPLETION);if(!(f.dataset.value==e.completionstate)){a.next=6;break}return a.abrupt("return");case 6:g=this.reactive.getExporter();h=g.cmCompletion(d,e);a.prev=8;a.next=11;return c.default.renderForPromise("core_courseformat/local/courseindex/cmcompletion",h);case 11:i=a.sent;j=i.html;k=i.js;c.default.replaceNode(f,j,k);a.next=20;break;case 17:a.prev=17;a.t0=a["catch"](8);throw a.t0;case 20:case"end":return a.stop();}}},a,this,[[8,17]])}));return function _refreshCompletion(){return a.apply(this,arguments)}}()}],[{key:"init",value:function init(a,c){return new b({element:document.getElementById(a),selectors:c})}}]);return b}(b.default);a.default=s;return a.default});
define ("core_courseformat/local/courseindex/cm",["exports","core_courseformat/local/courseeditor/dndcmitem","core/templates","core/prefetch"],function(a,b,c,d){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;b=e(b);c=e(c);d=e(d);function e(a){return a&&a.__esModule?a:{default:a}}function f(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){f=function(a){return typeof a}}else{f=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return f(a)}function g(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){c(a);return}if(h.done){b(i)}else{Promise.resolve(i).then(d,e)}}function h(a){return function(){var b=this,c=arguments;return new Promise(function(d,e){var i=a.apply(b,c);function f(a){g(i,d,e,f,h,"next",a)}function h(a){g(i,d,e,f,h,"throw",a)}f(void 0)})}}function i(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function j(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function k(a,b,c){if(b)j(a.prototype,b);if(c)j(a,c);return a}function l(a,b){if("function"!=typeof b&&null!==b){throw new TypeError("Super expression must either be null or a function")}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}});if(b)m(a,b)}function m(a,b){m=Object.setPrototypeOf||function(a,b){a.__proto__=b;return a};return m(a,b)}function n(a){return function(){var b=r(a),c;if(q()){var d=r(this).constructor;c=Reflect.construct(b,arguments,d)}else{c=b.apply(this,arguments)}return o(this,c)}}function o(a,b){if(b&&("object"===f(b)||"function"==typeof b)){return b}return p(a)}function p(a){if(void 0===a){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return a}function q(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return!0}catch(a){return!1}}function r(a){r=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)};return r(a)}d.default.prefetchTemplate("core_courseformat/local/courseindex/cmcompletion");var s=function(a){l(b,a);var d=n(b);function b(){i(this,b);return d.apply(this,arguments)}k(b,[{key:"create",value:function create(){this.name="courseindex_cm";this.selectors={CM_NAME:"[data-for='cm_name']",CM_COMPLETION:"[data-for='cm_completion']"};this.classes={CMHIDDEN:"dimmed",LOCKED:"editinprogress",RESTRICTIONS:"rectrictions"};this.id=this.element.dataset.id}},{key:"stateReady",value:function stateReady(a){this.configDragDrop(this.id);this._refreshCompletion({state:a,element:a.cm.get(this.id)})}},{key:"getWatchers",value:function getWatchers(){return[{watch:"cm[".concat(this.id,"]:deleted"),handler:this.remove},{watch:"cm[".concat(this.id,"]:updated"),handler:this._refreshCm},{watch:"cm[".concat(this.id,"].completionstate:updated"),handler:this._refreshCompletion}]}},{key:"_refreshCm",value:function _refreshCm(a){var b,c,d,e=a.element;this.element.classList.toggle(this.classes.CMHIDDEN,!e.visible);this.getElement(this.selectors.CM_NAME).innerHTML=e.name;this.element.classList.toggle(this.classes.DRAGGING,null!==(b=e.dragging)&&void 0!==b?b:!1);this.element.classList.toggle(this.classes.LOCKED,null!==(c=e.locked)&&void 0!==c?c:!1);this.element.classList.toggle(this.classes.RESTRICTIONS,null!==(d=e.hascmrectrictions)&&void 0!==d?d:!1);this.locked=e.locked}},{key:"_refreshCompletion",value:function(){var a=h(regeneratorRuntime.mark(function a(b){var d,e,f,g,h,i,j,k;return regeneratorRuntime.wrap(function(a){while(1){switch(a.prev=a.next){case 0:d=b.state,e=b.element;if(!(this.reactive.isEditing||!e.istrackeduser)){a.next=3;break}return a.abrupt("return");case 3:f=this.getElement(this.selectors.CM_COMPLETION);if(!(f.dataset.value==e.completionstate)){a.next=6;break}return a.abrupt("return");case 6:g=this.reactive.getExporter();h=g.cmCompletion(d,e);a.prev=8;a.next=11;return c.default.renderForPromise("core_courseformat/local/courseindex/cmcompletion",h);case 11:i=a.sent;j=i.html;k=i.js;c.default.replaceNode(f,j,k);a.next=20;break;case 17:a.prev=17;a.t0=a["catch"](8);throw a.t0;case 20:case"end":return a.stop();}}},a,this,[[8,17]])}));return function _refreshCompletion(){return a.apply(this,arguments)}}()}],[{key:"init",value:function init(a,c){return new b({element:document.getElementById(a),selectors:c})}}]);return b}(b.default);a.default=s;return a.default});
//# sourceMappingURL=cm.min.js.map
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,2 +1,2 @@
define ("core_courseformat/local/courseindex/section",["exports","core_courseformat/local/courseindex/sectiontitle","core_courseformat/local/courseeditor/dndsection"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;b=d(b);c=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){e=function(a){return typeof a}}else{e=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return e(a)}function f(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);if(b)d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable});c.push.apply(c,d)}return c}function g(a){for(var b=1,c;b<arguments.length;b++){c=null!=arguments[b]?arguments[b]:{};if(b%2){f(Object(c),!0).forEach(function(b){h(a,b,c[b])})}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(a,Object.getOwnPropertyDescriptors(c))}else{f(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}}return a}function h(a,b,c){if(b in a){Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0})}else{a[b]=c}return a}function i(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function j(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function k(a,b,c){if(b)j(a.prototype,b);if(c)j(a,c);return a}function l(a,b){if("function"!=typeof b&&null!==b){throw new TypeError("Super expression must either be null or a function")}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}});if(b)m(a,b)}function m(a,b){m=Object.setPrototypeOf||function(a,b){a.__proto__=b;return a};return m(a,b)}function n(a){return function(){var b=r(a),c;if(q()){var d=r(this).constructor;c=Reflect.construct(b,arguments,d)}else{c=b.apply(this,arguments)}return o(this,c)}}function o(a,b){if(b&&("object"===e(b)||"function"==typeof b)){return b}return p(a)}function p(a){if(void 0===a){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return a}function q(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return!0}catch(a){return!1}}function r(a){r=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)};return r(a)}var s=function(a){l(c,a);var d=n(c);function c(){i(this,c);return d.apply(this,arguments)}k(c,[{key:"create",value:function create(){this.name="courseindex_section";this.selectors={SECTION_ITEM:"[data-for='section_item']",SECTION_TITLE:"[data-for='section_title']",CM_LAST:"[data-for=\"cm\"]:last-child"};this.classes={SECTIONHIDDEN:"dimmed",SECTIONCURRENT:"current",LOCKED:"editinprogress"};this.id=this.element.dataset.id}},{key:"stateReady",value:function stateReady(a){this.configState(a);if(this.reactive.isEditing&&this.reactive.supportComponents){var c=new b.default(g({},this,{element:this.getElement(this.selectors.SECTION_ITEM),fullregion:this.element}));this.configDragDrop(c)}}},{key:"getWatchers",value:function getWatchers(){return[{watch:"section[".concat(this.id,"]:deleted"),handler:this.remove},{watch:"section[".concat(this.id,"]:updated"),handler:this._refreshSection}]}},{key:"getLastCm",value:function getLastCm(){return this.getElement(this.selectors.CM_LAST)}},{key:"_refreshSection",value:function _refreshSection(a){var b,c,d=a.element,e=this.getElement(this.selectors.SECTION_ITEM);e.classList.toggle(this.classes.SECTIONHIDDEN,!d.visible);this.element.classList.toggle(this.classes.SECTIONCURRENT,d.current);this.element.classList.toggle(this.classes.DRAGGING,null!==(b=d.dragging)&&void 0!==b?b:!1);this.element.classList.toggle(this.classes.LOCKED,null!==(c=d.locked)&&void 0!==c?c:!1);this.locked=d.locked;this.getElement(this.selectors.SECTION_TITLE).innerHTML=d.title}}],[{key:"init",value:function init(a,b){return new c({element:document.getElementById(a),selectors:b})}}]);return c}(c.default);a.default=s;return a.default});
define ("core_courseformat/local/courseindex/section",["exports","core_courseformat/local/courseindex/sectiontitle","core_courseformat/local/courseeditor/dndsection"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;b=d(b);c=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){e=function(a){return typeof a}}else{e=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return e(a)}function f(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);if(b)d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable});c.push.apply(c,d)}return c}function g(a){for(var b=1,c;b<arguments.length;b++){c=null!=arguments[b]?arguments[b]:{};if(b%2){f(Object(c),!0).forEach(function(b){h(a,b,c[b])})}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(a,Object.getOwnPropertyDescriptors(c))}else{f(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}}return a}function h(a,b,c){if(b in a){Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0})}else{a[b]=c}return a}function i(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function j(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function k(a,b,c){if(b)j(a.prototype,b);if(c)j(a,c);return a}function l(a,b){if("function"!=typeof b&&null!==b){throw new TypeError("Super expression must either be null or a function")}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}});if(b)m(a,b)}function m(a,b){m=Object.setPrototypeOf||function(a,b){a.__proto__=b;return a};return m(a,b)}function n(a){return function(){var b=r(a),c;if(q()){var d=r(this).constructor;c=Reflect.construct(b,arguments,d)}else{c=b.apply(this,arguments)}return o(this,c)}}function o(a,b){if(b&&("object"===e(b)||"function"==typeof b)){return b}return p(a)}function p(a){if(void 0===a){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return a}function q(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return!0}catch(a){return!1}}function r(a){r=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)};return r(a)}var s=function(a){l(c,a);var d=n(c);function c(){i(this,c);return d.apply(this,arguments)}k(c,[{key:"create",value:function create(){this.name="courseindex_section";this.selectors={SECTION_ITEM:"[data-for='section_item']",SECTION_TITLE:"[data-for='section_title']",CM_LAST:"[data-for=\"cm\"]:last-child"};this.classes={SECTIONHIDDEN:"dimmed",SECTIONCURRENT:"current",LOCKED:"editinprogress",RESTRICTIONS:"rectrictions"};this.id=this.element.dataset.id}},{key:"stateReady",value:function stateReady(a){this.configState(a);if(this.reactive.isEditing&&this.reactive.supportComponents){var c=new b.default(g({},this,{element:this.getElement(this.selectors.SECTION_ITEM),fullregion:this.element}));this.configDragDrop(c)}}},{key:"getWatchers",value:function getWatchers(){return[{watch:"section[".concat(this.id,"]:deleted"),handler:this.remove},{watch:"section[".concat(this.id,"]:updated"),handler:this._refreshSection}]}},{key:"getLastCm",value:function getLastCm(){return this.getElement(this.selectors.CM_LAST)}},{key:"_refreshSection",value:function _refreshSection(a){var b,c,d,e=a.element,f=this.getElement(this.selectors.SECTION_ITEM);f.classList.toggle(this.classes.SECTIONHIDDEN,!e.visible);this.element.classList.toggle(this.classes.SECTIONCURRENT,e.current);this.element.classList.toggle(this.classes.DRAGGING,null!==(b=e.dragging)&&void 0!==b?b:!1);this.element.classList.toggle(this.classes.LOCKED,null!==(c=e.locked)&&void 0!==c?c:!1);this.element.classList.toggle(this.classes.RESTRICTIONS,null!==(d=e.hasrestrictions)&&void 0!==d?d:!1);this.locked=e.locked;this.getElement(this.selectors.SECTION_TITLE).innerHTML=e.title}}],[{key:"init",value:function init(a,b){return new c({element:document.getElementById(a),selectors:b})}}]);return c}(c.default);a.default=s;return a.default});
//# sourceMappingURL=section.min.js.map
File diff suppressed because one or more lines are too long
@@ -72,6 +72,7 @@ export default class {
section(state, sectioninfo) {
const section = {
...sectioninfo,
highlighted: state.course.highlighted ?? '',
cms: [],
};
const cmlist = sectioninfo.cmlist ?? [];
@@ -49,6 +49,7 @@ export default class Component extends DndCmItem {
this.classes = {
CMHIDDEN: 'dimmed',
LOCKED: 'editinprogress',
RESTRICTIONS: 'rectrictions',
};
// We need our id to watch specific events.
this.id = this.element.dataset.id;
@@ -107,6 +108,7 @@ export default class Component extends DndCmItem {
this.getElement(this.selectors.CM_NAME).innerHTML = element.name;
this.element.classList.toggle(this.classes.DRAGGING, element.dragging ?? false);
this.element.classList.toggle(this.classes.LOCKED, element.locked ?? false);
this.element.classList.toggle(this.classes.RESTRICTIONS, element.hascmrectrictions ?? false);
this.locked = element.locked;
}
@@ -46,6 +46,7 @@ export default class Component extends DndSection {
SECTIONHIDDEN: 'dimmed',
SECTIONCURRENT: 'current',
LOCKED: 'editinprogress',
RESTRICTIONS: 'rectrictions',
};
// We need our id to watch specific events.
@@ -119,6 +120,7 @@ export default class Component extends DndSection {
this.element.classList.toggle(this.classes.SECTIONCURRENT, element.current);
this.element.classList.toggle(this.classes.DRAGGING, element.dragging ?? false);
this.element.classList.toggle(this.classes.LOCKED, element.locked ?? false);
this.element.classList.toggle(this.classes.RESTRICTIONS, element.hasrestrictions ?? false);
this.locked = element.locked;
// Update title.
this.getElement(this.selectors.SECTION_TITLE).innerHTML = element.title;
@@ -71,7 +71,7 @@ class cm implements renderable {
* @return stdClass data context for a mustache template
*/
public function export_for_template(\renderer_base $output): stdClass {
global $USER;
global $USER, $CFG;
$format = $this->format;
$section = $this->section;
@@ -91,6 +91,15 @@ class cm implements renderable {
$info = new info_module($cm);
$data->accessvisible = ($data->visible && $info->is_available_for_all());
// Check if restriction access are visible to the user.
$canviewhidden = has_capability('moodle/course:viewhiddenactivities', $cm->context);
if (!empty($CFG->enableavailability) && $canviewhidden) {
// Some users can see restrictions even if it does not apply to them.
$data->hascmrectrictions = !empty($cm->availableinfo);
} else {
$data->hascmrectrictions = !$data->accessvisible || !$cm->uservisible;
}
// Add url if the activity is compatible.
$url = $cm->url;
if ($url) {
@@ -20,6 +20,7 @@ use core_courseformat\base as course_format;
use section_info;
use renderable;
use stdClass;
use context_course;
/**
* Contains the ajax update section structure.
@@ -54,6 +55,7 @@ class section implements renderable {
* @return array data context for a mustache template
*/
public function export_for_template(\renderer_base $output): stdClass {
global $CFG;
$format = $this->format;
$course = $format->get_course();
@@ -88,6 +90,17 @@ class section implements renderable {
'contentexpanded' => $contentexpanded
];
// If the section availability restrictions must be displayed.
$canviewhidden = has_capability(
'moodle/course:viewhiddenactivities',
context_course::instance($course->id)
);
if (!empty($CFG->enableavailability) && $canviewhidden) {
$data->hasrestrictions = !empty($section->availableinfo);
} else {
$data->hasrestrictions = false;
}
if (empty($modinfo->sections[$section->section])) {
return $data;
}
@@ -28,11 +28,13 @@
"isactive": 1,
"uniqid": "0",
"isactive": 1,
"accessvisible": 1
"accessvisible": 1,
"hascmrectrictions": 0
}
}}
<li class="courseindex-item
{{#isactive}}active{{/isactive}}
{{#hascmrectrictions}}rectrictions{{/hascmrectrictions}}
{{^accessvisible}}dimmed{{/accessvisible}}
{{#url}} d-flex {{/url}} {{^url}} d-flex-noedit {{/url}}"
id="{{uniqid}}-course-index-cm-{{id}}"
@@ -58,6 +60,9 @@
{{{name}}}
</span>
{{/url}}
<span class="courseindex-locked ml-1" data-for="cm_name">
{{#pix}} t/locked, core {{/pix}}
</span>
<span class="dragicon ml-auto">{{#pix}}i/dragdrop{{/pix}}</span>
</li>
{{#js}}
@@ -99,7 +99,7 @@
}
}}
<nav id="{{uniqid}}-course-index" class="courseindex {{#editmode}} editing {{/editmode}}">
<nav id="{{uniqid}}-course-index" class="courseindex {{#editmode}} editing {{/editmode}}" role="tree">
{{#sections}}
{{> core_courseformat/local/courseindex/section }}
{{/sections}}
@@ -29,6 +29,7 @@
"isactive": 1,
"current": 1,
"visible": 1,
"hasrectrictions": 0,
"cms": [
{
"id": 10,
@@ -63,7 +64,10 @@
role="treeitem"
aria-owns="courseindexcollapse{{number}}"
>
<div class="courseindex-item d-flex {{^visible}}dimmed{{/visible}} courseindex-section-title"
<div class="courseindex-item d-flex
{{^visible}}dimmed{{/visible}}
{{#hasrestrictions}}rectrictions{{/hasrestrictions}}
courseindex-section-title"
id="courseindexsection{{number}}"
data-for="section_item"
>
@@ -76,12 +80,12 @@
>
<span class="collapsed-icon icon-no-margin mr-1"
data-toggle="tooltip" title="{{#str}} expand, core {{/str}}">
{{#pix}} t/collapsed, core {{/pix}}
{{#pix}} t/collapsedchevron, core {{/pix}}
<span class="sr-only">{{#str}} expand, core {{/str}}</span>
</span>
<span class="expanded-icon icon-no-margin mr-1"
data-toggle="tooltip" title="{{#str}} collapse, core {{/str}}">
{{#pix}} t/expanded, core {{/pix}}
{{#pix}} t/expandedchevron, core {{/pix}}
<span class="sr-only">{{#str}} collapse, core {{/str}}</span>
</span>
</a>
@@ -93,17 +97,19 @@
>
{{{title}}}
</a>
<span class="current-badge badge badge-primary ml-2 px-2">
<span class="current-badge badge badge-primary ml-2 px-2 rounded-pill">
{{highlighted}}
</span>
<span class="courseindex-locked ml-1" data-for="cm_name">
{{#pix}} t/locked, core {{/pix}}
</span>
<span class="dragicon ml-auto">{{#pix}}i/dragdrop{{/pix}}</span>
</div>
<div id="courseindexcollapse{{number}}"
class="courseindex-item-content collapse {{#isactive}}show{{/isactive}}"
aria-labelledby="courseindexsection{{number}}"
role="group"
>
<ul class="courseindex-sectioncontent unlist" data-for="cmlist" data-id="{{id}}">
<ul class="courseindex-sectioncontent unlist" data-for="cmlist" data-id="{{id}}" role="group">
{{#cms}}
{{> core_courseformat/local/courseindex/cm }}
{{/cms}}
@@ -358,6 +358,7 @@ class icon_system_fontawesome extends icon_system_font {
'core:t/block' => 'fa-ban',
'core:t/block_to_dock_rtl' => 'fa-chevron-right',
'core:t/block_to_dock' => 'fa-chevron-left',
'core:t/blocks_drawer' => 'fa-chevron-left',
'core:t/calc_off' => 'fa-calculator', // TODO: Change to better icon once we have stacked icon support or more icons.
'core:t/calc' => 'fa-calculator',
'core:t/check' => 'fa-check',
@@ -397,6 +398,7 @@ class icon_system_fontawesome extends icon_system_font {
'core:t/groups' => 'fa-user-circle',
'core:t/groupv' => 'fa-user-circle-o',
'core:t/hide' => 'fa-eye',
'core:t/index_drawer' => 'fa-list',
'core:t/left' => 'fa-arrow-left',
'core:t/less' => 'fa-caret-up',
'core:t/locked' => 'fa-lock',
Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

+33
View File
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
id="svg4"
version="1.1"
overflow="visible"
preserveAspectRatio="xMinYMid meet"
viewBox="0 0 12 12"
height="12"
width="12">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<path
style="fill:#999999;stroke-width:1.65018058"
id="path2"
d="m 2.7821478,5.3399277 1.1551265,-1.1551264 2.970325,-2.970325 c 0.3300362,-0.33003613 0.8250904,-0.33003613 1.1551264,0 l 1.1551265,1.1551264 c 0.3300361,0.3300361 0.3300361,0.8250902 0,1.1551264 L 6.7425813,6 9.2178522,8.4752709 c 0.3300361,0.3300357 0.3300361,0.82509 0,1.1551261 l -1.1551265,1.155127 c -0.330036,0.330036 -0.8250902,0.330036 -1.1551264,0 L 2.7821478,6.4950542 c -0.3300361,-0.3300361 -0.3300361,-0.8250903 0,-1.1551265 z" />
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

+34
View File
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
id="svg4"
version="1.1"
overflow="visible"
preserveAspectRatio="xMinYMid meet"
viewBox="0 -1 16 16"
height="16"
width="16">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<path
style="font-variant-east_asian:normal;opacity:1;vector-effect:none;fill:#999999;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path2"
transform="translate(0,-1)"
d="M 0 1 L 0 3 L 2 3 L 2 1 L 0 1 z M 4 1 L 4 3 L 16 3 L 16 1 L 4 1 z M 0 5 L 0 7 L 2 7 L 2 5 L 0 5 z M 4 5 L 4 7 L 16 7 L 16 5 L 4 5 z M 0 9 L 0 11 L 2 11 L 2 9 L 0 9 z M 4 9 L 4 11 L 16 11 L 16 9 L 4 9 z M 0 13 L 0 15 L 2 15 L 2 13 L 0 13 z M 4 13 L 4 15 L 16 15 L 16 13 L 4 13 z " />
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

+31
View File
@@ -12,6 +12,9 @@ $collapse-list-item-padding-x: 1rem !default;
$collapse-list-item-hover-bg: theme-color-level('info', -11) !default;
$collapse-list-item-hover-border: theme-color-level('info', -9) !default;
$thin-scroll-bg-thumb: $gray-600 !default;
$thin-scroll-bg-hover: $gray-700 !default;
$font-size-xs: ($font-size-base * .75) !default;
#region-main {
@@ -2814,6 +2817,34 @@ $scrollbar-track: lighten($primary, 40%);
border-right: $border-width solid $white;
}
}
// Thin scrollbars.
@mixin thin-scrolls($bg-track) {
// Firefox.
scrollbar-width: thin;
scrollbar-color: $thin-scroll-bg-thumb $bg-track;
// Chrome, Edge and Safari.
&::-webkit-scrollbar {
width: 12px;
}
&::-webkit-scrollbar-track {
background: $bg-track;
}
&::-webkit-scrollbar-thumb {
background-color: $thin-scroll-bg-thumb;
border-radius: 20px;
border: 3px solid $bg-track;
}
&::-webkit-scrollbar-thumb:hover {
background-color: $thin-scroll-bg-hover;
}
}
// Generic dropzones and dragging styles.
body.dragging {
+80 -28
View File
@@ -1,23 +1,58 @@
$courseindex-link-color: $list-group-action-color !default;
$courseindex-link-hover-color: $list-group-action-hover-color !default;
$courseindex-item-hover-bg: theme-color-level('info', -11) !default;
$courseindex-item-hover-border: theme-color-level('info', -9) !default;
$courseindex-link-dimmed-color: $gray-600 !default;
$courseindex-link-hover-color: black !default;
$courseindex-item-dragging-bg: theme-color-level('info', -11) !default;
$courseindex-item-dragging-border: theme-color-level('info', -9) !default;
$courseindex-item-active-border: $gray-300 !default;
$courseindex-item-active-bg: $gray-100 !default;
$courseindex-item-padding-y: 0.5rem;
$courseindex-item-padding-x: 1rem;
$courseindex-item-padding-x: 0.5rem;
$courseindex-item-radius: $border-radius !default;
$courseindex-item-current: $primary !default;
.courseindex {
.courseindex-heading {
padding: $courseindex-item-padding-y $courseindex-item-padding-x;
@mixin courseindex-item-hover() {
@include hover-focus() {
color: $courseindex-link-hover-color;
.courseindex-link {
color: $courseindex-link-hover-color;
cursor: pointer;
}
&.dimmed {
color: $courseindex-link-hover-color;
.courseindex-link {
color: $courseindex-link-hover-color;
}
}
&.draggable {
cursor: pointer;
}
}
}
@mixin courseindex-item-dragging() {
&.dragging {
border: $border-width $courseindex-item-dragging-border;
background-color: $courseindex-item-dragging-bg;
}
}
.courseindex {
// Both activity and section items.
.courseindex-item {
padding: $courseindex-item-padding-y $courseindex-item-padding-x;
border: $border-width solid transparent;
@include border-radius($courseindex-item-radius);
&.courseindex-section-title a {
font-weight: bold;
}
.icons-collapse-expand {
padding-right: 4px;
}
.courseindex-link {
color: $courseindex-link-color;
@include hover-focus() {
@@ -26,32 +61,38 @@ $courseindex-item-current: $primary !default;
}
}
.courseindex-name {
font-style: italic;
}
@include courseindex-item-hover();
@include hover-focus() {
background-color: $courseindex-item-hover-bg;
border-color: $courseindex-item-hover-border;
}
@include courseindex-item-dragging();
&.active {
background-color: $courseindex-item-active-bg;
border-color: $courseindex-item-active-border;
@include hover-focus() {
background-color: $courseindex-item-hover-bg;
border-color: $courseindex-item-hover-border;
}
// Hidden elements.
&.dimmed {
color: $courseindex-link-dimmed-color;
.courseindex-link {
color: $courseindex-link-dimmed-color;
}
}
&.dimmed {
opacity: .7;
font-style: italic;
// Restrictions icon.
.courseindex-locked {
display: none;
}
&.rectrictions {
.courseindex-locked {
display: block;
}
}
// Completion.
.completioninfo {
min-width: 24px;
transform: scale(0.5);
transform: scale(0.7);
&.completion_complete {
color: $success;
@@ -63,14 +104,13 @@ $courseindex-item-current: $primary !default;
}
}
.courseindex-sectioncontent {
.courseindex-item {
padding-left: $courseindex-item-padding-x;
}
}
// The full section collapsable.
.courseindex-section {
@include courseindex-item-dragging();
border-left: solid 3px transparent;
.current-badge {
line-height: $line-height-base;
display: none;
@@ -88,18 +128,30 @@ $courseindex-item-current: $primary !default;
/* Extra dropzone space */
padding-bottom: 1em;
}
.courseindex-sectioncontent {
.courseindex-item {
padding-left: $courseindex-item-padding-x;
}
}
}
// General icons size.
.icon {
font-size: 12px;
}
// Element visible only on editing mode.
.d-flex-noedit {
display: none;
}
&.editing {
.d-flex-noedit {
display: flex;
}
}
// Placeholders.
.media-list {
.rounded-circle {
height: 1rem;
+27 -15
View File
@@ -5,6 +5,9 @@ $drawer-width: 285px !default;
$drawer-padding-x: 20px !default;
$drawer-padding-y: 20px !default;
$drawer-offscreen-gutter: 20px !default;
$drawer-bg-color: $gray-100 !default;
$drawer-scroll-bg-track: $gray-100 !default;
$drawer-shadow-color: rgba(0, 0, 0, .25) !default;
:target {
scroll-margin-top: $fixed-header-y + 10px;
@@ -161,7 +164,7 @@ $right-drawer-width: 320px;
@mixin drawer() {
transition: left 0.2s ease, right 0.2s ease, top 0.2s ease, bottom 0.2s ease;
background-color: $body-bg;
background-color: $drawer-bg-color;
z-index: $zindex-modal;
position: fixed;
height: 100vh;
@@ -175,20 +178,30 @@ $right-drawer-width: 320px;
max-width: $drawer-width;
}
&.drawer-right {
border-left: $border-width solid $border-color;
right: calc(-#{$drawer-width} + -10px);
@include box-shadow($box-shadow-drawer-right);
&.show {
right: 0;
}
.drawertoggle {
margin-left: auto;
margin-right: 5px;
}
}
&.drawer-left {
border-right: $border-width solid $border-color;
left: calc(-#{$drawer-width} + -10px);
@include box-shadow($box-shadow-drawer-left);
&.show {
left: 0;
}
.drawertoggle {
margin-right: auto;
margin-left: 5px;
}
}
&.drawer-bottom {
bottom: -110%;
@@ -214,6 +227,13 @@ $right-drawer-width: 320px;
display: none;
}
.drawerheader {
padding: 0;
height: $navbar-height;
display: flex;
align-items: center;
}
@include media-breakpoint-down(md) {
.drawer-md {
display: block;
@@ -230,17 +250,6 @@ $right-drawer-width: 320px;
}
}
.drawerheader {
padding: 0 0.75rem;
height: $navbar-height;
display: flex;
align-items: center;
border-bottom: $border-width solid $border-color;
.drawertoggle {
margin-left: auto;
}
}
.drawercontent {
position: relative;
height: calc(100% - #{$navbar-height});
@@ -248,9 +257,12 @@ $right-drawer-width: 320px;
flex-direction: column;
flex-wrap: nowrap;
overflow-y: auto;
padding: 0.5rem;
padding: 0.4rem;
.dropdown-menu .dropdown-item {
width: 220px;
white-space: normal;
}
@include thin-scrolls($drawer-scroll-bg-track);
}
+50 -37
View File
@@ -52,45 +52,57 @@
}
}
.drawer-left-toggle {
position: fixed;
top: calc(#{$navbar-height} + 0.5rem);
left: 0;
z-index: 2;
.btn {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
padding: 0.375rem;
width: 2.5rem;
color: $white;
background-color: $primary;
.icon {
width: auto;
height: auto;
.drawer-toggles {
.drawer-toggler {
position: fixed;
top: calc(#{$navbar-height} + 0.7rem);
z-index: 2;
.btn {
border-radius: 200px;
padding: 16px;
background-color: $gray-300;
.icon {
width: auto;
height: auto;
}
transition: padding 200ms;
}
}
.drawer-left-toggle {
left: 0;
.btn {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
padding-right: 14px;
padding-left: 10px;
&:hover {
padding-left: 20px;
}
}
}
.drawer-right-toggle {
right: 0;
.btn {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
padding-right: 10px;
padding-left: 14px;
&:hover {
padding-right: 20px;
}
}
}
}
#page.drawers.show-drawer-left .drawer-left-toggle {
display: none;
}
.drawer-right-toggle {
position: fixed;
top: calc(#{$navbar-height} + 0.5rem);
right: 0;
z-index: 2;
.btn {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
padding: 0.375rem;
width: 2.5rem;
color: $white;
background-color: $primary;
.icon {
width: auto;
height: auto;
}
}
}
#page.drawers.show-drawer-right .drawer-right-toggle {
display: none;
}
@@ -99,10 +111,11 @@
//the scroll to top button
.drawer-toggles {
z-index: 100;
}
.drawer-right-toggle,
.drawer-left-toggle {
top: calc(100vh / 2 - 1rem);
.drawer-right-toggle,
.drawer-left-toggle {
top: calc(99vh - (#{$navbar-height} * 2));
}
}
#page.drawers.scroll-down {
.drawer-right-toggle {
+117 -78
View File
@@ -14740,7 +14740,7 @@ body.drawer-ease {
.drawer {
transition: left 0.2s ease, right 0.2s ease, top 0.2s ease, bottom 0.2s ease;
background-color: #fff;
background-color: #f8f9fa;
z-index: 1050;
position: fixed;
height: 100vh;
@@ -14749,15 +14749,19 @@ body.drawer-ease {
width: 285px;
max-width: 285px; }
.drawer.drawer-right {
border-left: 1px solid #dee2e6;
right: calc(-285px + -10px); }
.drawer.drawer-right.show {
right: 0; }
.drawer.drawer-right .drawertoggle {
margin-left: auto;
margin-right: 5px; }
.drawer.drawer-left {
border-right: 1px solid #dee2e6;
left: calc(-285px + -10px); }
.drawer.drawer-left.show {
left: 0; }
.drawer.drawer-left .drawertoggle {
margin-right: auto;
margin-left: 5px; }
.drawer.drawer-bottom {
bottom: -110%; }
.drawer.drawer-bottom.show {
@@ -14771,11 +14775,17 @@ body.drawer-ease {
.drawer-sm {
display: none; }
.drawerheader {
padding: 0;
height: 60px;
display: flex;
align-items: center; }
@media (max-width: 991.98px) {
.drawer-md {
display: block;
transition: left 0.2s ease, right 0.2s ease, top 0.2s ease, bottom 0.2s ease;
background-color: #fff;
background-color: #f8f9fa;
z-index: 1050;
position: fixed;
height: 100vh;
@@ -14784,15 +14794,19 @@ body.drawer-ease {
width: 285px;
max-width: 285px; }
.drawer-md.drawer-right {
border-left: 1px solid #dee2e6;
right: calc(-285px + -10px); }
.drawer-md.drawer-right.show {
right: 0; }
.drawer-md.drawer-right .drawertoggle {
margin-left: auto;
margin-right: 5px; }
.drawer-md.drawer-left {
border-right: 1px solid #dee2e6;
left: calc(-285px + -10px); }
.drawer-md.drawer-left.show {
left: 0; }
.drawer-md.drawer-left .drawertoggle {
margin-right: auto;
margin-left: 5px; }
.drawer-md.drawer-bottom {
bottom: -110%; }
.drawer-md.drawer-bottom.show {
@@ -14802,7 +14816,7 @@ body.drawer-ease {
.drawer-sm {
display: block;
transition: left 0.2s ease, right 0.2s ease, top 0.2s ease, bottom 0.2s ease;
background-color: #fff;
background-color: #f8f9fa;
z-index: 1050;
position: fixed;
height: 100vh;
@@ -14811,29 +14825,24 @@ body.drawer-ease {
width: 285px;
max-width: 285px; }
.drawer-sm.drawer-right {
border-left: 1px solid #dee2e6;
right: calc(-285px + -10px); }
.drawer-sm.drawer-right.show {
right: 0; }
.drawer-sm.drawer-right .drawertoggle {
margin-left: auto;
margin-right: 5px; }
.drawer-sm.drawer-left {
border-right: 1px solid #dee2e6;
left: calc(-285px + -10px); }
.drawer-sm.drawer-left.show {
left: 0; }
.drawer-sm.drawer-left .drawertoggle {
margin-right: auto;
margin-left: 5px; }
.drawer-sm.drawer-bottom {
bottom: -110%; }
.drawer-sm.drawer-bottom.show {
bottom: 0; } }
.drawerheader {
padding: 0 0.75rem;
height: 60px;
display: flex;
align-items: center;
border-bottom: 1px solid #dee2e6; }
.drawerheader .drawertoggle {
margin-left: auto; }
.drawercontent {
position: relative;
height: calc(100% - 60px);
@@ -14841,10 +14850,22 @@ body.drawer-ease {
flex-direction: column;
flex-wrap: nowrap;
overflow-y: auto;
padding: 0.5rem; }
padding: 0.4rem;
scrollbar-width: thin;
scrollbar-color: #6a737b #f8f9fa; }
.drawercontent .dropdown-menu .dropdown-item {
width: 220px;
white-space: normal; }
.drawercontent::-webkit-scrollbar {
width: 12px; }
.drawercontent::-webkit-scrollbar-track {
background: #f8f9fa; }
.drawercontent::-webkit-scrollbar-thumb {
background-color: #6a737b;
border-radius: 20px;
border: 3px solid #f8f9fa; }
.drawercontent::-webkit-scrollbar-thumb:hover {
background-color: #495057; }
#page-my-index {
background-color: #f7f7f7; }
@@ -20027,50 +20048,51 @@ span[data-flexitour="container"][x-placement="right"], span[data-flexitour="cont
.pagelayout-course #page.drawers .main-inner {
max-width: 800px; } }
.drawer-left-toggle {
.drawer-toggles .drawer-toggler {
position: fixed;
top: calc(60px + 0.5rem);
left: 0;
top: calc(60px + 0.7rem);
z-index: 2; }
.drawer-left-toggle .btn {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
padding: 0.375rem;
width: 2.5rem;
color: #fff;
background-color: #0f6cbf; }
.drawer-left-toggle .btn .icon {
.drawer-toggles .drawer-toggler .btn {
border-radius: 200px;
padding: 16px;
background-color: #dee2e6;
transition: padding 200ms; }
.drawer-toggles .drawer-toggler .btn .icon {
width: auto;
height: auto; }
.drawer-toggles .drawer-left-toggle {
left: 0; }
.drawer-toggles .drawer-left-toggle .btn {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
padding-right: 14px;
padding-left: 10px; }
.drawer-toggles .drawer-left-toggle .btn:hover {
padding-left: 20px; }
.drawer-toggles .drawer-right-toggle {
right: 0; }
.drawer-toggles .drawer-right-toggle .btn {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
padding-right: 10px;
padding-left: 14px; }
.drawer-toggles .drawer-right-toggle .btn:hover {
padding-right: 20px; }
#page.drawers.show-drawer-left .drawer-left-toggle {
display: none; }
.drawer-right-toggle {
position: fixed;
top: calc(60px + 0.5rem);
right: 0;
z-index: 2; }
.drawer-right-toggle .btn {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
padding: 0.375rem;
width: 2.5rem;
color: #fff;
background-color: #0f6cbf; }
.drawer-right-toggle .btn .icon {
width: auto;
height: auto; }
#page.drawers.show-drawer-right .drawer-right-toggle {
display: none; }
@media (max-width: 767.98px) {
.drawer-toggles {
z-index: 100; }
.drawer-right-toggle,
.drawer-left-toggle {
top: calc(100vh / 2 - 1rem); }
.drawer-toggles .drawer-right-toggle,
.drawer-toggles .drawer-left-toggle {
top: calc(99vh - (60px * 2)); }
#page.drawers.scroll-down .drawer-right-toggle {
transform: translateX(150%);
pointer-events: auto;
@@ -20897,55 +20919,72 @@ div.editor_atto_toolbar button .icon {
font-size: 1.5em;
font-weight: bold; } }
.courseindex .courseindex-heading {
padding: 0.5rem 1rem; }
.courseindex .courseindex-item {
padding: 0.5rem 1rem;
padding: 0.5rem 0.5rem;
border: 1px solid transparent;
border-radius: 0.25rem; }
.courseindex .courseindex-item.courseindex-section-title a {
font-weight: bold; }
.courseindex .courseindex-item .icons-collapse-expand {
padding-right: 4px; }
.courseindex .courseindex-item .courseindex-link {
color: #495057; }
.courseindex .courseindex-item .courseindex-link:hover, .courseindex .courseindex-item .courseindex-link:focus {
color: #495057;
color: black;
text-decoration: none; }
.courseindex .courseindex-item .courseindex-name {
font-style: italic; }
.courseindex .courseindex-item:hover, .courseindex .courseindex-item:focus {
background-color: #e0f0f2;
border-color: #b8dce2; }
color: black; }
.courseindex .courseindex-item:hover .courseindex-link, .courseindex .courseindex-item:focus .courseindex-link {
color: black;
cursor: pointer; }
.courseindex .courseindex-item:hover.dimmed, .courseindex .courseindex-item:focus.dimmed {
color: black; }
.courseindex .courseindex-item:hover.dimmed .courseindex-link, .courseindex .courseindex-item:focus.dimmed .courseindex-link {
color: black; }
.courseindex .courseindex-item:hover.draggable, .courseindex .courseindex-item:focus.draggable {
cursor: pointer; }
.courseindex .courseindex-item.dragging {
border: 1px #b8dce2;
background-color: #e0f0f2; }
.courseindex .courseindex-item.active {
background-color: #f8f9fa;
border-color: #dee2e6; }
.courseindex .courseindex-item.active:hover, .courseindex .courseindex-item.active:focus {
background-color: #e0f0f2;
border-color: #b8dce2; }
.courseindex .courseindex-item.dimmed {
opacity: .7;
font-style: italic; }
color: #6a737b; }
.courseindex .courseindex-item.dimmed .courseindex-link {
color: #6a737b; }
.courseindex .courseindex-item .courseindex-locked {
display: none; }
.courseindex .courseindex-item.rectrictions .courseindex-locked {
display: block; }
.courseindex .courseindex-item .completioninfo {
min-width: 24px;
transform: scale(0.5); }
transform: scale(0.7); }
.courseindex .courseindex-item .completioninfo.completion_complete {
color: #357a32; }
.courseindex .courseindex-item .completioninfo.completion_fail {
color: #ca3120; }
.courseindex .courseindex-sectioncontent .courseindex-item {
padding-left: 1rem; }
.courseindex .courseindex-section {
border-left: solid 3px transparent; }
.courseindex .courseindex-section.dragging {
border: 1px #b8dce2;
background-color: #e0f0f2; }
.courseindex .courseindex-section .current-badge {
line-height: 1.5;
display: none; }
.courseindex .courseindex-section.current {
border-left: solid 3px #0f6cbf; }
.courseindex .courseindex-section.current .current-badge {
display: inline-block; }
.courseindex .courseindex-section.dropready .courseindex-item-content {
/* Extra dropzone space */
padding-bottom: 1em; }
.courseindex .courseindex-section .courseindex-sectioncontent .courseindex-item {
padding-left: 0.5rem; }
.courseindex .courseindex-section .current-badge {
line-height: 1.5;
display: none; }
.courseindex .courseindex-section.current {
border-left: solid 3px #0f6cbf; }
.courseindex .courseindex-section.current .current-badge {
display: inline-block; }
.courseindex .courseindex-section.dropready .courseindex-item-content {
/* Extra dropzone space */
padding-bottom: 1em; }
.courseindex .icon {
font-size: 12px; }
.courseindex .d-flex-noedit {
display: none; }
-1
View File
@@ -35,7 +35,6 @@
}} data-close-on-resize="{{$drawercloseonresize}}0{{/drawercloseonresize}}"{{!
}}>
<div class="drawerheader">
{{$drawerheading}}{{/drawerheading}}
<button class="btn drawertoggle icon-no-margin" data-toggle="drawers" data-action="closedrawer" data-target="{{$id}}{{/id}}">
{{#pix}}e/cancel, core, {{#str}}closedrawer, core{{/str}}{{/pix}}
</button>
+16 -6
View File
@@ -94,18 +94,28 @@
<div id="topofscroll" class="main-inner">
<div class="drawer-toggles d-flex">
{{#courseindex}}
<div class="drawer-left-toggle open-nav">
<button class="btn icon-no-margin" data-toggle="drawers" data-action="toggle" data-target="theme_boost-drawers-courseindex">
<div class="drawer-toggler drawer-left-toggle open-nav">
<button
class="shadow-sm btn icon-no-margin"
data-toggle="drawers"
data-action="toggle"
data-target="theme_boost-drawers-courseindex"
>
<span class="sr-only">{{#str}}opendrawerindex, core{{/str}}</span>
{{#pix}}e/align_left, moodle, {{#str}}opendrawerindex, core{{/str}}{{/pix}}
{{#pix}} t/index_drawer, moodle {{/pix}}
</button>
</div>
{{/courseindex}}
{{#hasblocks}}
<div class="drawer-right-toggle ml-auto">
<button class="btn icon-no-margin" data-toggle="drawers" data-action="toggle" data-target="theme_boost-drawers-blocks">
<div class="drawer-toggler drawer-right-toggle ml-auto">
<button
class="shadow-sm btn icon-no-margin"
data-toggle="drawers"
data-action="toggle"
data-target="theme_boost-drawers-blocks"
>
<span class="sr-only">{{#str}}opendrawerblocks, core{{/str}}</span>
{{#pix}}i/categoryevent, moodle, {{#str}}opendrawerblocks, core{{/str}}{{/pix}}
{{#pix}}t/blocks_drawer, core, {{#str}}opendrawerblocks, core{{/str}}{{/pix}}
</button>
</div>
{{/hasblocks}}
+117 -78
View File
@@ -14740,7 +14740,7 @@ body.drawer-ease {
.drawer {
transition: left 0.2s ease, right 0.2s ease, top 0.2s ease, bottom 0.2s ease;
background-color: #fff;
background-color: #f8f9fa;
z-index: 1050;
position: fixed;
height: 100vh;
@@ -14749,15 +14749,19 @@ body.drawer-ease {
width: 285px;
max-width: 285px; }
.drawer.drawer-right {
border-left: 1px solid #dee2e6;
right: calc(-285px + -10px); }
.drawer.drawer-right.show {
right: 0; }
.drawer.drawer-right .drawertoggle {
margin-left: auto;
margin-right: 5px; }
.drawer.drawer-left {
border-right: 1px solid #dee2e6;
left: calc(-285px + -10px); }
.drawer.drawer-left.show {
left: 0; }
.drawer.drawer-left .drawertoggle {
margin-right: auto;
margin-left: 5px; }
.drawer.drawer-bottom {
bottom: -110%; }
.drawer.drawer-bottom.show {
@@ -14771,11 +14775,17 @@ body.drawer-ease {
.drawer-sm {
display: none; }
.drawerheader {
padding: 0;
height: 50px;
display: flex;
align-items: center; }
@media (max-width: 991.98px) {
.drawer-md {
display: block;
transition: left 0.2s ease, right 0.2s ease, top 0.2s ease, bottom 0.2s ease;
background-color: #fff;
background-color: #f8f9fa;
z-index: 1050;
position: fixed;
height: 100vh;
@@ -14784,15 +14794,19 @@ body.drawer-ease {
width: 285px;
max-width: 285px; }
.drawer-md.drawer-right {
border-left: 1px solid #dee2e6;
right: calc(-285px + -10px); }
.drawer-md.drawer-right.show {
right: 0; }
.drawer-md.drawer-right .drawertoggle {
margin-left: auto;
margin-right: 5px; }
.drawer-md.drawer-left {
border-right: 1px solid #dee2e6;
left: calc(-285px + -10px); }
.drawer-md.drawer-left.show {
left: 0; }
.drawer-md.drawer-left .drawertoggle {
margin-right: auto;
margin-left: 5px; }
.drawer-md.drawer-bottom {
bottom: -110%; }
.drawer-md.drawer-bottom.show {
@@ -14802,7 +14816,7 @@ body.drawer-ease {
.drawer-sm {
display: block;
transition: left 0.2s ease, right 0.2s ease, top 0.2s ease, bottom 0.2s ease;
background-color: #fff;
background-color: #f8f9fa;
z-index: 1050;
position: fixed;
height: 100vh;
@@ -14811,29 +14825,24 @@ body.drawer-ease {
width: 285px;
max-width: 285px; }
.drawer-sm.drawer-right {
border-left: 1px solid #dee2e6;
right: calc(-285px + -10px); }
.drawer-sm.drawer-right.show {
right: 0; }
.drawer-sm.drawer-right .drawertoggle {
margin-left: auto;
margin-right: 5px; }
.drawer-sm.drawer-left {
border-right: 1px solid #dee2e6;
left: calc(-285px + -10px); }
.drawer-sm.drawer-left.show {
left: 0; }
.drawer-sm.drawer-left .drawertoggle {
margin-right: auto;
margin-left: 5px; }
.drawer-sm.drawer-bottom {
bottom: -110%; }
.drawer-sm.drawer-bottom.show {
bottom: 0; } }
.drawerheader {
padding: 0 0.75rem;
height: 50px;
display: flex;
align-items: center;
border-bottom: 1px solid #dee2e6; }
.drawerheader .drawertoggle {
margin-left: auto; }
.drawercontent {
position: relative;
height: calc(100% - 50px);
@@ -14841,10 +14850,22 @@ body.drawer-ease {
flex-direction: column;
flex-wrap: nowrap;
overflow-y: auto;
padding: 0.5rem; }
padding: 0.4rem;
scrollbar-width: thin;
scrollbar-color: #6a737b #f8f9fa; }
.drawercontent .dropdown-menu .dropdown-item {
width: 220px;
white-space: normal; }
.drawercontent::-webkit-scrollbar {
width: 12px; }
.drawercontent::-webkit-scrollbar-track {
background: #f8f9fa; }
.drawercontent::-webkit-scrollbar-thumb {
background-color: #6a737b;
border-radius: 20px;
border: 3px solid #f8f9fa; }
.drawercontent::-webkit-scrollbar-thumb:hover {
background-color: #495057; }
#page-my-index {
background-color: #f7f7f7; }
@@ -19973,50 +19994,51 @@ span[data-flexitour="container"][x-placement="right"], span[data-flexitour="cont
.pagelayout-course #page.drawers .main-inner {
max-width: 800px; } }
.drawer-left-toggle {
.drawer-toggles .drawer-toggler {
position: fixed;
top: calc(50px + 0.5rem);
left: 0;
top: calc(50px + 0.7rem);
z-index: 2; }
.drawer-left-toggle .btn {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
padding: 0.375rem;
width: 2.5rem;
color: #fff;
background-color: #0f6cbf; }
.drawer-left-toggle .btn .icon {
.drawer-toggles .drawer-toggler .btn {
border-radius: 200px;
padding: 16px;
background-color: #dee2e6;
transition: padding 200ms; }
.drawer-toggles .drawer-toggler .btn .icon {
width: auto;
height: auto; }
.drawer-toggles .drawer-left-toggle {
left: 0; }
.drawer-toggles .drawer-left-toggle .btn {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
padding-right: 14px;
padding-left: 10px; }
.drawer-toggles .drawer-left-toggle .btn:hover {
padding-left: 20px; }
.drawer-toggles .drawer-right-toggle {
right: 0; }
.drawer-toggles .drawer-right-toggle .btn {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
padding-right: 10px;
padding-left: 14px; }
.drawer-toggles .drawer-right-toggle .btn:hover {
padding-right: 20px; }
#page.drawers.show-drawer-left .drawer-left-toggle {
display: none; }
.drawer-right-toggle {
position: fixed;
top: calc(50px + 0.5rem);
right: 0;
z-index: 2; }
.drawer-right-toggle .btn {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
padding: 0.375rem;
width: 2.5rem;
color: #fff;
background-color: #0f6cbf; }
.drawer-right-toggle .btn .icon {
width: auto;
height: auto; }
#page.drawers.show-drawer-right .drawer-right-toggle {
display: none; }
@media (max-width: 767.98px) {
.drawer-toggles {
z-index: 100; }
.drawer-right-toggle,
.drawer-left-toggle {
top: calc(100vh / 2 - 1rem); }
.drawer-toggles .drawer-right-toggle,
.drawer-toggles .drawer-left-toggle {
top: calc(99vh - (50px * 2)); }
#page.drawers.scroll-down .drawer-right-toggle {
transform: translateX(150%);
pointer-events: auto;
@@ -20843,55 +20865,72 @@ div.editor_atto_toolbar button .icon {
font-size: 1.5em;
font-weight: bold; } }
.courseindex .courseindex-heading {
padding: 0.5rem 1rem; }
.courseindex .courseindex-item {
padding: 0.5rem 1rem;
padding: 0.5rem 0.5rem;
border: 1px solid transparent;
border-radius: 0.25rem; }
.courseindex .courseindex-item.courseindex-section-title a {
font-weight: bold; }
.courseindex .courseindex-item .icons-collapse-expand {
padding-right: 4px; }
.courseindex .courseindex-item .courseindex-link {
color: #495057; }
.courseindex .courseindex-item .courseindex-link:hover, .courseindex .courseindex-item .courseindex-link:focus {
color: #495057;
color: black;
text-decoration: none; }
.courseindex .courseindex-item .courseindex-name {
font-style: italic; }
.courseindex .courseindex-item:hover, .courseindex .courseindex-item:focus {
background-color: #e0f0f2;
border-color: #b8dce2; }
color: black; }
.courseindex .courseindex-item:hover .courseindex-link, .courseindex .courseindex-item:focus .courseindex-link {
color: black;
cursor: pointer; }
.courseindex .courseindex-item:hover.dimmed, .courseindex .courseindex-item:focus.dimmed {
color: black; }
.courseindex .courseindex-item:hover.dimmed .courseindex-link, .courseindex .courseindex-item:focus.dimmed .courseindex-link {
color: black; }
.courseindex .courseindex-item:hover.draggable, .courseindex .courseindex-item:focus.draggable {
cursor: pointer; }
.courseindex .courseindex-item.dragging {
border: 1px #b8dce2;
background-color: #e0f0f2; }
.courseindex .courseindex-item.active {
background-color: #f8f9fa;
border-color: #dee2e6; }
.courseindex .courseindex-item.active:hover, .courseindex .courseindex-item.active:focus {
background-color: #e0f0f2;
border-color: #b8dce2; }
.courseindex .courseindex-item.dimmed {
opacity: .7;
font-style: italic; }
color: #6a737b; }
.courseindex .courseindex-item.dimmed .courseindex-link {
color: #6a737b; }
.courseindex .courseindex-item .courseindex-locked {
display: none; }
.courseindex .courseindex-item.rectrictions .courseindex-locked {
display: block; }
.courseindex .courseindex-item .completioninfo {
min-width: 24px;
transform: scale(0.5); }
transform: scale(0.7); }
.courseindex .courseindex-item .completioninfo.completion_complete {
color: #357a32; }
.courseindex .courseindex-item .completioninfo.completion_fail {
color: #ca3120; }
.courseindex .courseindex-sectioncontent .courseindex-item {
padding-left: 1rem; }
.courseindex .courseindex-section {
border-left: solid 3px transparent; }
.courseindex .courseindex-section.dragging {
border: 1px #b8dce2;
background-color: #e0f0f2; }
.courseindex .courseindex-section .current-badge {
line-height: 1.5;
display: none; }
.courseindex .courseindex-section.current {
border-left: solid 3px #0f6cbf; }
.courseindex .courseindex-section.current .current-badge {
display: inline-block; }
.courseindex .courseindex-section.dropready .courseindex-item-content {
/* Extra dropzone space */
padding-bottom: 1em; }
.courseindex .courseindex-section .courseindex-sectioncontent .courseindex-item {
padding-left: 0.5rem; }
.courseindex .courseindex-section .current-badge {
line-height: 1.5;
display: none; }
.courseindex .courseindex-section.current {
border-left: solid 3px #0f6cbf; }
.courseindex .courseindex-section.current .current-badge {
display: inline-block; }
.courseindex .courseindex-section.dropready .courseindex-item-content {
/* Extra dropzone space */
padding-bottom: 1em; }
.courseindex .icon {
font-size: 12px; }
.courseindex .d-flex-noedit {
display: none; }