mirror of
https://github.com/moodle/moodle.git
synced 2025-07-25 16:21:47 +02:00
The competency tree expands and collapses, which causes issues for the dialogue which is supposed to be centered and non-scrollable. We need to introduce a scrollable region in the dialogue and fix the height - this may be slightly annoying for tablet users but is not the worst thing in the world.
1 line
704 B
JavaScript
1 line
704 B
JavaScript
define(["core/yui"],function(a){var b=function(b,c,d,e,f){this.yuiDialogue=null;var g=this;"undefined"==typeof f&&(f=!1),a.use("moodle-core-notification","timers",function(){var h="480px";f&&(h="800px"),g.yuiDialogue=new M.core.dialogue({headerContent:b,bodyContent:c,draggable:!0,visible:!1,center:!0,modal:!0,width:h}),g.yuiDialogue.after("visibleChange",function(b){b.newVal?"undefined"!=typeof d&&a.soon(function(){d(g),g.yuiDialogue.centerDialogue()}):"undefined"!=typeof e&&a.soon(function(){e(g)})}),g.yuiDialogue.show()})};return b.prototype.close=function(){this.yuiDialogue.hide(),this.yuiDialogue.destroy()},b.prototype.getContent=function(){return this.yuiDialogue.bodyNode.getDOMNode()},b}); |