MDL-33292 Add ability to move (drag) M.core.dialogue
This commit is contained in:
+8
-1
@@ -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']});
|
||||
|
||||
Reference in New Issue
Block a user