diff options
Diffstat (limited to 'plugins/CoreHome/angularjs/reporting-menu/reportingmenu.controller.js')
-rw-r--r-- | plugins/CoreHome/angularjs/reporting-menu/reportingmenu.controller.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/CoreHome/angularjs/reporting-menu/reportingmenu.controller.js b/plugins/CoreHome/angularjs/reporting-menu/reportingmenu.controller.js index add0b3fc8b..f82eca4038 100644 --- a/plugins/CoreHome/angularjs/reporting-menu/reportingmenu.controller.js +++ b/plugins/CoreHome/angularjs/reporting-menu/reportingmenu.controller.js @@ -11,6 +11,11 @@ function ReportingMenuController($scope, piwik, $location, $timeout, menuModel, $rootScope) { + var idSite = getUrlParam('idSite'); + var period = getUrlParam('period'); + var date = getUrlParam('date'); + var segment = getUrlParam('segment'); + function markAllCategoriesAsInactive() { angular.forEach(menuModel.menu, function (cat) { @@ -62,11 +67,6 @@ } }; - var idSite = getUrlParam('idSite'); - var period = getUrlParam('period'); - var date = getUrlParam('date'); - var segment = getUrlParam('segment'); - $scope.makeUrl = function (category, subcategory) { var url = 'idSite=' + encodeURIComponent(idSite); @@ -123,6 +123,10 @@ var category = $location.search().category; var subcategory = $location.search().subcategory; + period = getUrlParam('period'); + date = getUrlParam('date'); + segment = getUrlParam('segment'); + if (!category || !subcategory) { return; } |