<commit_before><%include file="Announcement.tpl"/>

<div class="pageHeader pageHeaderMainPage clearfix">
        <%include file="SessionBar.tpl" args="dark=False"/>

        % if searchBox != '':
            ${ searchBox }
        % endif

        <!--
            set fixed height on anchor to assure that the height is
            corrected if the image cannot be retrieved (i.e. https problems) -->
        <a style="min-height: 66px;" href="${ urlHandlers.UHWelcome.getURL() }">
            <img class="headerLogo" src="${ imgLogo }" />
        </a>

        % if isFrontPage:
            <div class="headerAboutIndico">
                ${ _("The Indico tool allows you to manage complex conferences, workshops and meetings.") }
            </div>
        % endif

    <div class="globalMenu">
        <ul>
            <li onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><a href="${ urlHandlers.UHWelcome.getURL() }">${ _("Home") }</a></li>
            <li id="createEventMenu" onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><span class="dropDownMenu">${ _("Create event") }</span></li>

            % if roomBooking:
                <li onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><a href="${ urlHandlers.UHRoomBookingWelcome.getURL() }">${ _("Room booking") }</a></li>
            % endif

            % if len(adminItemList) == 1:
                <li onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><a href="${ adminItemList[0]['url'] }">${ adminItemList[0]['text'] }</a></li>
            % elif len(adminItemList) > 1:
                <li id="administrationMenu" onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><span class="dropDownMenu">${ _("Administration") }</span></li>
            % endif

            % if currentUser:
                <li onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><a href="${ urlHandlers.UHUserDetails.getURL(currentUser) }">${ _("My profile") }</a></li>
            % endif

            <li id="helpMenu"  onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><span class="dropDownMenu">${ _("Help") }</span></li>
            <li style="display: none;" onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><a href="${ urlHandlers.UHContact.getURL() }">Contact</a></li>
            <li style="display: none;" onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><a href="${ urlHandlers.UHCategoryMap.getURL(categId=0) }">Site Map</a></li>
            <li style="display: none;" onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><a href="${ urlHandlers.UHAbout.getURL() }">About Indico</a></li>

            <li onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''" style="display: none;"><a href="urlHandlers.UHGetUserEventPage.getURL()">${ _("My Indico") }</a></li>
        </ul>
    </div>
</div>

<%
urlConference = urlHandlers.UHConferenceCreation.getURL(currentCategory)
urlConference.addParam("event_type","default")

urlLecture = urlHandlers.UHConferenceCreation.getURL(currentCategory)
urlLecture.addParam("event_type","simple_event")

urlMeeting = urlHandlers.UHConferenceCreation.getURL(currentCategory)
urlMeeting.addParam("event_type","meeting")
%>

<script type="text/javascript">
var createEventMenu = $E('createEventMenu');
createEventMenu.observeClick(function(e) {
    var menuItems = {};
    menuItems['${ _("Create lecture") }'] = "${ urlLecture }";
    menuItems['${ _("Create meeting") }'] = "${ urlMeeting }";
    menuItems['${ _("Create conference") }'] = "${ urlConference }";

    var infoItems = {}; //List used to print additional help on the menu (MUST use the same keys as menuItems)
    infoItems['${ _("Create lecture") }'] = "${ _("A <strong>lecture</strong> is a simple event to annouce a talk.<br/><strong>Features</strong>: poster creation, participants management,...") }";
    infoItems['${ _("Create meeting") }'] = "${ _("A <strong>meeting</strong> is an event that defines an agenda with many talks.<br/><strong>Features</strong>: timetable, minutes, poster creation, participants management,...") }";
    infoItems['${ _("Create conference") }'] = "${ _("A <strong>conference</strong> is a complex event with features to manage the whole life cycle of a conference.<br/><strong>Features</strong>: call for abstracts, registration, e-payment, timetable, badges creation, paper reviewing,...") }";

    var menu = new PopupMenu(menuItems, [createEventMenu], "globalMenuPopupList");
    var pos = createEventMenu.getAbsolutePosition();
    menu.open(pos.x, pos.y + 30);

    //Write down the content of the infoBubble
    menu.drawInfoBubbles(infoItems);

    return false;
});

