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
This is necessarily primarily for a specific case: option elements in IE,
which cannot be styled. >:O
This implementation is not complete: we want to re-attach the field at the
same position it was at before it was detached. This might not be
trivial---imagine if its sibling was also detached.
* src/ui/styler/NaFieldStyler.js (isSubField): Receive field instead of
element (to check parent)
(applyStyle, revokeStyle): Detach and re-attach field from/to DOM
respectively
* test/ui/styler/NaFieldStylerTest.js: Associated tests
* src/ui/field/DomField.js (getParentElement):
Renamed from getParent. Cache parent element in memory so that we have a
reference for re-attaching fields to the DOM.
(getParent): Public API addition; call getParentElement
* src/ui/group/TabbedGroupUi.js (doShowField, doHideField):
Return from method after setting deferred operation. This previously
did not fail because jQuery didn't care if operations are not
performed on field matches.
* src/ui/field/DomField.js (getContainingRow): Return self if DT or DD
Certain types of elements (e.g. statics) are compiled such that the direct
reference is the row itself.