Changeset 37476 for main


Ignore:
Timestamp:
2023-03-13T12:13:32+13:00 (13 months ago)
Author:
kjdon
Message:

some changes to userMenu - this had used absolute positioning relative to the page, so if you resized the page, the top button would move but the menu wouldn't. added a div inside the li, position relative, so the absolute positioning of the user menu would stay relative to that div. it does now look a bit odd as the menu is scrunched up inside the div. but at least it stays in place. moved some styling out to core.css

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/layouts/header.xsl

    r37474 r37476  
    469469    {
    470470    menu = button.data("userMenu");
     471
    471472    if(menu.css("display") == "block")
    472473    {
     
    481482    {
    482483    menu = $("<ul>")
    483     .css("position", "absolute")
    484     .css("display", "block")
    485     .css("z-index", "100")
    486     .css("list-style", "none outside none")
    487     .css("margin", "0px")
    488     .css("padding", "0px")
    489     .css("font-size", "90%");
     484        .css("display", "block");
    490485   
    491486    menu.attr("id", "userMenu");
     
    587582    menu.append(logoutLink);
    588583
    589     var buttonLeft = button.offset().left;
    590     var buttonTop = button.offset().top;
    591 
    592584    var buttonHeight = button.height();
    593 
    594     menu.offset({top: buttonTop + buttonHeight + 4, left: buttonLeft});
    595     $("#topArea").append(menu);
     585        menu.css("top", buttonHeight + 4);
     586        menu.css("left", 0);
     587    $("#userMenuDiv").append(menu);
    596588    }
    597589    }
     
    699691 
    700692  <xsl:template name="LoginoutLink">
     693    <div id="userMenuDiv" style="position:relative;">
    701694    <!-- login/logout -->
    702695    <xsl:choose>
     
    717710      </xsl:otherwise>
    718711    </xsl:choose>
     712    </div>
    719713  </xsl:template>
    720714 
Note: See TracChangeset for help on using the changeset viewer.