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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
58b560fa
Commit
58b560fa
authored
May 05, 2017
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve discussion
parent
5fb98734
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
18 deletions
+12
-18
app/assets/javascripts/issue_show/index.js
app/assets/javascripts/issue_show/index.js
+2
-2
app/assets/javascripts/issue_show/issue_title_description.vue
...assets/javascripts/issue_show/issue_title_description.vue
+9
-9
app/views/projects/issues/_issue.html.haml
app/views/projects/issues/_issue.html.haml
+0
-4
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+1
-1
spec/javascripts/issue_show/issue_title_description_spec.js
spec/javascripts/issue_show/issue_title_description_spec.js
+0
-2
No files found.
app/assets/javascripts/issue_show/index.js
View file @
58b560fa
...
@@ -4,13 +4,13 @@ import '../vue_shared/vue_resource_interceptor';
...
@@ -4,13 +4,13 @@ import '../vue_shared/vue_resource_interceptor';
(()
=>
{
(()
=>
{
const
issueTitleData
=
document
.
querySelector
(
'
.issue-title-data
'
).
dataset
;
const
issueTitleData
=
document
.
querySelector
(
'
.issue-title-data
'
).
dataset
;
const
{
can
updateissue
,
endpoint
}
=
issueTitleData
;
const
{
can
UpdateTasksClass
,
endpoint
}
=
issueTitleData
;
const
vm
=
new
Vue
({
const
vm
=
new
Vue
({
el
:
'
.issue-title-entrypoint
'
,
el
:
'
.issue-title-entrypoint
'
,
render
:
createElement
=>
createElement
(
IssueTitle
,
{
render
:
createElement
=>
createElement
(
IssueTitle
,
{
props
:
{
props
:
{
canUpdate
Issue
:
canupdateissue
,
canUpdate
TasksClass
,
endpoint
,
endpoint
,
},
},
}),
}),
...
...
app/assets/javascripts/issue_show/issue_title_description.vue
View file @
58b560fa
...
@@ -10,7 +10,7 @@ export default {
...
@@ -10,7 +10,7 @@ export default {
required
:
true
,
required
:
true
,
type
:
String
,
type
:
String
,
},
},
canUpdate
Issue
:
{
canUpdate
TasksClass
:
{
required
:
true
,
required
:
true
,
type
:
String
,
type
:
String
,
},
},
...
@@ -112,19 +112,16 @@ export default {
...
@@ -112,19 +112,16 @@ export default {
},
},
},
},
computed
:
{
computed
:
{
descriptionClass
()
{
return
`description
${
this
.
canUpdateIssue
}
is-task-list-enabled`
;
},
titleAnimationCss
()
{
titleAnimationCss
()
{
return
{
return
{
'
title
issue-realtime-pre-pulse
'
:
this
.
titleFlag
.
pre
,
'
issue-realtime-pre-pulse
'
:
this
.
titleFlag
.
pre
,
'
title
issue-realtime-trigger-pulse
'
:
this
.
titleFlag
.
pulse
,
'
issue-realtime-trigger-pulse
'
:
this
.
titleFlag
.
pulse
,
};
};
},
},
descriptionAnimationCss
()
{
descriptionAnimationCss
()
{
return
{
return
{
'
wiki
issue-realtime-pre-pulse
'
:
this
.
descriptionFlag
.
pre
,
'
issue-realtime-pre-pulse
'
:
this
.
descriptionFlag
.
pre
,
'
wiki
issue-realtime-trigger-pulse
'
:
this
.
descriptionFlag
.
pulse
,
'
issue-realtime-trigger-pulse
'
:
this
.
descriptionFlag
.
pulse
,
};
};
},
},
},
},
...
@@ -165,16 +162,19 @@ export default {
...
@@ -165,16 +162,19 @@ export default {
<
template
>
<
template
>
<div>
<div>
<h2
<h2
class=
"title"
:class=
"titleAnimationCss"
:class=
"titleAnimationCss"
ref=
"issue-title"
ref=
"issue-title"
v-html=
"title"
v-html=
"title"
>
>
</h2>
</h2>
<div
<div
:class=
"descriptionClass"
class=
"description is-task-list-enabled"
:class=
"canUpdateTasksClass"
v-if=
"description"
v-if=
"description"
>
>
<div
<div
class=
"wiki"
:class=
"descriptionAnimationCss"
:class=
"descriptionAnimationCss"
v-html=
"description"
v-html=
"description"
ref=
"issue-content-container-gfm-entry"
ref=
"issue-content-container-gfm-entry"
...
...
app/views/projects/issues/_issue.html.haml
View file @
58b560fa
...
@@ -16,10 +16,6 @@
...
@@ -16,10 +16,6 @@
-
if
issue
.
assignee
-
if
issue
.
assignee
%li
%li
=
link_to_member
(
@project
,
issue
.
assignee
,
name:
false
,
title:
"Assigned to :name"
)
=
link_to_member
(
@project
,
issue
.
assignee
,
name:
false
,
title:
"Assigned to :name"
)
-
if
issue
.
tasks?
%span
.task-status
=
issue
.
task_status
=
render
'shared/issuable_meta_data'
,
issuable:
issue
=
render
'shared/issuable_meta_data'
,
issuable:
issue
...
...
app/views/projects/issues/show.html.haml
View file @
58b560fa
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
.issue-details.issuable-details
.issue-details.issuable-details
.detail-page-description.content-block
.detail-page-description.content-block
.issue-title-data.hidden
{
"data"
=>
{
"endpoint"
=>
rendered_title_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
),
.issue-title-data.hidden
{
"data"
=>
{
"endpoint"
=>
rendered_title_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
),
"can
UpdateIssue
"
=>
can?
(
current_user
,
:update_issue
,
@issue
)
?
'js-task-list-container'
:
''
,
"can
-update-tasks-class
"
=>
can?
(
current_user
,
:update_issue
,
@issue
)
?
'js-task-list-container'
:
''
,
}
}
}
}
.issue-title-entrypoint
.issue-title-entrypoint
...
...
spec/javascripts/issue_show/issue_title_description_spec.js
View file @
58b560fa
...
@@ -39,7 +39,6 @@ describe('Issue Title', () => {
...
@@ -39,7 +39,6 @@ describe('Issue Title', () => {
},
},
}).
$mount
();
}).
$mount
();
// need setTimeout because of api call/v-html
setTimeout
(()
=>
{
setTimeout
(()
=>
{
expect
(
document
.
querySelector
(
'
title
'
).
innerText
).
toContain
(
'
this is a title (#1)
'
);
expect
(
document
.
querySelector
(
'
title
'
).
innerText
).
toContain
(
'
this is a title (#1)
'
);
expect
(
issueShowComponent
.
$el
.
querySelector
(
'
.title
'
).
innerHTML
).
toContain
(
'
<p>this is a title</p>
'
);
expect
(
issueShowComponent
.
$el
.
querySelector
(
'
.title
'
).
innerHTML
).
toContain
(
'
<p>this is a title</p>
'
);
...
@@ -57,6 +56,5 @@ describe('Issue Title', () => {
...
@@ -57,6 +56,5 @@ describe('Issue Title', () => {
done
();
done
();
});
});
});
});
// 10ms is just long enough for the update hook to fire
});
});
});
});
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