% if len(adminItemList) > 1:

    var administrationMenu = $E('administrationMenu');
    administrationMenu.observeClick(function(e) {
        var menuItems = {};

        % for item in adminItemList:
        menuItems["${ item['text']}"] = "${ item['url'] }"
        % endfor
        var menu = new PopupMenu(menuItems, [administrationMenu], "globalMenuPopupList");
        var pos = administrationMenu.getAbsolutePosition();
        menu.open(pos.x, pos.y + 30);
        return false;
    });

% endif

var helpMenu = $E('helpMenu');
helpMenu.observeClick(function(e) {
    var menuItems = {};

    menuItems['${ _("Indico help") }'] = "${ urlHandlers.UHConferenceHelp.getURL() }";
    menuItems['${ _("About Indico") }'] = "${ urlHandlers.UHAbout.getURL() }";
    menuItems['${ _("Contact") }'] = "${ urlHandlers.UHContact.getURL() }";

    var menu = new PopupMenu(menuItems, [helpMenu], "globalMenuPopupList");
    var pos = helpMenu.getAbsolutePosition();
    menu.open(pos.x, pos.y + 30);
    return false;
});
</script>

<commit_msg>[FIX] Popup Menu Defect<commit_after><%include file="Announcement.tpl"/>

<div class="pageHeader pageHeaderMainPage clearfix">
        <%include file="SessionBar.tpl" args="dark=False"/>

        % if searchBox != '':
            ${ searchBox }
        % endif

        <!--
            set fixed height on anchor to assure that the height is
            corrected if the image cannot be retrieved (i.e. https problems) -->
        <a style="min-height: 66px;" href="${ urlHandlers.UHWelcome.getURL() }">
            <img class="headerLogo" src="${ imgLogo }" />
        </a>

        % if isFrontPage:
            <div class="headerAboutIndico">
                ${ _("The Indico tool allows you to manage complex conferences, workshops and meetings.") }
            </div>
        % endif

    <div class="globalMenu">
        <ul>
            <li onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><a href="${ urlHandlers.UHWelcome.getURL() }">${ _("Home") }</a></li>
            <li id="createEventMenu" onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><span class="dropDownMenu">${ _("Create event") }</span></li>

            % if roomBooking:
                <li onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><a href="${ urlHandlers.UHRoomBookingWelcome.getURL() }">${ _("Room booking") }</a></li>
            % endif

            % if len(adminItemList) == 1:
                <li onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><a href="${ adminItemList[0]['url'] }">${ adminItemList[0]['text'] }</a></li>
            % elif len(adminItemList) > 1:
                <li id="administrationMenu" onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><span class="dropDownMenu">${ _("Administration") }</span></li>
            % endif

            % if currentUser:
                <li onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><a href="${ urlHandlers.UHUserDetails.getURL(currentUser) }">${ _("My profile") }</a></li>
            % endif

            <li id="helpMenu"  onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><span class="dropDownMenu">${ _("Help") }</span></li>
            <li style="display: none;" onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><a href="${ urlHandlers.UHContact.getURL() }">Contact</a></li>
            <li style="display: none;" onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><a href="${ urlHandlers.UHCategoryMap.getURL(categId=0) }">Site Map</a></li>
            <li style="display: none;" onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''"><a href="${ urlHandlers.UHAbout.getURL() }">About Indico</a></li>

            <li onmouseover="this.className = 'mouseover'" onmouseout="this.className = ''" style="display: none;"><a href="urlHandlers.UHGetUserEventPage.getURL()">${ _("My Indico") }</a></li>
        </ul>
    </div>
</div>

