Bug #3614 ยป 0001-Improved-no-JS-behavior-of-dialog-example.patch
examples/widgetgallery/examples/Dialog.cpp | ||
---|---|---|
#include <Wt/WApplication>
|
||
#include <Wt/WBreak>
|
||
#include <Wt/WContainerWidget>
|
||
#include <Wt/WDialog>
|
||
#include <Wt/WEnvironment>
|
||
#include <Wt/WLabel>
|
||
#include <Wt/WLineEdit>
|
||
#include <Wt/WPushButton>
|
||
... | ... | |
Wt::WPushButton *ok = new Wt::WPushButton("OK", dialog->footer());
|
||
ok->setDefault(true);
|
||
ok->disable();
|
||
if (Wt::WApplication::instance()->environment().ajax())
|
||
ok->disable();
|
||
Wt::WPushButton *cancel = new Wt::WPushButton("Cancel", dialog->footer());
|
||
dialog->rejectWhenEscapePressed();
|