candidate_parameters: replace $.ajax with lorisFetch#10334
candidate_parameters: replace $.ajax with lorisFetch#10334Montekkundan wants to merge 4 commits intoaces:mainfrom
Conversation
|
Follow-up pushed to align with #9999 Updated
Notes
|
| }); | ||
| return this.setSubEndpoint(subEndpoint).get(query); | ||
| } | ||
| } |
There was a problem hiding this comment.
It seems like we are deconstructing the URL only to rebuild it.
The Client shouldn't be sent URLs, it should receive data and then decide for itself which endpoint to target.
Where does the URL string being passed into getJSON originate? Instead of passing a URL, can we pass the raw parameters directly so we can use this.get(query) without all this manual parsing?
There was a problem hiding this comment.
This is making me realise we need to standardize how our Client subclass methods receive data... I'll have to think on how to implement that.
There was a problem hiding this comment.
I replaced the URL based client call with getData(candID, tabName) and updated the 5 candidate_parameters components to use it.
Summary
Replace
$.ajaxcalls withlorisFetchincandidate_parameters.Why
This removes jQuery AJAX usage in this module for issue #4213.
Scope
Only AJAX replacement in this module. No unrelated jQuery refactors.
Dependency
Depends on #10333 .
Verification
git grep '\$\.ajax'is clean for touched files.