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

Action Menu is not built correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Deferred
    • Icon: Minor Minor
    • None
    • 2.8
    • Themes
    • None
    • MOODLE_28_STABLE

      In trying to understand how the action menu is created I found that it is built wrongly, at least compared with the dropdown menus used in Bootstrap.
      This is how a bootstrap single dropdown menu list looks like:

      <ul class="nav navbar-nav">
          <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
                  <ul class="dropdown-menu">
                  <li><a href="#">Action1</a></li>
                  <li class="divider"></li>
                  <li><a href="#">Action2</a></li>
                  <li class="divider"></li>
                  <li><a href="#">Action3</a></li>                        
              </ul>
          </li>
      </ul>                
      

      And this is how the Usermenu (action menu) looks:

      <div class="userinfo">
      <span class="userbutton">
      <span class="usertext">Admin User</span>
      <span class="avatars">
      <span class="avatar current">
      <img class="userpicture defaultuserpic" width="35" height="35" role="presentation" title="" alt="" src="">
      </span>
      </span>
      </span>
      </div>
      <div id="action-menu-0" class="moodle-actionmenu show" data-enhance="moodle-core-actionmenu" data-enhanced="1">
      <ul id="action-menu-0-menubar" class="menubar" role="menubar">
      <li role="presentation">
      <a id="action-menu-toggle-0" class="toggle-display textmenu">
      <span class="accesshide">User menu</span>
      <b class="caret"></b>
      </a>
      </li>
      </ul>
      <ul id="action-menu-0-menu" class="menu align-tr-br" >
      <li role="presentation"></li>
      <li role="presentation"><li>
      <li role="presentation"><li>
      <li role="presentation"><li>
      <li role="presentation"><li>
      </ul>
      </div>
      </div>
      

      Where the Bootstrap has a nested pair of unordered lists and the user (action menu) are two separate unordered lists making for what looks like an overly complicated lines of code, which I am sure could be simplified especially if Bootstrap CSS selectors where added instead of those thought up for the codes original purpose.

            Unassigned Unassigned
            lazydaisy Mary Evans
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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