view-request-history.js

About this file

Upon showing the request history, the previous button is disabled.
showHistory() clears out the history html and renders the history list template
loadMore() retrieves the history log of requests and enables the next button to display more events.
When the previous button is clicked on, this indicates that the current set of requests being shown is not the starting set. The next button is then disabled. After clicking the previous button, if the starting set of history is loaded, the previous button is then disabled. Similarly, when then the next button is clicked on, if the last set of the request history is loaded, the next button is then disabled.

Code Issues

  • Recommend adding a comment for loadMore() defining what the function does.

Code Check Report




  99:23  error  Expected '===' and instead saw '=='  eqeqeq

✖ 1 problem (1 error, 0 warnings)
                        

Documentation drawn from source code

$(function() {
   success: function (data) {
   error: function(error) {
  function showHistory() {
  function loadMore() {
    success: function(data) {
    error: function(error) {
  prevButton.click(function () {
  nextButton.click(function () {

Source code