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

Extra class added when item hidden with Ajax enabled

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.0
    • 2.3
    • JavaScript, Themes
    • MOODLE_20_STABLE
    • MOODLE_23_STABLE
    • 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';}
    • Easy
    • 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; }

    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;
      }

      Attachments

        Issue Links

          Activity

            People

              poltawski Dan Poltawski
              brummie1 Matthew Cannings
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo, Huong Nguyen, Bas Brands, Mathew May
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                25/Jun/12