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

Block docking not using FontAwesome when set by the theme.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 3.3, 3.4.3, 3.5, 3.6
    • Blocks, Themes
    • MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • Hide

      None.

      Show
      None.
    • Hide
      1. Edit the Clean theme config.php file and add '$THEME->iconsystem = \core\output\icon_system::FONTAWESOME;' at the bottom.
      2. Purge all caches.
      3. Login as an administrator.
      4. Navigate to the Dashboard.
      5. On the 'Administration' block observe the use of the FontAwesome fa-caret-square-o-left icon for block to dock.
      6. Repeat for single and all undocking.
      Show
      Edit the Clean theme config.php file and add '$THEME->iconsystem = \core\output\icon_system::FONTAWESOME;' at the bottom. Purge all caches. Login as an administrator. Navigate to the Dashboard. On the 'Administration' block observe the use of the FontAwesome fa-caret-square-o-left icon for block to dock. Repeat for single and all undocking.

      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 function 'M.core.dock.ensureMoveToIconExists' in '/lib/yui/src/dock/js/loader.js':

      {code}

      M.core.dock.ensureMoveToIconExists = function(blocknode) {
      if (blocknode.one('.moveto')) {
      return true;
      }

      var commands,
      moveto = Y.Node.create('<input type="image" class="moveto customcommand requiresjs" />'),
      blockaction = blocknode.one('.block_action'),
      icon = 't/block_to_dock',
      titleh2 = blocknode.one('.header .title h2');

      // Must set the image src separately of we get an error with XML strict headers
      if (Y.one(document.body).hasClass('dir-rtl')) {
      icon = icon + '_rtl';
      }
      moveto.setAttribute('alt', M.util.get_string('addtodock', 'block'));
      if (titleh2) {
      moveto.setAttribute('title', Y.Escape.html(M.util.get_string('dockblock', 'block', titleh2.getHTML())));
      }
      moveto.setAttribute('src', M.util.image_url(icon, 'moodle'));

      .....

      {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.

            Unassigned Unassigned
            gb2048 Gareth J Barnard
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.