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.
* src/ui/ElementStyler.js: Added
* src/sort/MultiSort.js: Removed ElementStyler liberation todo
* src/ui/field/DomFieldFactory.js: Same
* src/ui/step/GeneralStepUi.js: Same
* src/ui/step/StepUiBuilder.js: Same
This existed when the framework was very long, and has managed to survive
numerous refactoring attempts; it used to be a small class abstracting
element styling, and it has had crap thrown into it ever since, partially
due to time constraints. It needs to go away.
* src/ui/GroupUi.js (getFieldElements): New method
(showField, hideField): Use GroupUi#getFieldElements
* src/ui/group/TabbedGroupUi (showField, hideField):
Use GroupUi#getFieldElements
It is expected that support for promises will be available in whatever
environment liza is run. Here, we're adding a shim for the sake of testing
in ancient environments.
It's almost as if I'm stuck using an ancient environment somewhere...*cough*
These are largely unchanged---any changes from the originals, aside from
maybe some whitespace fixes, are in separate commits after their
introduction into liza.
If I hold all the code to the standards that I wished to hold it to before
release, then they'll never be released. So here we are.
Much more to come.
The `AccordionGroupUi` was not liberated, because it is my intent to
eliminate it---I did not agree with its needless addition to begin with. If
we do end up keeping it, then it will be liberated as well.
This allows us to begin development (and testing) of StepUi subtypes without
having to worry about the convoluted crap that GeneralStepUi is doing.
Specifically, all the jQuery stuff needs to go.
This is crazy, but LoVullo Associates still supports browsers as far back as
IE7, meaning that we need to maintain ES3 support; that will hopefully
change soon.