Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-2152

Add meta info to data element in DOM tree about displayed resource

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11.0
    • Component/s: Layout
    • Labels:
      None

      Description

      To improve course, type specific or course element specific CSS styling, data-attributes are added to the body, the course-run and the menu tree elements.

      Examples for body formatting:

      # The authoring site
      <body onload="o_start();" id="o_body" class="o_lang_en" data-restype="site" data-resid="RepositorySite">
      
      # The "my courses site"
      <body onload="o_start();" id="o_body" class="o_lang_en" data-restype="site" data-resid="MyCoursesSite">
      
      # A course
      <body onload="o_start();" id="o_body" class="o_lang_en" data-restype="CourseModule" data-resid="94216076853929" data-repoid="557067">
      
      # A group
      <body onload="o_start();" id="o_body" class="o_lang_en" data-restype="BusinessGroup" data-resid="720898">
      

      Now it is possible to create a style like this:

      body[data-resid ="94216076853929"] h2 {
      color: gold;
      }
      

      Examples for course tree formatting:

      # In the course tree
      <li class=" active_parent" data-nodeid="94216155307803">
      

      Now it is possible to create a style like this:

      li[data-nodeid="94216155307803"] {background: blue;}
      

      Examples for course formatting based on active course element:

      # In the main area
      <div class="o_course_run" data-nodeid="94216155307803">
      

      Now it is possible to create a style like this:

      .o_course_run[data-nodeid="94216155307803"] {background: blue;}
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              frentix Frentix
              Reporter:
              fetzer Raphael Fetzer
              Tester:
              Raphael Fetzer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours
                  3h