зеркало из https://github.com/mozilla/treeherder.git
Merge pull request #1069 from tojonmz/dismiss-overlay
Bug 1210158 - Clear onscreen help overlay on click
This commit is contained in:
Коммит
4ef2c5e0f2
|
@ -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){
|
||||
|
|
Загрузка…
Ссылка в новой задаче