Merge pull request #1069 from tojonmz/dismiss-overlay

Bug 1210158 - Clear onscreen help overlay on click
This commit is contained in:
camd 2015-10-16 15:15:03 -07:00
Родитель 626678ab83 ce8520a0fa
Коммит 4ef2c5e0f2
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){