Skip to content
This repository

Markup fixes and jQuery lib upgrades #16

Closed
wants to merge 14 commits into from

6 participants

Fabian Neumann Chris McDonough Marcin Lulek John Anderson Mathieu Le Marec - Pasquet Carlos de la Guardia
Fabian Neumann
hellp commented

Several fixes to make deform's templates validate as correct HTML (e.g. removed non-LI elements from ULs; removed custom attributes; fixed nesting of structural widgets where LIs where omitted). To make some of this work I had to upgrade to jQuery 1.5 and thus upgraded depending libs, too.

hellp added some commits
Fabian Neumann hellp Move INPUTs out of UL. Only LIs allowed here. e4be502
Fabian Neumann hellp Fix: trailing commas break IE7 (and even IE8?). 374d6f5
Fabian Neumann hellp LEGEND must be the first child of FIELDSET (at least in HTML5). b31bacc
Fabian Neumann hellp Don't use omit-tag on LI elements; rather use a .hidden class.
If you assume to be in a list you must not simply remove the tag as
that results in invalid HTML, e.g. UL > INPUT.
c4447ce
Fabian Neumann hellp Make SequenceWidget 'structural' and give it a FIELDSET.
This make SequenceWidget and MappingWidget behave more consistent.
And: it's already stated in the docstring of Widget: "the default
mapping and sequence widgets are in this category ['structural']".
And: "Renders a sequence into a set of fields."

Plus: we get rid of the invalid LABEL element pointing to the widget's
DIV -- which is not valid HTML.
ffc543e
Fabian Neumann hellp Refactor to valid HTML and upgrade to latest jQuery + libs.
Instead of using custom (non-valid) attributes (e.g. prototype) and
a (non-valid) SPAN inside a sequence's UL to hold min/max variables,
we use HTML5 data-* attributes now.

For easy access to them (and for the hotness' sake) upgrade to
jQuery 1.5.2 and a more recent jQuery UI.
d26e2dc
Fabian Neumann hellp Cosmetics. 9dd2d99
Fabian Neumann hellp Upgrade to latest jquery.form that supports jQuery 1.5 and fix IFRAME…
… behavior.

See source comment for details.
9ac60a2
Fabian Neumann hellp Fix missing "." in selector. 19fc836
Fabian Neumann hellp Fix tests. Adapt selenium locators to new sequence markup. b0c845c
Fabian Neumann hellp Pull another INPUT out of an UL. a6afb95
Fabian Neumann hellp Refactor error markup.
Use separate DIV for the global form error message instead of just
another LI.

Use less classes.
31c7338
Fabian Neumann hellp Fix markup of readonly sequences. 7201f85
Fabian Neumann hellp Fix markup of readonly mappings. d2967c0
Chris McDonough
Owner
mcdonc commented

This set of patches appears to cause one test failure in the deformdemo tests:

======================================================================
FAIL: test_submit_success (__main__.RedirectingAjaxFormTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "deformdemo/test.py", line 2369, in test_submit_success
    self.failUnless(location.endswith('thanks.html'))
AssertionError
----------------------------------------------------------------------

Possibly due to JQuery differences? I didn't investigate. Hoping you can advise.

Marcin Lulek
ergo commented

mark for myself to review

John Anderson
sontek commented

@ergo did you ever get a chance to review this? Is it still relevant?

Mathieu Le Marec - Pasquet
Collaborator
kiorky commented

Yep we need this there if it can be...
Can some take on this ? I cannot at the moment ... @mcdonc ? @sontek ?

John Anderson
sontek commented

@kiorky It doesn't merge cleanly, so I couldn't test it but its upgrading to older versions of jquery anyways so not sure if its worth it at this point even though it would have been great

Mathieu Le Marec - Pasquet
Collaborator

Does anyone could help on this ? @hellp ?

Chris McDonough
Owner

Bleh, it's my fault that this never got applied. I didn't try hard enough to evaluate it when it was submitted. The templates have changed so much in the meantime that it's probably hopeless to try to apply the patches. It might be worthwhile for us to go through the diff by-eye to see if there's anything we can salvage from it.

Carlos de la Guardia
Collaborator

We're moving to bootstrap templates and most of these issues will be fixed by the move. There are a couple that we might need to revisit, but that would be better after we merge bootstrap.

Carlos de la Guardia cguardia closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 14 unique commits by 1 author.

Apr 07, 2011
Fabian Neumann hellp Move INPUTs out of UL. Only LIs allowed here. e4be502
Fabian Neumann hellp Fix: trailing commas break IE7 (and even IE8?). 374d6f5
Fabian Neumann hellp LEGEND must be the first child of FIELDSET (at least in HTML5). b31bacc
Fabian Neumann hellp Don't use omit-tag on LI elements; rather use a .hidden class.
If you assume to be in a list you must not simply remove the tag as
that results in invalid HTML, e.g. UL > INPUT.
c4447ce
Fabian Neumann hellp Make SequenceWidget 'structural' and give it a FIELDSET.
This make SequenceWidget and MappingWidget behave more consistent.
And: it's already stated in the docstring of Widget: "the default
mapping and sequence widgets are in this category ['structural']".
And: "Renders a sequence into a set of fields."

Plus: we get rid of the invalid LABEL element pointing to the widget's
DIV -- which is not valid HTML.
ffc543e
Fabian Neumann hellp Refactor to valid HTML and upgrade to latest jQuery + libs.
Instead of using custom (non-valid) attributes (e.g. prototype) and
a (non-valid) SPAN inside a sequence's UL to hold min/max variables,
we use HTML5 data-* attributes now.

For easy access to them (and for the hotness' sake) upgrade to
jQuery 1.5.2 and a more recent jQuery UI.
d26e2dc
Fabian Neumann hellp Cosmetics. 9dd2d99
Fabian Neumann hellp Upgrade to latest jquery.form that supports jQuery 1.5 and fix IFRAME…
… behavior.

See source comment for details.
9ac60a2
Apr 11, 2011
Fabian Neumann hellp Fix missing "." in selector. 19fc836
Fabian Neumann hellp Fix tests. Adapt selenium locators to new sequence markup. b0c845c
Fabian Neumann hellp Pull another INPUT out of an UL. a6afb95
Fabian Neumann hellp Refactor error markup.
Use separate DIV for the global form error message instead of just
another LI.

Use less classes.
31c7338
May 11, 2011
Fabian Neumann hellp Fix markup of readonly sequences. 7201f85
Fabian Neumann hellp Fix markup of readonly mappings. d2967c0
Something went wrong with that request. Please try again.