Project

General

Profile

Bug #3614 ยป 0001-Improved-no-JS-behavior-of-dialog-example.patch

Bruce Toll, 10/01/2014 05:30 PM

View differences:

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();
    (1-1/1)