Add acceskey that toggles details view.

pull/2922/head
mhirtie 10 years ago
parent 256e67193d
commit a232c0df49
  1. 5
      frontend/app/templates/work_packages.list.html
  2. 9
      frontend/app/work_packages/controllers/work-packages-list-controller.js

@ -38,6 +38,7 @@
{{ getActivationActionLabel(isDetailsViewActive()) + ' ' + I18n.t('js.button_list_view') }}
</label>
<button id="work-packages-list-view-button"
accesskey="{{ !isDetailsViewActive() ? '' : '8' }}"
class="button"
title="{{ getActivationActionLabel(isDetailsViewActive()) + ' ' + I18n.t('js.button_list_view') }}"
ng-click="closeDetailsView()"
@ -49,8 +50,10 @@
<label for="work-packages-details-view-button" class="hidden-for-sighted">
{{ getActivationActionLabel(!isDetailsViewActive()) + ' ' + I18n.t('js.button_details_view') }}
</label>
<button class="hide"
ng-click="openOverviewTab()"
accesskey="{{ isDetailsViewActive() ? '' : '8' }}"></button>
<button id="work-packages-details-view-button"
accesskey="8"
class="button"
title="{{ getActivationActionLabel(!isDetailsViewActive()) + ' ' + I18n.t('js.button_details_view') }}"
ng-class="{ active: isDetailsViewActive() }"

@ -270,6 +270,15 @@ module.exports = function($scope, $rootScope, $state, $location, latestTab,
});
};
$scope.openOverviewTab = function() {
$scope.settingUpPage = $state.go(
'work-packages.list.details.overview',
{
workPackageId: $scope.preselectedWorkPackageId,
'query_props': $location.search()['query_props']
});
};
$scope.closeDetailsView = function() {
// can't use query_props in $state.go since it's not specified
// in the config. if I put it into config, a reload will be triggered

Loading…
Cancel
Save