Add helpers to add widget actions and formalize a Reload action.

Review Request #10795 — Created Nov. 11, 2019 and submitted


Review Board


RB.Admin.WidgetView now has utility functions for adding header/footer
actions, allowing subclasses to focus on the content of the action and
not the DOM structure. This also simplifies templates, meaning that most
widgets won't even need a custom template anymore.

Widgets do provide an optional built-in action for reloading content. If
a subclass sets canReload to true, the action will be added, and a
reloadContent() method will be called when clicked. Implementations of
this can make use of a setReloading() method that controls a spin
animation for the reload action. Some upcoming widgets will take
advantage of this.

Styling improvements have been made to help the actions stand out
better, and to set better sizes of FontAwesome icons used for actions.

Made use of this in the News widdget.

  1. Ship It!
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.0.x (3c67a4c)