Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0d78eeb2
Commit
0d78eeb2
authored
Aug 03, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci skip] Fix eslint errors
parent
b55ad844
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
25 additions
and
36 deletions
+25
-36
app/assets/javascripts/notes/components/issue_comment_form.vue
...ssets/javascripts/notes/components/issue_comment_form.vue
+2
-2
app/assets/javascripts/notes/components/issue_discussion.vue
app/assets/javascripts/notes/components/issue_discussion.vue
+1
-1
app/assets/javascripts/notes/components/issue_note.vue
app/assets/javascripts/notes/components/issue_note.vue
+2
-2
app/assets/javascripts/notes/components/issue_note_actions.vue
...ssets/javascripts/notes/components/issue_note_actions.vue
+1
-1
app/assets/javascripts/notes/components/issue_note_awards_list.vue
...s/javascripts/notes/components/issue_note_awards_list.vue
+4
-4
app/assets/javascripts/notes/components/issue_note_body.vue
app/assets/javascripts/notes/components/issue_note_body.vue
+1
-1
app/assets/javascripts/notes/components/issue_note_form.vue
app/assets/javascripts/notes/components/issue_note_form.vue
+4
-1
app/assets/javascripts/notes/components/issue_note_header.vue
...assets/javascripts/notes/components/issue_note_header.vue
+1
-2
app/assets/javascripts/notes/components/issue_note_signed_out_widget.vue
...scripts/notes/components/issue_note_signed_out_widget.vue
+5
-6
app/assets/javascripts/notes/components/issue_notes_app.vue
app/assets/javascripts/notes/components/issue_notes_app.vue
+4
-5
spec/javascripts/notes/components/issue_placeholder_note_spec.js
...vascripts/notes/components/issue_placeholder_note_spec.js
+0
-11
No files found.
app/assets/javascripts/notes/components/issue_comment_form.vue
View file @
0d78eeb2
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
'
getIssueData
'
,
'
getIssueData
'
,
]),
]),
isLoggedIn
()
{
isLoggedIn
()
{
return
this
.
getUserData
===
null
?
false
:
true
;
return
this
.
getUserData
!==
null
;
},
},
commentButtonTitle
()
{
commentButtonTitle
()
{
return
this
.
noteType
===
constants
.
COMMENT
?
'
Comment
'
:
'
Start discussion
'
;
return
this
.
noteType
===
constants
.
COMMENT
?
'
Comment
'
:
'
Start discussion
'
;
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
},
},
canSubmit
()
{
canSubmit
()
{
return
!
this
.
note
.
length
||
this
.
isSubmitting
;
return
!
this
.
note
.
length
||
this
.
isSubmitting
;
}
}
,
},
},
methods
:
{
methods
:
{
...
mapActions
([
...
mapActions
([
...
...
app/assets/javascripts/notes/components/issue_discussion.vue
View file @
0d78eeb2
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
},
},
newNotePath
()
{
newNotePath
()
{
return
this
.
getIssueData
.
create_note_path
;
return
this
.
getIssueData
.
create_note_path
;
}
}
,
},
},
methods
:
{
methods
:
{
...
mapActions
([
...
mapActions
([
...
...
app/assets/javascripts/notes/components/issue_note.vue
View file @
0d78eeb2
...
@@ -75,14 +75,14 @@
...
@@ -75,14 +75,14 @@
});
});
}
}
},
},
formUpdateHandler
(
note
)
{
formUpdateHandler
(
note
Text
)
{
const
data
=
{
const
data
=
{
endpoint
:
this
.
note
.
path
,
endpoint
:
this
.
note
.
path
,
note
:
{
note
:
{
full_data
:
true
,
full_data
:
true
,
target_type
:
'
issue
'
,
target_type
:
'
issue
'
,
target_id
:
this
.
note
.
noteable_id
,
target_id
:
this
.
note
.
noteable_id
,
note
:
{
note
:
note
},
note
:
{
note
:
note
Text
},
},
},
};
};
...
...
app/assets/javascripts/notes/components/issue_note_actions.vue
View file @
0d78eeb2
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
},
},
currentUserId
()
{
currentUserId
()
{
return
this
.
getUserDataByProp
(
'
id
'
);
return
this
.
getUserDataByProp
(
'
id
'
);
}
}
,
},
},
};
};
</
script
>
</
script
>
...
...
app/assets/javascripts/notes/components/issue_note_awards_list.vue
View file @
0d78eeb2
...
@@ -52,10 +52,10 @@
...
@@ -52,10 +52,10 @@
// We need to do this otherwise we will render the same emoji over and over again.
// We need to do this otherwise we will render the same emoji over and over again.
groupedAwards
()
{
groupedAwards
()
{
const
awards
=
this
.
awards
.
reduce
((
acc
,
award
)
=>
{
const
awards
=
this
.
awards
.
reduce
((
acc
,
award
)
=>
{
if
(
acc
.
hasOwnProperty
(
award
.
name
))
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
acc
,
award
.
name
))
{
acc
[
award
.
name
].
push
(
award
);
acc
[
award
.
name
].
push
(
award
);
}
else
{
}
else
{
Object
.
assign
(
acc
,
{
[
award
.
name
]:
[
award
]
});
Object
.
assign
(
acc
,
{
[
award
.
name
]:
[
award
]
});
}
}
return
acc
;
return
acc
;
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
endpoint
:
this
.
toggleAwardPath
,
endpoint
:
this
.
toggleAwardPath
,
noteId
:
this
.
noteId
,
noteId
:
this
.
noteId
,
// 100 emoji is a number. Callback for v-for click sends it as a string
// 100 emoji is a number. Callback for v-for click sends it as a string
awardName
:
awardName
===
"
100
"
?
100
:
awardName
,
awardName
:
awardName
===
'
100
'
?
100
:
awardName
,
};
};
this
.
toggleAwardRequest
(
data
)
this
.
toggleAwardRequest
(
data
)
...
...
app/assets/javascripts/notes/components/issue_note_body.vue
View file @
0d78eeb2
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
},
},
formCancelHandler
(
shouldConfirm
,
isDirty
)
{
formCancelHandler
(
shouldConfirm
,
isDirty
)
{
this
.
$emit
(
'
cancelFormEdition
'
,
shouldConfirm
,
isDirty
);
this
.
$emit
(
'
cancelFormEdition
'
,
shouldConfirm
,
isDirty
);
}
}
,
},
},
mounted
()
{
mounted
()
{
this
.
renderGFM
();
this
.
renderGFM
();
...
...
app/assets/javascripts/notes/components/issue_note_form.vue
View file @
0d78eeb2
...
@@ -72,7 +72,10 @@
...
@@ -72,7 +72,10 @@
},
},
editMyLastNote
()
{
editMyLastNote
()
{
if
(
this
.
note
===
''
)
{
if
(
this
.
note
===
''
)
{
const
lastNoteInDiscussion
=
this
.
getDiscussionLastNote
(
this
.
discussion
,
this
.
currentUserId
);
const
lastNoteInDiscussion
=
this
.
getDiscussionLastNote
(
this
.
discussion
,
this
.
currentUserId
,
);
if
(
lastNoteInDiscussion
)
{
if
(
lastNoteInDiscussion
)
{
eventHub
.
$emit
(
'
enterEditMode
'
,
{
eventHub
.
$emit
(
'
enterEditMode
'
,
{
...
...
app/assets/javascripts/notes/components/issue_note_header.vue
View file @
0d78eeb2
<
script
>
<
script
>
import
{
mapActions
}
from
'
vuex
'
;
import
{
mapActions
}
from
'
vuex
'
;
import
timeAgoTooltip
from
'
../../vue_shared/components/time_ago_tooltip.vue
'
;
import
timeAgoTooltip
from
'
../../vue_shared/components/time_ago_tooltip.vue
'
;
import
*
as
types
from
'
../stores/mutation_types
'
;
export
default
{
export
default
{
props
:
{
props
:
{
...
@@ -55,7 +54,7 @@
...
@@ -55,7 +54,7 @@
},
},
methods
:
{
methods
:
{
...
mapActions
([
...
mapActions
([
'
setTargetNoteHash
'
'
setTargetNoteHash
'
,
]),
]),
handleToggle
()
{
handleToggle
()
{
this
.
isExpanded
=
!
this
.
isExpanded
;
this
.
isExpanded
=
!
this
.
isExpanded
;
...
...
app/assets/javascripts/notes/components/issue_note_signed_out_widget.vue
View file @
0d78eeb2
...
@@ -5,16 +5,15 @@
...
@@ -5,16 +5,15 @@
name
:
'
singInLinksNotes
'
,
name
:
'
singInLinksNotes
'
,
computed
:
{
computed
:
{
...
mapGetters
([
...
mapGetters
([
'
getNotesDataByProp
'
'
getNotesDataByProp
'
,
]),
]),
registerLink
()
{
registerLink
()
{
return
this
.
getNotesDataByProp
(
'
registerPath
'
)
return
this
.
getNotesDataByProp
(
'
registerPath
'
);
},
},
signInLink
(){
signInLink
()
{
return
this
.
getNotesDataByProp
(
'
newSessionPath
'
);
return
this
.
getNotesDataByProp
(
'
newSessionPath
'
);
}
}
,
}
}
,
};
};
</
script
>
</
script
>
...
...
app/assets/javascripts/notes/components/issue_notes_app.vue
View file @
0d78eeb2
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
userData
:
{
userData
:
{
type
:
Object
,
type
:
Object
,
required
:
false
,
required
:
false
,
default
:
{}
default
:
{}
,
},
},
},
},
store
,
store
,
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
this
.
checkLocationHash
();
this
.
checkLocationHash
();
});
});
})
})
.
catch
((
error
)
=>
Flash
(
'
Something went wrong while fetching issue comments. Please try again.
'
));
.
catch
(()
=>
Flash
(
'
Something went wrong while fetching issue comments. Please try again.
'
));
},
},
initPolling
()
{
initPolling
()
{
this
.
setLastFetchedAt
(
this
.
getNotesDataByProp
(
'
lastFetchedAt
'
));
this
.
setLastFetchedAt
(
this
.
getNotesDataByProp
(
'
lastFetchedAt
'
));
...
@@ -99,8 +99,7 @@
...
@@ -99,8 +99,7 @@
bindEventHubListeners
()
{
bindEventHubListeners
()
{
this
.
$el
.
parentElement
.
addEventListener
(
'
toggleAward
'
,
(
event
)
=>
{
this
.
$el
.
parentElement
.
addEventListener
(
'
toggleAward
'
,
(
event
)
=>
{
const
{
awardName
,
noteId
}
=
event
.
detail
;
const
{
awardName
,
noteId
}
=
event
.
detail
;
this
.
actionToggleAward
({
awardName
,
noteId
})
this
.
actionToggleAward
({
awardName
,
noteId
});
});
});
// JQuery is needed here because it is a custom event being dispatched with jQuery.
// JQuery is needed here because it is a custom event being dispatched with jQuery.
...
@@ -121,7 +120,7 @@
...
@@ -121,7 +120,7 @@
created
()
{
created
()
{
this
.
setNotesData
(
this
.
notesData
);
this
.
setNotesData
(
this
.
notesData
);
this
.
setIssueData
(
this
.
issueData
);
this
.
setIssueData
(
this
.
issueData
);
this
.
setUserData
(
this
.
userData
)
this
.
setUserData
(
this
.
userData
)
;
},
},
mounted
()
{
mounted
()
{
this
.
fetchNotes
();
this
.
fetchNotes
();
...
...
spec/javascripts/notes/components/issue_placeholder_note_spec.js
View file @
0d78eeb2
import
Vue
from
'
vue
'
;
import
placeholderNote
from
'
~/notes/components/issue_placeholder_note.vue
'
;
describe
(
'
issue placeholder system note component
'
,
()
=>
{
describe
(
'
issue placeholder system note component
'
,
()
=>
{
let
mountComponent
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
const
PlaceholderNote
=
Vue
.
extend
(
placeholderNote
);
mountComponent
=
props
=>
new
PlaceholderNote
({
propsData
:
{
note
:
props
,
},
}).
$mount
();
});
});
describe
(
'
user information
'
,
()
=>
{
describe
(
'
user information
'
,
()
=>
{
...
...
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