Files
moodle/admin/tool/lp/amd/build/dialogue.min.js
Damyon Wiese dbab904c20 MDL-52910 cbe: Fix competency picker dialogue scrolling issues.
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.
2016-04-18 10:58:51 +08:00

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});