Add helpers to add widget actions and formalize a Reload action.
Review Request #10795 — Created Nov. 11, 2019 and submitted
RB.Admin.WidgetViewnow 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
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.