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
15b8749b
Commit
15b8749b
authored
Dec 19, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix eslint
parent
a216d424
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
19 deletions
+8
-19
app/assets/javascripts/issuable/related_issues/components/issue_item.vue
...scripts/issuable/related_issues/components/issue_item.vue
+0
-1
app/assets/javascripts/issuable/related_issues/components/issue_token.vue
...cripts/issuable/related_issues/components/issue_token.vue
+0
-2
app/assets/javascripts/issuable/related_issues/components/related_issues_block.vue
...suable/related_issues/components/related_issues_block.vue
+1
-0
app/assets/javascripts/issuable/related_issues/components/related_issues_root.vue
...ssuable/related_issues/components/related_issues_root.vue
+5
-13
app/assets/javascripts/issuable/related_issues/services/related_issues_service.js
...ssuable/related_issues/services/related_issues_service.js
+2
-3
No files found.
app/assets/javascripts/issuable/related_issues/components/issue_item.vue
View file @
15b8749b
<
script
>
import
eventHub
from
'
../event_hub
'
;
import
relatedIssueMixin
from
'
../mixins/related_issues_mixin
'
;
export
default
{
...
...
app/assets/javascripts/issuable/related_issues/components/issue_token.vue
View file @
15b8749b
<
script
>
import
eventHub
from
'
../event_hub
'
;
import
tooltip
from
'
../../../vue_shared/directives/tooltip
'
;
import
relatedIssueMixin
from
'
../mixins/related_issues_mixin
'
;
export
default
{
...
...
app/assets/javascripts/issuable/related_issues/components/related_issues_block.vue
View file @
15b8749b
<
script
>
import
Sortable
from
'
vendor/Sortable
'
;
import
loadingIcon
from
'
~/vue_shared/components/loading_icon.vue
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
eventHub
from
'
../event_hub
'
;
...
...
app/assets/javascripts/issuable/related_issues/components/related_issues_root.vue
View file @
15b8749b
...
...
@@ -34,7 +34,6 @@ const SPACE_FACTOR = 1;
export
default
{
name
:
'
RelatedIssuesRoot
'
,
props
:
{
endpoint
:
{
type
:
String
,
...
...
@@ -66,7 +65,6 @@ export default {
default
:
true
,
},
},
data
()
{
this
.
store
=
new
RelatedIssuesStore
();
...
...
@@ -78,24 +76,21 @@ export default {
inputValue
:
''
,
};
},
components
:
{
relatedIssuesBlock
:
RelatedIssuesBlock
,
},
computed
:
{
autoCompleteSources
()
{
if
(
!
this
.
allowAutoComplete
)
return
{};
return
gl
.
GfmAutoComplete
&&
gl
.
GfmAutoComplete
.
dataSources
;
},
},
methods
:
{
onRelatedIssueRemoveRequest
(
idToRemove
)
{
const
issueToRemove
=
_
.
find
(
this
.
state
.
relatedIssues
,
issue
=>
issue
.
id
===
idToRemove
);
if
(
issueToRemove
)
{
this
.
service
.
removeRelatedIssu
e
(
issueToRemove
.
relation_path
)
RelatedIssuesService
.
remov
e
(
issueToRemove
.
relation_path
)
.
then
(
res
=>
res
.
json
())
.
then
((
data
)
=>
{
this
.
store
.
setRelatedIssues
(
data
.
issues
);
...
...
@@ -161,16 +156,15 @@ export default {
});
},
saveIssueOrder
({
issueId
,
newOrder
=
1
})
{
const
issue
=
_
.
find
(
this
.
state
.
relatedIssues
,
issue
=>
issue
.
id
===
issueId
);
const
issue
ToReorder
=
_
.
find
(
this
.
state
.
relatedIssues
,
issue
=>
issue
.
id
===
issueId
);
if
(
issue
)
{
this
.
service
.
saveRelatedIssu
eOrder
({
endpoint
:
issue
.
relation_path
,
if
(
issue
ToReorder
)
{
RelatedIssuesService
.
sav
eOrder
({
endpoint
:
issue
ToReorder
.
relation_path
,
position
:
newOrder
,
});
}
},
onInput
(
newValue
,
caretPos
)
{
const
rawReferences
=
newValue
.
split
(
/
\s
/
);
...
...
@@ -210,7 +204,6 @@ export default {
this
.
inputValue
=
''
;
},
},
created
()
{
eventHub
.
$on
(
'
relatedIssue-removeRequest
'
,
this
.
onRelatedIssueRemoveRequest
);
eventHub
.
$on
(
'
toggleAddRelatedIssuesForm
'
,
this
.
onToggleAddRelatedIssuesForm
);
...
...
@@ -223,7 +216,6 @@ export default {
this
.
service
=
new
RelatedIssuesService
(
this
.
endpoint
);
this
.
fetchRelatedIssues
();
},
beforeDestroy
()
{
eventHub
.
$off
(
'
relatedIssue-removeRequest
'
,
this
.
onRelatedIssueRemoveRequest
);
eventHub
.
$off
(
'
toggleAddRelatedIssuesForm
'
,
this
.
onToggleAddRelatedIssuesForm
);
...
...
app/assets/javascripts/issuable/related_issues/services/related_issues_service.js
View file @
15b8749b
...
...
@@ -18,7 +18,7 @@ class RelatedIssuesService {
});
}
s
aveRelatedIssu
eOrder
({
endpoint
,
position
})
{
s
tatic
sav
eOrder
({
endpoint
,
position
})
{
return
Vue
.
http
.
put
(
endpoint
,
{
epic
:
{
position
,
...
...
@@ -26,8 +26,7 @@ class RelatedIssuesService {
});
}
// eslint-disable-next-line class-methods-use-this
removeRelatedIssue
(
endpoint
)
{
static
remove
(
endpoint
)
{
return
Vue
.
http
.
delete
(
endpoint
);
}
}
...
...
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