Skip to content

Instantly share code, notes, and snippets.

@eduardolundgren
Last active December 15, 2015 12:28
Show Gist options
  • Save eduardolundgren/5259920 to your computer and use it in GitHub Desktop.
Save eduardolundgren/5259920 to your computer and use it in GitHub Desktop.
var StdMod = A.WidgetStdMod,
getClassName = A.getClassName;
A.Modal = A.Base.create('modal', A.Widget, [
A.WidgetPosition,
A.WidgetStdMod,
A.WidgetAutohide,
A.WidgetButtons,
A.WidgetModality,
A.WidgetPositionAlign,
A.WidgetPositionConstrain,
A.WidgetStack
], {
BUTTONS: {
close: {
label : 'Close',
action : 'hide',
section: 'header',
template : '<button type="button" />',
classNames: getClassName('btn', 'close')
}
}
}, {
CSS_PREFIX: getClassName('modal'),
ATTRS: {
buttons: {
value: ['close']
}
}
});
A.Modal.SECTION_CLASS_NAMES = {
header: A.Widget.getClassName('hd1'),
body: A.Widget.getClassName('bd1'),
footer: A.Widget.getClassName('ft1')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment