MDL-33292 Add ability to move (drag) M.core.dialogue

This commit is contained in:
Andrew Robert Nicols
2012-06-07 14:47:33 +01:00
parent 371409f41e
commit 06a78ea6a4
+8 -1
View File
@@ -73,6 +73,9 @@ Y.extend(DIALOGUE, Y.Overlay, {
if (this.get('center') && !e.prevVal && e.newVal) {
this.centerDialogue();
}
if (this.get('draggable')) {
this.plug(Y.Plugin.Drag, {handles : ['#' + this.get('id') + ' .' + CSS.HEADER]});
}
break;
}
},
@@ -110,6 +113,10 @@ Y.extend(DIALOGUE, Y.Overlay, {
center : {
validator : Y.Lang.isBoolean,
value : true
},
draggable : {
validator : Y.Lang.isBoolean,
value : false
}
}
});
@@ -372,4 +379,4 @@ M.core.confirm = CONFIRM;
M.core.exception = EXCEPTION;
M.core.ajaxException = AJAXEXCEPTION;
}, '@VERSION@', {requires:['base','node','overlay','event-key', 'moodle-enrol-notification-skin']});
}, '@VERSION@', {requires:['base','node','overlay','event-key', 'moodle-enrol-notification-skin', 'dd-plugin']});