Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65504

Add helper JS module for common async button scenario

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Development in progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7
    • Fix Version/s: None
    • Component/s: JavaScript, Themes
    • Labels:

      Description

      We have a common scenario in Moodle where we have a button trigger an async action (e.g. an ajax request to a webservice) however we quite often forget to give the user any visual indication that something is happening.

      In the cases that we do give a visual indication we often repeat the same code. It should be easy enough to abstract that into a single utility module that applies the loading state to a button and then reverts it later when needed so that we can have a consistent look.

        Attachments

          Activity

            People

            • Assignee:
              ryanwyllie Ryan Wyllie
              Reporter:
              ryanwyllie Ryan Wyllie
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta, Ryan Wyllie, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 minute
                1m