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
1
#include <Wt/WApplication>
1 2
#include <Wt/WBreak>
2 3
#include <Wt/WContainerWidget>
3 4
#include <Wt/WDialog>
5
#include <Wt/WEnvironment>
4 6
#include <Wt/WLabel>
5 7
#include <Wt/WLineEdit>
6 8
#include <Wt/WPushButton>
......
25 27

  
26 28
    Wt::WPushButton *ok = new Wt::WPushButton("OK", dialog->footer());
27 29
    ok->setDefault(true);
28
    ok->disable();
30

  
31
    if (Wt::WApplication::instance()->environment().ajax())
32
        ok->disable();
29 33

  
30 34
    Wt::WPushButton *cancel = new Wt::WPushButton("Cancel", dialog->footer());
31 35
    dialog->rejectWhenEscapePressed();
32
- 
    (1-1/1)