Change Summary:
Fixed some missing imports.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+1503) |
Review Request #5587 — Created March 4, 2014 and submitted
Information | |
---|---|
chipx86 | |
Djblets | |
master | |
2286c2d... | |
Reviewers | |
djblets | |
This makes it easy for a view to provide collections of configuration
pages with a sidebar used for navigation. Each page can have one or more
forms, each of which can be submitted individually.This is a generalization of the My Account page from Review Board 2.0,
and the Team Admin page from RBCommons. All the JavaScript and CSS were
directly copied from Review Board (with the addition of the two macros
the .less file needs).
Ported Review Board 2.0's My Account page to sit on top of this. Worked
without any problems.
Description | From | Last Updated |
---|---|---|
I'm not sure I like assigning to the "formView" variable in a loop like this--it seems like if something breaks, … |
|
|
These should be declared in the var statement at the top of the function. |
|
|
One line? |
|
|
This could be chained onto the assignment. |
|
|
Same here. |
|
|
And here. |
|
|
Which would let you assign this in the definition. |
|
|
Same comments here. |
|
|
You get the idea. |
|
|
Since every test function calls this, it should be moved into beforeEach |
|
|
I think the more common pattern for this is: window.Djblets = window.Djblets || {} |
|
|
Could this be _.bind(Backbone.View.prototype.remove, this) ? |
|
|
Elsewhere you replaced this entity with its unicode equivalent. Did you want to do that here? |
|
|
$parentEl is unused here. Can you run jshint on this code? |
|
|
Missing semicolon. |
|
Fixed some missing imports.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+1503) |
djblets/configforms/templates/configforms/config.html (Diff revision 2) |
---|
I'm not sure I like assigning to the "formView" variable in a loop like this--it seems like if something breaks, we could end up with state leaking from one iteration to the next.
How about just removing the variable definition and chaining
new {{form.js_view_classs}}(...).render()
?
djblets/static/djblets/js/configForms/views/listItemView.js (Diff revision 2) |
---|
These should be declared in the
var
statement at the top of the function.
djblets/static/djblets/js/configForms/views/tests/listItemViewTests.js (Diff revision 2) |
---|
This could be chained onto the assignment.
djblets/static/djblets/js/configForms/views/tests/listItemViewTests.js (Diff revision 2) |
---|
Which would let you assign this in the definition.
djblets/static/djblets/js/configForms/views/tests/listItemViewTests.js (Diff revision 2) |
---|
Same comments here.
djblets/static/djblets/js/configForms/views/tests/listItemViewTests.js (Diff revision 2) |
---|
You get the idea.
djblets/static/djblets/js/configForms/views/tests/listViewTests.js (Diff revision 2) |
---|
Since every test function calls this, it should be moved into
beforeEach
forEach
for a unit test suite.Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+1498) |
djblets/static/djblets/js/configForms/base.js (Diff revision 3) |
---|
I think the more common pattern for this is:
window.Djblets = window.Djblets || {}
djblets/static/djblets/js/configForms/views/listItemView.js (Diff revision 3) |
---|
Could this be
_.bind(Backbone.View.prototype.remove, this)
?
djblets/static/djblets/js/configForms/views/listItemView.js (Diff revision 3) |
---|
Elsewhere you replaced this entity with its unicode equivalent. Did you want to do that here?
djblets/static/djblets/js/configForms/views/listItemView.js (Diff revision 3) |
---|
$parentEl
is unused here. Can you run jshint on this code?
djblets/static/djblets/js/configForms/views/tests/listViewTests.js (Diff revision 3) |
---|
Missing semicolon.
.jshintrc
we have on RB. (I'll commit that file separately.)Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+1568) |