Fix rendering for config form JS models
Review Request #8082 — Created March 28, 2016 and submitted
The JS model for a JS view for a config form was previously rendering
incorrectly (without a trailing)
). This issue has been addressed.
Also, we now are more careful to only render a trailing comma after the
JS model data if there is in fact a page-wide config object. This object
is now only added to the models if it exists.
Tested this with Review Board. The generated JS works now.
-
Tool: PEP8 Style Checker Ignored Files: djblets/configforms/templates/configforms/config.html Tool: Pyflakes Ignored Files: djblets/configforms/templates/configforms/config.html
-
Typo in description: "preivously"
-
djblets/configforms/templates/configforms/config.html (Diff revision 2) I think you broke this line (missing a
}}
) -
djblets/configforms/templates/configforms/config.html (Diff revision 2) Do we not want this line in the
if form_model_data and js_model_class
case?
Change Summary:
Address David's issues
Description: |
|
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+13 -5) |
-
Tool: PEP8 Style Checker Ignored Files: djblets/configforms/templates/configforms/config.html Tool: Pyflakes Ignored Files: djblets/configforms/templates/configforms/config.html
-
-
djblets/configforms/templates/configforms/config.html (Diff revision 3) We have a conditional around
form.js_model_class
on line 87--how is that different fromjs_model_class
?
-
Tool: Pyflakes Ignored Files: djblets/configforms/templates/configforms/config.html Tool: PEP8 Style Checker Ignored Files: djblets/configforms/templates/configforms/config.html