зеркало из https://github.com/mozilla/treeherder.git
escape clears open panels and selected job
This commit is contained in:
Родитель
ed47c56a9f
Коммит
45937e9b5a
|
@ -67,6 +67,13 @@ treeherder.controller('MainCtrl', [
|
|||
} else if (ev.keyCode === 85) {
|
||||
//display only unclassified failures, keys:u
|
||||
$scope.toggleUnclassifiedFailures();
|
||||
} else if (ev.keyCode === 27) {
|
||||
// escape key closes any open top-panel and clears selected job
|
||||
$scope.setRepoPanelShowing(false);
|
||||
$scope.setFilterPanelShowing(false);
|
||||
$scope.setSettingsPanelShowing(false);
|
||||
$scope.setSheriffPanelShowing(false);
|
||||
$scope.clearJob();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -200,19 +207,34 @@ treeherder.controller('MainCtrl', [
|
|||
});
|
||||
|
||||
$scope.isRepoPanelShowing = false;
|
||||
|
||||
$scope.setRepoPanelShowing = function(tf) {
|
||||
$scope.isRepoPanelShowing = tf;
|
||||
};
|
||||
|
||||
$scope.isFilterPanelShowing = false;
|
||||
$scope.setFilterPanelShowing = function(tf) {
|
||||
$scope.isFilterPanelShowing = tf;
|
||||
};
|
||||
|
||||
$scope.isSettingsPanelShowing = false;
|
||||
$scope.setSettingsPanelShowing = function(tf) {
|
||||
$scope.isSettingsPanelShowing = tf;
|
||||
};
|
||||
|
||||
$scope.isSheriffPanelShowing = false;
|
||||
$scope.setSheriffPanelShowing = function(tf) {
|
||||
$scope.isSheriffPanelShowing = tf;
|
||||
};
|
||||
|
||||
$scope.changeRepo = function(repo_name) {
|
||||
// hide the repo panel if they chose to load one.
|
||||
$scope.isRepoPanelShowing = false;
|
||||
$rootScope.selectedJob = null;
|
||||
thPinboard.unPinAll();
|
||||
|
||||
$location.search("repo", repo_name);
|
||||
$location.search("revision", null);
|
||||
$scope.repoModel.setCurrent(repo_name);
|
||||
$location.search({repo: repo_name});
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<span ng-show="user.is_staff">
|
||||
<span class="btn btn-view-nav"
|
||||
ng-class="{'active': (isSheriffPanelShowing)}"
|
||||
ng-click="isSheriffPanelShowing=!isSheriffPanelShowing"><span>Sheriffing</span>
|
||||
ng-click="setSheriffPanelShowing(!isSheriffPanelShowing)"><span>Sheriffing</span>
|
||||
<i class="glyphicon glyphicon-chevron-down lightgray"
|
||||
ng-hide="isSheriffPanelShowing"></i>
|
||||
<i class="glyphicon glyphicon-chevron-up lightgray"
|
||||
|
@ -35,7 +35,7 @@
|
|||
</span>
|
||||
<span class="btn btn-view-nav"
|
||||
ng-class="{'active': (isFilterPanelShowing)}"
|
||||
ng-click="isFilterPanelShowing=!isFilterPanelShowing"><span>Filters</span>
|
||||
ng-click="setFilterPanelShowing(!isFilterPanelShowing)"><span>Filters</span>
|
||||
<i class="glyphicon glyphicon-chevron-down lightgray"
|
||||
ng-hide="isFilterPanelShowing"></i>
|
||||
<i class="glyphicon glyphicon-chevron-up lightgray"
|
||||
|
@ -46,7 +46,7 @@
|
|||
<!--TODO: change this condition to enable the settings panel-->
|
||||
<span ng-show="false" class="btn btn-view-nav"
|
||||
ng-class="{'active': (isSettingsPanelShowing)}"
|
||||
ng-click="isSettingsPanelShowing=!isSettingsPanelShowing"><span>Settings</span>
|
||||
ng-click="setSettingsPanelShowing(!isSettingsPanelShowing)"><span>Settings</span>
|
||||
<i class="glyphicon glyphicon-chevron-down lightgray"
|
||||
ng-hide="isSettingsPanelShowing"></i>
|
||||
<i class="glyphicon glyphicon-chevron-up lightgray"
|
||||
|
@ -54,7 +54,7 @@
|
|||
</span>
|
||||
<persona-buttons></persona-buttons>
|
||||
</span>
|
||||
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<ng-include class="watched-repo-navbar" src="'partials/thWatchedRepoNavPanel.html'" ng-show="locationPath==='jobs'">
|
||||
|
|
Загрузка…
Ссылка в новой задаче