Permalink
Browse files

Merge branch 'hotfix/220-fixing-metadata-bugs'

  • Loading branch information...
Benjamin Müller
Benjamin Müller committed Jul 29, 2014
2 parents 45c9eda + 220901f commit c63dc364e36df61fd365cb11b4f952f80f270476
@@ -17,7 +17,7 @@
'use strict';
angular.module('scenarioo.directives').directive('scShowHideDetailsButton', function($window, localStorageService) {
angular.module('scenarioo.directives').directive('scShowHideDetailsButton', function($window, localStorageService, GlobalHotkeysService) {
var STEP_METADATA_VISIBLE = 'scenarioo-metadataVisible-';
function initMetadataVisibleFromLocalStorage(scope, key) {
@@ -40,6 +40,11 @@ angular.module('scenarioo.directives').directive('scShowHideDetailsButton', func
localStorageKey: '@'
},
templateUrl: 'views/showHideDetailsButton.html',
link: function(scope) {
GlobalHotkeysService.registerGlobalHotkey('d', function () {
scope.toggleShowingMetadata();
});
},
controller: function($scope) {
initMetadataVisibleFromLocalStorage($scope, $scope.localStorageKey);
$scope.toggleShowingMetadata = function() {
@@ -85,8 +85,10 @@ <h3>Shortcuts for navigating by keys in Scenarioo</h3>
</dl>
<dl class="dl-horizontal">
<dt>h</dt>
<dd>Home</dd>
<dt>h</dt>
<dd>Home</dd>
<dt>d</dt>
<dd>Toggle show meta data</dd>
<dt>c</dt>
<dd>Configure Scenarioo</dd>
<dt>m</dt>
@@ -43,7 +43,7 @@ <h2 class="sc-pageTitle">{{scenario.description}}</h2>
<!-- steps -->
<div class="row step-view">
<div ng-repeat="page in pagesAndSteps">
<div ng-repeat="step in page.steps | scFilterArray:searchFieldText" ng-show="$index == 0 || showAllStepsForPage($parent.$index)" class="sc-step-in-overview" ng-class="{'col-md-4': !showingMetaData, 'col-md-6': showingMetaData}">
<div ng-repeat="step in page.steps | scFilterArray:searchFieldText" ng-show="$index == 0 || showAllStepsForPage($parent.$index)" class="sc-step-in-overview" ng-class="{'col-md-4': !scenarioShowMetadata, 'col-md-6': scenarioShowMetadata}">
<h2>
<span class="sc-truncate" ng-if="$index == 0">
<span class="sc-no-truncate">
@@ -29,7 +29,7 @@ <h2 class="sc-pageTitle">{{useCase.description}}</h2>
</div>
</div>
<div class="col-lg-9">
<sc-show-hide-details-button linking-variable="useCaseShowMetadata" local-storage-key="main" ></sc-show-hide-details-button>
<sc-show-hide-details-button linking-variable="useCaseShowMetadata" local-storage-key="usecase" ></sc-show-hide-details-button>
</div>
</div>

0 comments on commit c63dc36

Please sign in to comment.