Welcome to mirror list, hosted at ThFree Co, Russian Federation.

menu_init.js « javascripts « CoreHome « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 88a3fc21ad20cae4cd31483842010508adb54d53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
$(function () {
    var isPageHasMenu = $('#secondNavBar').size();
    var isPageIsAdmin = $('#content.admin').size();

    if (isPageHasMenu) {
        piwikMenu = new menu();
        piwikMenu.init();
        if (isPageIsAdmin) {
            piwikMenu.activateMenu(broadcast.getValueFromUrl('module'), broadcast.getValueFromUrl('action'), '');
        } else {
            piwikMenu.loadFirstSection();
        }
    } else if (!isPageIsAdmin) {
        // eg multisites
        initTopControls();
    }

    if(isPageIsAdmin) {
        // don't use broadcast in admin page
        initTopControls();
        return;
    }
    if(isPageHasMenu) {
        broadcast.init();
    } else {
        broadcast.init(true);
    }
});