Skip to content

Commit

Permalink
MDL-43598 dialogue: fixed bug with render procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed Jan 12, 2014
1 parent a67233e commit d9bf4be
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 8 deletions.
Expand Up @@ -46,7 +46,8 @@ Y.extend(CHOOSERDIALOGUE, Y.Base, {
zindex : 100, // Display in front of other items
modal: true, // This dialogue should be modal.
shim : true,
closeButtonTitle : this.get('closeButtonTitle')
closeButtonTitle : this.get('closeButtonTitle'),
render : false
};

// Override with additional options
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -46,7 +46,8 @@ Y.extend(CHOOSERDIALOGUE, Y.Base, {
zindex : 100, // Display in front of other items
modal: true, // This dialogue should be modal.
shim : true,
closeButtonTitle : this.get('closeButtonTitle')
closeButtonTitle : this.get('closeButtonTitle'),
render : false
};

// Override with additional options
Expand Down
Expand Up @@ -108,7 +108,9 @@ Y.extend(DIALOGUE, Y.Panel, {
initializer : function(config) {
var bb;

this.render();
if (this.get('render')) {
this.render();
}
this.makeResponsive();
this.after('visibleChange', this.visibilityChanged, this);
if (config.center) {
Expand Down Expand Up @@ -526,6 +528,22 @@ Y.Base.modifyAttrs(DIALOGUE, {
}
return false;
}
},

/**
* Boolean determining whether to render the widget during initialisation.
*
* We override this to change the default from false to true for the dialogue.
* We then proceed to early render the dialogue during our initialisation rather than waiting
* for YUI to render it after that.
*
* @attribute render
* @type Boolean
* @default true
*/
render : {
value : true,
writeOnce : true
}
});

Expand Down

0 comments on commit d9bf4be

Please sign in to comment.