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

Update resource waiting spinners

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: JavaScript
    • Labels:
    • Testing Instructions:
      Hide
      • View a course with some activities/resources and at least two sections
      • Turn Editing on
      • Try each of the AJAX buttons on the resource(s):
        • move right
        • move left
        • drag/drop
        • show/hide
        • change group mode (on activities only)
      • Confirm:
        • the spinner appears at the end of activity toolbox (it does not replace the icon any more)
        • the spinner disappears after a short period
      • For a section try:
        • show/hide the section
        • highlight/unhighlight
        • drag/drop the section
      • Confirm:
        • a lightbox with a spinner centered in it appears over the section
        • the lightbox spinner disappears after a short period
      Show
      View a course with some activities/resources and at least two sections Turn Editing on Try each of the AJAX buttons on the resource(s): move right move left drag/drop show/hide change group mode (on activities only) Confirm: the spinner appears at the end of activity toolbox (it does not replace the icon any more) the spinner disappears after a short period For a section try: show/hide the section highlight/unhighlight drag/drop the section Confirm: a lightbox with a spinner centered in it appears over the section the lightbox spinner disappears after a short period
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-32654-master-2

      Description

      Another minor improvement following MDL-31052.

      Our initial idea to replace the icon with a spinner doesn't give great feedback and is easy to miss (hidden by the mousepointer).
      It also leads to a rather complicated set of events in the send_request function and I've also seen that clicking a button twice in quick succession can lead to the spinner not leaving.

      I've put together an alternative which simplifies send_requests and utilises the Node.show() and Node.hide() functions.
      I've also put together a function to create a spinner in M.util.add_spinner.

      I also noticed on the original implementation that if you click quickly enough then the spinner never disappears due to a race condition in the JS.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Jun/12