• 
      

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

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

    Information

    Review Board
    release-4.0.x
    ea5b1bc...

    Reviewers

    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.