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
Léo-Paul Géneau
gitlab-ce
Commits
598b05df
Commit
598b05df
authored
May 10, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bunch of errors with invalid prop
Use v-model on textrea
parent
3313df58
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
19 deletions
+26
-19
app/assets/javascripts/issue_show/components/app.vue
app/assets/javascripts/issue_show/components/app.vue
+2
-1
app/assets/javascripts/issue_show/components/description.vue
app/assets/javascripts/issue_show/components/description.vue
+22
-16
app/assets/javascripts/issue_show/stores/index.js
app/assets/javascripts/issue_show/stores/index.js
+2
-2
No files found.
app/assets/javascripts/issue_show/components/app.vue
View file @
598b05df
...
...
@@ -37,7 +37,7 @@ export default {
},
data
()
{
const
store
=
new
Store
({
title
:
this
.
initialTitle
,
title
Html
:
this
.
initialTitle
,
descriptionHtml
:
this
.
initialDescriptionHtml
,
descriptionText
:
this
.
initialDescriptionText
,
});
...
...
@@ -86,6 +86,7 @@ export default {
:title-html=
"state.titleHtml"
:title-text=
"state.titleText"
/>
<description-component
v-if=
"state.descriptionHtml"
:can-update=
"canUpdate"
:description-html=
"state.descriptionHtml"
:description-text=
"state.descriptionText"
...
...
app/assets/javascripts/issue_show/components/description.vue
View file @
598b05df
...
...
@@ -43,16 +43,7 @@
.
attr
(
'
title
'
,
toolTipTime
)
.
tooltip
(
'
fixTitle
'
);
$
(
this
.
$refs
[
'
gfm-entry-content
'
]).
renderGFM
();
if
(
this
.
canUpdate
)
{
// eslint-disable-next-line no-new
new
gl
.
TaskList
({
dataType
:
'
issue
'
,
fieldName
:
'
description
'
,
selector
:
'
.detail-page-description
'
,
});
}
this
.
renderGFM
();
});
},
taskStatus
()
{
...
...
@@ -77,17 +68,32 @@
}
},
},
methods
:
{
renderGFM
()
{
$
(
this
.
$refs
[
'
gfm-entry-content
'
]).
renderGFM
();
if
(
this
.
canUpdate
)
{
// eslint-disable-next-line no-new
new
gl
.
TaskList
({
dataType
:
'
issue
'
,
fieldName
:
'
description
'
,
selector
:
'
.detail-page-description
'
,
});
}
},
},
mounted
()
{
this
.
renderGFM
();
},
};
</
script
>
<
template
>
<div
v-if=
"descriptionHtml"
class=
"description"
:class=
"
{
'js-task-list-container': canUpdate
}"
>
}">
<div
class=
"wiki"
:class=
"
{
...
...
@@ -95,12 +101,12 @@
'issue-realtime-trigger-pulse': pulseAnimation
}"
v-html="descriptionHtml"
ref="gfm-content"
>
ref="gfm-content">
</div>
<textarea
class=
"hidden js-task-list-field"
v-if=
"descriptionText"
>
{{
descriptionText
}}
</textarea>
v-model=
"descriptionText"
>
</textarea>
</div>
</
template
>
app/assets/javascripts/issue_show/stores/index.js
View file @
598b05df
export
default
class
Store
{
constructor
({
title
,
title
Html
,
descriptionHtml
,
descriptionText
,
})
{
this
.
state
=
{
titleHtml
:
title
,
titleHtml
,
titleText
:
''
,
descriptionHtml
,
descriptionText
,
...
...
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