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

Navigation block not using FontAwesome when set by the theme.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.3
    • 3.3.1
    • Blocks, Navigation
    • MOODLE_33_STABLE
    • MOODLE_33_STABLE
    • MDL-58808-master
    • Hide
      1. Add the navigation and settings blocks to any page in boost.
      2. Tab to the tree in each block and press * on the numpad to expand all branches
      3. Observe the use of the FontAwesome icons in the nav tree (but not for activities).
      4. Switch to hebrew and verify the icons and spacing are still correct.
      Show
      Add the navigation and settings blocks to any page in boost. Tab to the tree in each block and press * on the numpad to expand all branches Observe the use of the FontAwesome icons in the nav tree (but not for activities). Switch to hebrew and verify the icons and spacing are still correct.

    Description

      In MDL-40759 FontAwesome was added as an icon system to be used by a theme if desired.  The title of the issue is 'Use the Font Awesome icon font for all icons in Moodle' however the AJAX processing of the response processed in /blocks/navigation/amd/src/ajax_response_header.js:

      {code}

      if (node.icon && (!isBranch || node.type === NODETYPE.ACTIVITY || node.type === NODETYPE.RESOURCE)) {
      li.addClass('item_with_icon');
      p.addClass('hasicon');

      icon = $('<img/>');
      icon.attr('alt', node.icon.alt);
      icon.attr('title', node.icon.title);
      icon.attr('src', M.util.image_url(node.icon.pix, node.icon.component));
      $.each(node.icon.classes, function(index, className) {
      icon.addClass(className);
      });
      }

      {code}

      ignores this and injects an image directly rather than implementing the intent of the theme configuration setting: $THEME->iconsystem = \core\output\icon_system::FONTAWESOME;

      Therefore 'Use the Font Awesome icon font for all icons in Moodle' is false and incomplete.

      Attachments

        Issue Links

          Activity

            People

              damyon Damyon Wiese
              gb2048 Gareth J Barnard
              Ryan Wyllie Ryan Wyllie
              Jake Dallimore Jake Dallimore
              Adrian Greeve Adrian Greeve
              David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Jul/17