Fix up the formatting of the repository form JS
Review Request #7761 — Created Nov. 9, 2015 and submitted
This patch brings
repositoryform.js
into line with our style
guidelines.
Verified that the repository form still worked.
Ran JSHint.
Description | From | Last Updated |
---|---|---|
This would be better written if we flip it: $('<p class="help" />') .text(text) .appendTo($('#row-' + field)); |
david | |
Please undo the indentation change here (we want the ? and : to align within the parens) |
david | |
This can be: $hostingAccountPassRow.setVisible(hostingInfo.needs_authorization); |
david | |
This is awkward. Can we store $hostingAccount[0].selectedIndex] into a variable first? We should probably also call this $selectedOption since it's … |
david | |
setVisible() |
david | |
setVisible() |
david | |
Let's wrap $(this) once. |
david | |
Please undo this indentation change. |
david | |
This can use setVisible. |
david | |
setVisible |
david | |
Probably better as $hostingType.val() |
david | |
Probably better as $hostingType.val() |
david | |
Probably better as $bugTrackerType.val() |
david |
-
Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/repositoryform.js Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/repositoryform.js
-
Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/repositoryform.js Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/repositoryform.js
- Change Summary:
-
Address David's issues & use $.fn.prop() over $.fn.attr()
- Diff:
-
Revision 4 (+194 -193)