MDL-43259 JavaScript: Deprecate M.core.dialogue's lightbox attribute
The lightbox attribute just sets the modal attribute of the upstream dialogue and provides no real benefit. We should deprecate it in favour of documented upstream attributes of Y.Panel.
This commit is contained in:
+8
-9
@@ -79,12 +79,6 @@ DIALOGUE = function(config) {
|
||||
delete config.width;
|
||||
}
|
||||
|
||||
// lightbox param to keep the stable versions API.
|
||||
if (config.lightbox !== false) {
|
||||
config.modal = true;
|
||||
}
|
||||
delete config.lightbox;
|
||||
|
||||
// closeButton param to keep the stable versions API.
|
||||
if (config.closeButton === false) {
|
||||
config.buttons = null;
|
||||
@@ -387,10 +381,15 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
* @attribute lightbox
|
||||
* @type Boolean
|
||||
* @default true
|
||||
* @deprecated Since Moodle 2.7. Please use modal instead.
|
||||
*/
|
||||
lightbox : {
|
||||
validator : Y.Lang.isBoolean,
|
||||
value : true
|
||||
lightbox: {
|
||||
lazyAdd: false,
|
||||
setter: function(value) {
|
||||
Y.log("The lightbox attribute of M.core.dialogue has been deprecated since Moodle 2.7, please use the modal attribute instead",
|
||||
'warn', 'moodle-core-notification-dialogue');
|
||||
this.set('modal', value);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+6
-9
@@ -79,12 +79,6 @@ DIALOGUE = function(config) {
|
||||
delete config.width;
|
||||
}
|
||||
|
||||
// lightbox param to keep the stable versions API.
|
||||
if (config.lightbox !== false) {
|
||||
config.modal = true;
|
||||
}
|
||||
delete config.lightbox;
|
||||
|
||||
// closeButton param to keep the stable versions API.
|
||||
if (config.closeButton === false) {
|
||||
config.buttons = null;
|
||||
@@ -387,10 +381,13 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
* @attribute lightbox
|
||||
* @type Boolean
|
||||
* @default true
|
||||
* @deprecated Since Moodle 2.7. Please use modal instead.
|
||||
*/
|
||||
lightbox : {
|
||||
validator : Y.Lang.isBoolean,
|
||||
value : true
|
||||
lightbox: {
|
||||
lazyAdd: false,
|
||||
setter: function(value) {
|
||||
this.set('modal', value);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
+8
-9
@@ -48,12 +48,6 @@ DIALOGUE = function(config) {
|
||||
delete config.width;
|
||||
}
|
||||
|
||||
// lightbox param to keep the stable versions API.
|
||||
if (config.lightbox !== false) {
|
||||
config.modal = true;
|
||||
}
|
||||
delete config.lightbox;
|
||||
|
||||
// closeButton param to keep the stable versions API.
|
||||
if (config.closeButton === false) {
|
||||
config.buttons = null;
|
||||
@@ -356,10 +350,15 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
* @attribute lightbox
|
||||
* @type Boolean
|
||||
* @default true
|
||||
* @deprecated Since Moodle 2.7. Please use modal instead.
|
||||
*/
|
||||
lightbox : {
|
||||
validator : Y.Lang.isBoolean,
|
||||
value : true
|
||||
lightbox: {
|
||||
lazyAdd: false,
|
||||
setter: function(value) {
|
||||
Y.log("The lightbox attribute of M.core.dialogue has been deprecated since Moodle 2.7, please use the modal attribute instead",
|
||||
'warn', 'moodle-core-notification-dialogue');
|
||||
this.set('modal', value);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user