Bug 1210158 - Clear onscreen help overlay on click

This commit is contained in:
Jonathan French 2015-10-15 16:44:10 -04:00
Родитель 50a879fbfd
Коммит ce8520a0fa
2 изменённых файлов: 22 добавлений и 5 удалений

Просмотреть файл

@ -24,8 +24,10 @@
</head>
<body ng-controller="MainCtrl" ng-keydown="processKeyboardInput($event)">
<div id="global-container">
<div id="onscreen-overlay" ng-if="onscreenOverlayShowing">
<div id="onscreen-shortcuts" ng-if="onscreenShortcutsShowing">
<div id="onscreen-overlay" ng-if="onscreenOverlayShowing"
ng-click="setOnscreenShortcutsShowing(false)">
<div id="onscreen-shortcuts" ng-if="onscreenShortcutsShowing"
stop-propagation-on-left-click>
<div class="col-xs-8">
<ng-include src="'partials/main/thShortcutTable.html'"></ng-include>
</div>

Просмотреть файл

@ -90,12 +90,12 @@ treeherder.directive('copyValue', [
// on left click but default href type functionality on
// middle or right mouse click.
treeherder.directive('preventDefaultOnLeftClick', [
function(){
function() {
return {
restrict: 'A',
link: function(scope, element, attrs){
element.on('click', function(event){
if(event.which === 1){
element.on('click', function(event) {
if (event.which === 1) {
event.preventDefault();
}
});
@ -104,6 +104,21 @@ treeherder.directive('preventDefaultOnLeftClick', [
}
]);
treeherder.directive('stopPropagationOnLeftClick', [
function() {
return {
restrict: 'A',
link: function(scope, element) {
element.on('click', function(event) {
if (event.which === 1) {
event.stopPropagation();
}
});
}
};
}
]);
treeherder.directive('thNotificationBox', [
'thNotify',
function(thNotify){