review changes
This commit is contained in:
parent
ea1827c9a4
commit
32e593c663
|
@ -1,7 +1,7 @@
|
|||
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")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue