buttons.html revision 5310dffba6d64e06c77a0e519710ba80d16f1fa6
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>WidgetButtons Manual Test</title>
</head>
<body>
<script>
YUI({filter: 'raw'}).use('base-build', 'widget', 'widget-buttons', function (Y) {
var testWidget = new Y.TestWidget({
headerContent: 'Test Widget',
buttons : [
{
label : 'Destroy',
isDefault: true,
action : function () {
this.destroy();
}
},
{label: 'Foo'},
{
name : 'close',
section : 'footer',
classNames: ['foo']
}
],
visible: false
});
testWidget.render('body');
testWidget.getButton('close').set('disabled', true);
testWidget.getButton(1, 'footer').setStyle('color', 'purple');
testWidget.set('visible', true);
setTimeout(function () {
label : 'I\'m Default!',
isDefault: true
});
}, 1000);
});
</script>
</body>
</html>