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

Improvements for the navigation blocks JS

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.2
    • Component/s: Navigation
    • Labels:
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      I've attached a patch here that has reworked the navigation blocks JavaScript.
      The biggest change is that it is now a proper Moodle YUI module.
      As well as that I have made the following changes to code:

      • A loading icon is displayed when a branch is being loaded by AJAX.
      • Fixed a bug where you could trigger multiple AJAX requests by rapidly clicking an unloaded branch.
      • Fixed a bug where empty branches weren't being marked as such after a successful AJAX load.
      • When docked the width of the blocks dock panel is now inspected an increased if required to try avoid horizontal scrolling.
      • Removed the no longer needed inclusion of the YUI2 dom library from the navigation and settings block.
      • Expandable nodes are now passed as JS data allowing the navigation JS to be initialised through block_navigation::get_required_javascript.
      • AJAX is now focused around the branch in question rather than the tree in general.
      • Expansion of branches is now delegated to the tree rather than being an individual event on all branches.
      • Tidied up the code in general removing unneeded-unused parameters.

      This patch requires a little more testing across multiple browsers and will then be ready for review.
      Cheers
      Sam

        Attachments

        1. arrow.gif
          arrow.gif
          6 kB
        2. MDL-25596.20101210.patch
          36 kB
        3. non_expanded_section.png
          non_expanded_section.png
          104 kB

          Activity

            People

            Assignee:
            samhemelryk Sam Hemelryk
            Reporter:
            samhemelryk Sam Hemelryk
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              21/Feb/11