Skip to content
Extraits de code Groupes Projets
Valider 57111ad2 rédigé par Matthieu Aubry's avatar Matthieu Aubry
Parcourir les fichiers

Merge pull request #6213 from czolnowski/menu-title-change-on-click

Add option to disable menu title change after click position in top menu.
parents d7e3384b 074837f8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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
});
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter