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

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

Information

Review Board
master

Reviewers

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 ID Author
Fixed news widget refresh not working.
8f50d6247d4b66da866d3983d7ae4458ba1a267d 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. Show all issues

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

  3. 
      
amalik2
amalik2
chipx86
  1. 
      
  2. Show all issues

    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. Show all issues

    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 ID Author
Fixed incorrect CSS selector being used to attach click handler for news widget refresh.
531fba9a54402c1ea045d01af07c65666acf99ea amalik2
Fixed news widget refresh not working.
8f50d6247d4b66da866d3983d7ae4458ba1a267d amalik2

Checks run (2 succeeded)

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