diff --git a/plugins/CoreHome/angularjs/menudropdown/menudropdown-directive.js b/plugins/CoreHome/angularjs/menudropdown/menudropdown-directive.js index f2e5517e2efdac266be1f694d54425163788d61d..4d21f7a4e1e35a75640f4dc17721c5a2d22adfc9 100644 --- a/plugins/CoreHome/angularjs/menudropdown/menudropdown-directive.js +++ b/plugins/CoreHome/angularjs/menudropdown/menudropdown-directive.js @@ -25,7 +25,8 @@ angular.module('piwikApp').directive('piwikMenudropdown', function(){ scope: { menuTitle: '@', tooltip: '@', - showSearch: '=' + showSearch: '=', + menuTitleChangeOnClick: '=' }, templateUrl: 'plugins/CoreHome/angularjs/menudropdown/menudropdown.html?cb=' + piwik.cacheBuster, link: function(scope, element, attrs) { @@ -37,9 +38,11 @@ angular.module('piwikApp').directive('piwikMenudropdown', function(){ return; } - scope.menuTitle = $self.text().replace(/[\u0000-\u2666]/g, function(c) { - return '&#'+c.charCodeAt(0)+';'; - }); + if (scope.menuTitleChangeOnClick !== false) { + scope.menuTitle = $self.text().replace(/[\u0000-\u2666]/g, function(c) { + return '&#'+c.charCodeAt(0)+';'; + }); + } scope.$eval('view.showItems = false'); scope.$apply(); @@ -63,4 +66,4 @@ angular.module('piwikApp').directive('piwikMenudropdown', function(){ }; } }; -}); \ No newline at end of file +});