void WSpinBox::updateDom(DomElement& element, bool all) { if (all || changed_) { if (nativeControl()) { element.setAttribute("min", boost::lexical_cast<std::string>(min_)); element.setAttribute("max", boost::lexical_cast<std::string>(max_)); element.setAttribute("step", boost::lexical_cast<std::string>(step_)); } else { /* Make sure the JavaScript validator is loaded */ WIntValidator v; v.javaScriptValidate(); } } WAbstractSpinBox::updateDom(element, all); }
void WSpinBox::updateDom(DomElement& element, bool all) { if (all || changed_) { if (nativeControl()) { element.setAttribute("min", boost::lexical_cast<std::string>(min_)); element.setAttribute("max", boost::lexical_cast<std::string>(max_)); element.setAttribute("step", boost::lexical_cast<std::string>(step_)); } else { /* Make sure the JavaScript validator is loaded */ WIntValidator v; v.javaScriptValidate(); doJavaScript("jQuery.data(" + jsRef() + ", 'obj')" + ".setWrapAroundEnabled(" + (wrapAroundEnabled() ? "true" : "false") + ");"); } } WAbstractSpinBox::updateDom(element, all); }