Commit 8dc78c66 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Expand view container if diff mode is set to paralells

parent c943dae6
...@@ -146,6 +146,7 @@ class @MergeRequestTabs ...@@ -146,6 +146,7 @@ class @MergeRequestTabs
success: (data) => success: (data) =>
document.querySelector("div#diffs").innerHTML = data.html document.querySelector("div#diffs").innerHTML = data.html
$('div#diffs .js-syntax-highlight').syntaxHighlight() $('div#diffs .js-syntax-highlight').syntaxHighlight()
@expandViewContainer() if @diffViewMode() is 'parallel'
@diffsLoaded = true @diffsLoaded = true
@scrollToElement("#diffs") @scrollToElement("#diffs")
...@@ -177,3 +178,10 @@ class @MergeRequestTabs ...@@ -177,3 +178,10 @@ class @MergeRequestTabs
options = $.extend({}, defaults, options) options = $.extend({}, defaults, options)
$.ajax(options) $.ajax(options)
diffViewMode: ->
btnID = $('a[id$="-diff-btn"].active').attr('id')
btnID.substr(0, btnID.indexOf('-'))
expandViewContainer: ->
$('.container-fluid').removeClass('container-limited')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment