BigW Consortium Gitlab

Commit 32e593c6 by Luke "Jared" Bennett Committed by Sean McGivern

review changes

parent ea1827c9
class @Diff
UNFOLD_COUNT = 20
constructor: ->
$('.files .diff-file').singleDiff()
$('.files .diff-file').singleFileDiff()
$(document).off('click', '.js-unfold')
$(document).on('click', '.js-unfold', (event) =>
......
......@@ -160,7 +160,7 @@ class @MergeRequestTabs
$('#diffs').html data.html
gl.utils.localTimeAgo($('.js-timeago', 'div#diffs'))
$('#diffs .js-syntax-highlight').syntaxHighlight()
$('#diffs .diff-file').singleDiff()
$('#diffs .diff-file').singleFileDiff()
@expandViewContainer() if @diffViewType() is 'parallel'
@diffsLoaded = true
@scrollToElement("#diffs")
......
class @SingleDiff
class @SingleFileDiff
WRAPPER = '<div class="diff-content diff-wrap-lines"></div>'
LOADING_HTML = '<i class="fa fa-spinner fa-spin"></i>'
......@@ -24,7 +24,6 @@ class @SingleDiff
$('.file-title > a', @file).on 'click', @toggleDiff
toggleDiff: (e) =>
e.preventDefault()
@isOpen = !@isOpen
if not @isOpen and not @hasError
@content.hide()
......@@ -49,7 +48,7 @@ class @SingleDiff
@collapsedContent.after(@content)
return
$.fn.singleDiff = ->
$.fn.singleFileDiff = ->
return @each ->
if not $.data this, 'singleDiff'
$.data this, 'singleDiff', new SingleDiff this
if not $.data this, 'singleFileDiff'
$.data this, 'singleFileDiff', new SingleFileDiff this
......@@ -16,6 +16,9 @@
font-weight: normal;
font-size: 16px;
line-height: 36px;
&.diff-collapsed {
cursor: pointer;
}
}
.row-content-block {
......
......@@ -189,7 +189,3 @@ span.idiff {
border-bottom-right-radius: 2px;
}
}
.nothing-here-block.diff-collapsed {
cursor: pointer;
}
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