* src/validate/ValidStateMonitor.js (mergeFailures):
Another error on a field that previously failed will no longer overwrite the
previous failure, which caused issue when the causes changed (leaving fields
potentially unfixed).
* test/validate/ValidStateMonitorTest.js: Respective tests added.
* src/validate/Failure.js (__construct): Takes an array of causes.
(getCauses): Now returns an array of causes.
* src/validate/ValidStateMonitor.js: Recognize fixes on array of causes.
* test/validate/FailureTest.js: Updated
* test/validate/ValidStateMonitorTest.js: Updated
This maintains BC with the old string-based system.
* src/validate/ValidStateMonitor.js (_getCause): Added.
(detectFixes): Consider failure cause if available when checking for fixes.
This is to facilitate a transition to Failure without a BC break.
* test/validate/ValidStateMonitorTest.js: Ensure that replacing messages
with Failure will continue to operate as expected.
This solves the problem of trying to show/hide indexes that do not even
exist on the DOM.
There are no tests for this due to the complexity of the parent; refactoring
is needed. :(
* src/ui/group/FlatGroupUi: Added
As it turns out, the main index.js was missing, and you couldn't build from
the distribution because of a missing tools/!
* Makefile.am: index.js no longer missing from distribution.
tools/ no longer missing from distribution.
This will allow it to know when a request needs to be re-made at a later
time.
* src/dapi/DataApiManager (fieldStale, isFieldStale): Added
(fieldNotReady): Check stale status of field
It might be the case that we may want to post raw data in the future; in
fact, I can guarantee it. We'll cross that bridge when we come to it.
* src/dapi/http/XhrHttpImpl.js (openRequest): Set ContentType header
on POST
* test/dapi/http/XhrHttpImplTest.js: Modified accordingly
This supercedes ClientFieldValidator; callers should handle validations and
notify this new class.
* src/validate/BucketDataValidator.js: Added
* src/validate/ValidStateMonitor.js: New
* test/validate/ValidStateMonitorTest.js: New
The intent is to ultimately replace ClientFieldValidator with this and
individual validators that interact with it.
* src/validate/ValidStateMonitor.js: Added
* test/validate/ValidStateMonitorTest.js: Added
This allows #validate to be used generically for any type of validation, not
just change events.
* src/validate/ClientFieldValidator.js (validate):
Accept and propagate all bucket data to `validate` event listeners.
* src/validate/ClientFieldValidator.js (monitor): Remove
This just concerns itself with something that it should be concerned about;
let the caller handle monitoring, now that we have a #validate method.
* src/validate/ClientFieldValidator (validate): Added
Extracted logic that previously was exclusive to #monitor; that method will
now simply invoke #validate.
* src/ui/field/DomField.js (queryElement): {Error=>DomFieldNotFoundError}
when a DOM element cannot be located for the field.
* src/ui/field/DomFieldNotFoundError.js: Added
element.style is not supported as an lvalue in IE<9.
All the rest of the sane world that doesn't support IE<9 should be laughing
at me in pity right now.
* src/ui/styler/NaFieldStyler.js (hideField):
Use HTMLElement#setAttribute instead of HTMLElement#style as an lvalue
* test/ui/styler/NaFieldStylerTest.js: Modify test cases to check for
invocation of setAttribute
* src/ui/styler/NaFieldStylerAnimation (showField):
The 'display:none' style was retained in certain circumstances after
animation in IE; this fixes that.
Yes, this is a mess; I'm pretty much out of time now.
* src/ui/group/GroupUi.js (doShowField, doHideField):
Use field styler
* src/ui/group/TabbedGroupUi (doShowField, doHideField):
Defer to supertype
I didn't really want to add this back in, but others in the group
thought that change might be bad for users. This animation thing is
just so sloppy, I think.
* src/ui/styler/NaFieldStylerAnimation.js: Added
This solves styling and DOM mutation issues. For now.
* src/ui/field/DomField.js (queryElement, updateElement): Added
(_getElement): Extracted into queryElement and updated to re-query DOM each
time, returning last match if not found.
(applyStyle, revokeStyle): Defers style applied predicate to style itself
Field stylers now determine whether they've been applied to the target field
on their own, which solves the problem of the system getting out of sync.
* src/ui/styler/ErrorFieldStyler.js (isApplied): Added
* src/ui/styler/FieldStyler.js (isApplied): Added
* src/ui/styler/NaFieldStyler.js (isApplied): Added
* test/ui/styler/NaFieldStylerTest.js: Test for #isApplied