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

Extra class added when item hidden with Ajax enabled

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.3
    • Component/s: JavaScript, Themes
    • Labels:
    • Testing Instructions:
      Hide

      If you include the css below in a theme. You can see that the area surrounding a resource goes grey when it is hidden. If you reload the page whilst some resources are hidden the area will not be grey until you have toggled them visible and then hidden again

      .region-content .dimmed_text {
      background: none repeat scroll 0 0 #EDEDED;
      }

      Show
      If you include the css below in a theme. You can see that the area surrounding a resource goes grey when it is hidden. If you reload the page whilst some resources are hidden the area will not be grey until you have toggled them visible and then hidden again .region-content .dimmed_text { background: none repeat scroll 0 0 #EDEDED; }
    • Workaround:
      Hide

      In /course/lib.php function print_section

      just before

      echo html_writer::start_tag('div', array('class'=>join(' ', $classes)));

      place

      if ($accessiblebutdim){$classes[] = 'dimmed_text';}

      Show
      In /course/lib.php function print_section just before echo html_writer::start_tag('div', array('class'=>join(' ', $classes))); place if ($accessiblebutdim){$classes[] = 'dimmed_text';}
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE

      Description

      When Ajax is enabled and a resource is hidden the class dimmed_text is appended to the div surrounding a resource. This is not set when Ajax disabled or on the initial page loading.

      As it can be styled it would be useful to have it available from page load

      e.g.
      .region-content .dimmed_text {
      background: none repeat scroll 0 0 #EDEDED;
      }

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

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