diff options
author | Marcin Czołnowski <marcin@czolnowski.net> | 2014-09-15 13:24:21 +0400 |
---|---|---|
committer | Marcin Czołnowski <marcin@czolnowski.net> | 2014-09-15 13:24:21 +0400 |
commit | 074837f8dafc61d4b3c5a7bcfe7d087de4ef8ee5 (patch) | |
tree | 5d85b9a98ee392a9dd2717231d6c0507527c293c /plugins | |
parent | 7aa9252ed7df0113cb4232094f4670998b6e9123 (diff) |
Add option to disable menu title change after click position in top menu.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/CoreHome/angularjs/menudropdown/menudropdown-directive.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/plugins/CoreHome/angularjs/menudropdown/menudropdown-directive.js b/plugins/CoreHome/angularjs/menudropdown/menudropdown-directive.js index f2e5517e2e..4d21f7a4e1 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 +}); |