MDL-33292 Consume the new ability to move dialogues in chooser dialogues

This commit is contained in:
Andrew Robert Nicols 2012-05-23 09:49:31 +01:00
parent 06a78ea6a4
commit 984ec46e03
2 changed files with 4 additions and 1 deletions

View File

@ -74,7 +74,9 @@ Y.extend(DIALOGUE, Y.Overlay, {
this.centerDialogue();
}
if (this.get('draggable')) {
this.plug(Y.Plugin.Drag, {handles : ['#' + this.get('id') + ' .' + CSS.HEADER]});
var titlebar = '#' + this.get('id') + ' .' + CSS.HEADER;
this.plug(Y.Plugin.Drag, {handles : [titlebar]});
Y.one(titlebar).setStyle('cursor', 'move');
}
break;
}

View File

@ -22,6 +22,7 @@ YUI.add('moodle-core-chooserdialogue', function(Y) {
var params = {
bodyContent : bodycontent.get('innerHTML'),
headerContent : headercontent.get('innerHTML'),
draggable : true,
visible : false, // Hide by default
zindex : 100, // Display in front of other items
lightbox : true, // This dialogue should be modal