~mhier/libwt-latest/libwt-package

« back to all changes in this revision

Viewing changes to src/Wt/WFormWidget.C

  • Committer: Martin Hierholzer
  • Date: 2020-06-18 12:21:07 UTC
  • Revision ID: martin.hierholzer@desy.de-20200618122107-jxk2kefgptu2hh3v
update to upstream version 4.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
 
2
 * Copyright (C) 2008 Emweb bv, Herent, Belgium.
3
3
 *
4
4
 * See the LICENSE file for terms of use.
5
5
 */
106
106
 
107
107
          std::string jsFunction =
108
108
            "function(obj, event) {"
109
 
            """jQuery.data(" + jsRef() + ", 'obj').applyEmptyText();"
 
109
            """" + jsRef() + ".wtObj.applyEmptyText();"
110
110
            "}";
111
111
          removeEmptyText_->setJavaScript(jsFunction);
112
112
        }
160
160
  WApplication *app = WApplication::instance();
161
161
  const WEnvironment &env = app->environment();
162
162
  if (env.agentIsIElt(10) && isRendered())
163
 
    doJavaScript("jQuery.data(" + jsRef() + ", 'obj')"
 
163
    doJavaScript(jsRef() + ".wtObj"
164
164
                 ".setEmptyText(" + emptyText_.jsStringLiteral() + ");");
165
165
}
166
166
 
169
169
  WApplication *app = WApplication::instance();
170
170
  const WEnvironment &env = app->environment();
171
171
  if (env.agentIsIElt(10) && isRendered() && !emptyText_.empty())
172
 
    doJavaScript("jQuery.data(" + jsRef() + ", 'obj').applyEmptyText();");
 
172
    doJavaScript(jsRef() + ".wtObj.applyEmptyText();");
173
173
}
174
174
 
175
175
void WFormWidget::refresh()