Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
8d752fc5
Commit
8d752fc5
authored
Nov 26, 2014
by
csillag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the diffFromTargets method private
parent
b44864c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
annotation.coffee
h/static/scripts/directives/annotation.coffee
+7
-7
No files found.
h/static/scripts/directives/annotation.coffee
View file @
8d752fc5
...
...
@@ -128,12 +128,12 @@ AnnotationController = [
@action = 'view'
@editing = false
#
##
*
#
@ngdoc method
#
@name annotation.AnnotationController.diffFromTarget
#
@description Calculates the visual diff flags from the target
s
#
##
this.
diffFromTargets = (targets) ->
#
Calculates the visual diff flags from the targets
#
#
hasDiff is set to true is there are any targets with a difference
#
shouldShowDiff is set to true if there are some meaningful difference
s
#
- that is, more than just uppercase / lowercase
diffFromTargets = (targets) ->
hasDiff = targets.filter((t) -> t.diffHTML?).length > 0
shouldShowDiff = hasDiff and
targets.filter((t) -> t.diffHTML? and not t.diffCaseOnly).length > 0
...
...
@@ -227,7 +227,7 @@ AnnotationController = [
@annotation.tags = ({text} for text in (model.tags or []))
# Calculate the visual diff flags
diffFlags =
this.
diffFromTargets(@annotation.target)
diffFlags = diffFromTargets(@annotation.target)
@hasDiff = diffFlags.hasDiff
if @hasDiff
# We don't want to override the showDiff value manually changed
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment