Merge branch 'MDL-43979-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
Sam Hemelryk 2014-02-17 08:27:48 +13:00
commit 80ce7e1a8d
4 changed files with 55 additions and 22 deletions

View File

@ -105,7 +105,7 @@ Y.extend(DIALOGUE, Y.Panel, {
* @method initializer
* @return void
*/
initializer : function(config) {
initializer : function() {
var bb;
if (this.get('render')) {
@ -113,7 +113,7 @@ Y.extend(DIALOGUE, Y.Panel, {
}
this.makeResponsive();
this.after('visibleChange', this.visibilityChanged, this);
if (config.center) {
if (this.get('center')) {
this.centerDialogue();
}
this.set('COUNT', COUNT);
@ -126,10 +126,10 @@ Y.extend(DIALOGUE, Y.Panel, {
// and allow setting of z-index in theme.
bb = this.get('boundingBox');
if (config.extraClasses) {
Y.Array.each(config.extraClasses, bb.addClass, bb);
}
if (config.visible) {
// Add any additional classes that were specified.
Y.Array.each(this.get('extraClasses'), bb.addClass, bb);
if (this.get('visible')) {
this.applyZIndex();
}
// Recalculate the zIndex every time the modal is altered.
@ -138,7 +138,7 @@ Y.extend(DIALOGUE, Y.Panel, {
// either by centerDialogue or makeResonsive. This is because the show() will trigger
// a focus on the dialogue, which will scroll the page. If the dialogue has not
// been positioned it will scroll back to the top of the page.
if (config.visible) {
if (this.get('visible')) {
this.show();
this.keyDelegation();
}
@ -567,6 +567,17 @@ Y.Base.modifyAttrs(DIALOGUE, {
render : {
value : true,
writeOnce : true
},
/**
* Any additional classes to add to the boundingBox.
*
* @attributes extraClasses
* @type Array
* @default []
*/
extraClasses: {
value: []
}
});

File diff suppressed because one or more lines are too long

View File

@ -105,7 +105,7 @@ Y.extend(DIALOGUE, Y.Panel, {
* @method initializer
* @return void
*/
initializer : function(config) {
initializer : function() {
var bb;
if (this.get('render')) {
@ -113,7 +113,7 @@ Y.extend(DIALOGUE, Y.Panel, {
}
this.makeResponsive();
this.after('visibleChange', this.visibilityChanged, this);
if (config.center) {
if (this.get('center')) {
this.centerDialogue();
}
this.set('COUNT', COUNT);
@ -126,10 +126,10 @@ Y.extend(DIALOGUE, Y.Panel, {
// and allow setting of z-index in theme.
bb = this.get('boundingBox');
if (config.extraClasses) {
Y.Array.each(config.extraClasses, bb.addClass, bb);
}
if (config.visible) {
// Add any additional classes that were specified.
Y.Array.each(this.get('extraClasses'), bb.addClass, bb);
if (this.get('visible')) {
this.applyZIndex();
}
// Recalculate the zIndex every time the modal is altered.
@ -138,7 +138,7 @@ Y.extend(DIALOGUE, Y.Panel, {
// either by centerDialogue or makeResonsive. This is because the show() will trigger
// a focus on the dialogue, which will scroll the page. If the dialogue has not
// been positioned it will scroll back to the top of the page.
if (config.visible) {
if (this.get('visible')) {
this.show();
this.keyDelegation();
}
@ -565,6 +565,17 @@ Y.Base.modifyAttrs(DIALOGUE, {
render : {
value : true,
writeOnce : true
},
/**
* Any additional classes to add to the boundingBox.
*
* @attributes extraClasses
* @type Array
* @default []
*/
extraClasses: {
value: []
}
});

View File

@ -74,7 +74,7 @@ Y.extend(DIALOGUE, Y.Panel, {
* @method initializer
* @return void
*/
initializer : function(config) {
initializer : function() {
var bb;
if (this.get('render')) {
@ -82,7 +82,7 @@ Y.extend(DIALOGUE, Y.Panel, {
}
this.makeResponsive();
this.after('visibleChange', this.visibilityChanged, this);
if (config.center) {
if (this.get('center')) {
this.centerDialogue();
}
this.set('COUNT', COUNT);
@ -95,10 +95,10 @@ Y.extend(DIALOGUE, Y.Panel, {
// and allow setting of z-index in theme.
bb = this.get('boundingBox');
if (config.extraClasses) {
Y.Array.each(config.extraClasses, bb.addClass, bb);
}
if (config.visible) {
// Add any additional classes that were specified.
Y.Array.each(this.get('extraClasses'), bb.addClass, bb);
if (this.get('visible')) {
this.applyZIndex();
}
// Recalculate the zIndex every time the modal is altered.
@ -107,7 +107,7 @@ Y.extend(DIALOGUE, Y.Panel, {
// either by centerDialogue or makeResonsive. This is because the show() will trigger
// a focus on the dialogue, which will scroll the page. If the dialogue has not
// been positioned it will scroll back to the top of the page.
if (config.visible) {
if (this.get('visible')) {
this.show();
this.keyDelegation();
}
@ -536,6 +536,17 @@ Y.Base.modifyAttrs(DIALOGUE, {
render : {
value : true,
writeOnce : true
},
/**
* Any additional classes to add to the boundingBox.
*
* @attributes extraClasses
* @type Array
* @default []
*/
extraClasses: {
value: []
}
});