<%
urlConference = urlHandlers.UHConferenceCreation.getURL(currentCategory)
urlConference.addParam("event_type","default")

urlLecture = urlHandlers.UHConferenceCreation.getURL(currentCategory)
urlLecture.addParam("event_type","simple_event")

urlMeeting = urlHandlers.UHConferenceCreation.getURL(currentCategory)
urlMeeting.addParam("event_type","meeting")
%>

<script type="text/javascript">
var createEventMenu = $E('createEventMenu');
var eventPopupMenu;
createEventMenu.observeClick(function(e) {
    var menuItems = {};
    menuItems['${ _("Create lecture") }'] = "${ urlLecture }";
    menuItems['${ _("Create meeting") }'] = "${ urlMeeting }";
    menuItems['${ _("Create conference") }'] = "${ urlConference }";

    //Create a new PopupMenu only if it has never been created before -> fix #679
    if(!eventPopupMenu){
        eventPopupMenu = new PopupMenu(menuItems, [createEventMenu], "globalMenuPopupList");
    }

    var pos = createEventMenu.getAbsolutePosition();
    eventPopupMenu.open(pos.x, pos.y + 30);

    var infoItems = {}; //List used to print additional help on the menu (MUST use the same keys as menuItems)
    infoItems['${ _("Create lecture") }'] = "${ _("A <strong>lecture</strong> is a simple event to annouce a talk.<br/><strong>Features</strong>: poster creation, participants management,...") }";
    infoItems['${ _("Create meeting") }'] = "${ _("A <strong>meeting</strong> is an event that defines an agenda with many talks.<br/><strong>Features</strong>: timetable, minutes, poster creation, participants management,...") }";
    infoItems['${ _("Create conference") }'] = "${ _("A <strong>conference</strong> is a complex event with features to manage the whole life cycle of a conference.<br/><strong>Features</strong>: call for abstracts, registration, e-payment, timetable, badges creation, paper reviewing,...") }";
    eventPopupMenu.drawInfoBubbles(infoItems);

    return false;
});

% if len(adminItemList) > 1:

    var administrationMenu = $E('administrationMenu');
    var administrationPopupMenu;
    administrationMenu.observeClick(function(e) {
        var menuItems = {};

        % for item in adminItemList:
        menuItems["${ item['text']}"] = "${ item['url'] }"
        % endfor
        //Create a new PopupMenu only if it has never been created before -> fix #679
        if(!administrationPopupMenu){
            administrationPopupMenu = new PopupMenu(menuItems, [administrationMenu], "globalMenuPopupList");
        }
        var pos = administrationMenu.getAbsolutePosition();
        administrationPopupMenu.open(pos.x, pos.y + 30);
        return false;
    });

% endif

var helpMenu = $E('helpMenu');
var helpPopupMenu;
helpMenu.observeClick(function(e) {
    var menuItems = {};

    menuItems['${ _("Indico help") }'] = "${ urlHandlers.UHConferenceHelp.getURL() }";
    menuItems['${ _("About Indico") }'] = "${ urlHandlers.UHAbout.getURL() }";
    menuItems['${ _("Contact") }'] = "${ urlHandlers.UHContact.getURL() }";

    //Create a new PopupMenu only if it has never been created before-> fix #679
    if(!helpPopupMenu){
        helpPopupMenu = new PopupMenu(menuItems, [helpMenu], "globalMenuPopupList");
    }
    var pos = helpMenu.getAbsolutePosition();
    helpPopupMenu.open(pos.x, pos.y + 30);
    return false;
});
</script>


{'fraction_non_alphanumeric': 0.17478977875744958, 'fraction_numerical': 0.003020654747326312, 'mean_word_length': 3.673788630293781, 'pattern_counts': {'":': 0, '<': 155, '<?xml version=': 0, '>': 162, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '239435', 'n_tokens_mistral': 3729, 'n_tokens_neox': 3610, 'n_words': 826}