Fixed news widget not refreshing when the refresh option is clicked.

Review Request #10694 — Created Sept. 6, 2019 and updated

amalik2
Review Board
master
4751
reviewboard, students

In the HTML file where the onclick listener is attached, it tries to
attach it to an anchor tag with the class "reload-news". The actual
tag that is meant to handle refreshing the news widget has an id set
to "reload-news", rather than a class.

This changes that CSS selector to use the id, rather than the class.

Tested locally with console.log() and by adding a debugger statement to
the on click listener, and then clicking on the refresh news widget
item. This triggers an AJAX call, which is visible in the network tab.
Summary Author
Fixed news widget refresh not working.
amalik2
Description From Last Updated

Can you wrap your description and testing done at 72 characters?

brenniebrennie

The summary is too long. It must be one line and keep to <= 72 characters. You can simplify it …

chipx86chipx86

We can get rid of the a bit. It's actually faster to look it up as a pure ID.

chipx86chipx86
brennie
  1. 
      
  2. Can you wrap your description and testing done at 72 characters?

  3. 
      
amalik2
amalik2
chipx86
  1. 
      
  2. The summary is too long. It must be one line and keep to <= 72 characters. You can simplify it by leaving out the technical reason for the problem and focus on what you're fixing.

  3. We can get rid of the a bit. It's actually faster to look it up as a pure ID.

  4. 
      
amalik2
amalik2
Review request changed

Description:

-  

Fixed news widget not refreshing when the refresh option is clicked.

-  
   

In the HTML file where the onclick listener is attached, it tries to

    attach it to an anchor tag with the class "reload-news". The actual
    tag that is meant to handle refreshing the news widget has an id set
    to "reload-news", rather than a class.

   
   

This changes that CSS selector to use the id, rather than the class.

Commits:

Summary Author
-
Fixed incorrect CSS selector being used to attach click handler for news widget refresh.
amalik2
+
Fixed news widget refresh not working.
amalik2

Diff:

Revision 2 (+2 -2)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
chipx86
  1. Ship It!
  2. 
      
Loading...