Replaced Rails loop with JavaScript map to handle instructor merges#26
Open
jasonkhoe wants to merge 2 commits intocompserv:masterfrom
jasonkhoe:fix-merge-instructor-js
Open
Replaced Rails loop with JavaScript map to handle instructor merges#26jasonkhoe wants to merge 2 commits intocompserv:masterfrom jasonkhoe:fix-merge-instructor-js
jasonkhoe wants to merge 2 commits intocompserv:masterfrom
jasonkhoe:fix-merge-instructor-js
Conversation
Contributor
|
🉑 👍 🌞 |
Member
There was a problem hiding this comment.
Nitpicks about the indentation and lane breaks here:
successshould be lined up withurl.- Why is
autocompleteon a separate line? It fits within 80 characters with the previous line. resultshould be indented more.- Having three nested anonymous functions in the
successhandler is pretty confusing to read. I would create a new named function and just reference it here. - There is inconsistent spacing around function arguments. I would personally prefer no spaces before or after parentheses and a space after every comma.
Member
|
I realize you weren't responsible for most of the things I pointed out, but I figured we might as well clean it up while we're at it. Everything else LGTM. |
Contributor
There was a problem hiding this comment.
Yeah...maybe this wasn't the best way of curing the problem. We might as well jQuery all the way.
Instead of using the ID selectors, a class applied to the inputs and the hidden fields might be a better idea. Say the fields currently id'd as iboxN had the class instructor-name. You could then write:
$('.instructor-name').each(function() {
// ... your code here, where this refers to each of the elements with the class 'instructor-name'
});
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Followed advice from @seshness