component_viewer.header.toggle_duplications=Toggle duplications
component_viewer.header.toggle_scm=Toggle SCM
+component_viewer.scm.modified_lines=Modified Lines
+
component_viewer.transition.coverage=Covered By
component_viewer.transition.covers=Covers
component_viewer.transition.duplication=Duplicated By
events:
'click .js-scm-time-changes': 'scmTimeChanges'
+ 'click .js-filter-modified-lines': 'filterByModifiedLines'
+
scmTimeChanges: (e) ->
e.stopPropagation()
popup.on 'change', (period) => @main.enablePeriod period
+ filterByModifiedLines: (e) ->
+ @header.filterLines e, 'filterByModifiedLines'
+ @state.set 'activeHeaderItem', '.js-filter-modified-lines'
+
+
serializeData: ->
_.extend super, period: @state.get('period')?.toJSON()
$.when(@requestMeasures(@key, period?.get('key')), @requestIssuesPeriod(@key, period?.get('key')), @requestSCM(@key)).done =>
if activeHeaderItem?
@state.set 'activeHeaderItem', activeHeaderItem
- @headerView.render()
- else @filterBySCM()
+ @headerView.render()
addTransition: (transition, options) ->
@sourceView.render()
+ filterByModifiedLines: ->
+ @filterBySCM()
+
+
filterBySCM: ->
requests = [@requestSCM(@key)]
if @settings.get('issues') && !@state.get('hasIssues')
@sourceView.addShowBlock scmBlockLine, line.lineNumber - 1
if predicate
@sourceView.addShowBlock scmBlockLine, _.size @source.get 'source'
- @sourceView.render()
\ No newline at end of file
+ @sourceView.render()
<a class="highlighted-link js-scm-time-changes">
{{#if period}}Δ {{period.label}}{{else}}<i class="icon-period"></i> {{t 'component_viewer.time_changes'}}{{/if}}
</a>
-</div>
\ No newline at end of file
+</div>
+
+<div class="component-viewer-header-expanded-bar-section">
+ <ul class="component-viewer-header-expanded-bar-section-list">
+ <li><a class="item js-filter-modified-lines">
+ <span>{{t 'component_viewer.scm.modified_lines'}}</span>
+ <i class="icon-chevron-right"></i>
+ </a></li>
+ </ul>
+</div>