BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1f8226e1
Commit
1f8226e1
authored
Apr 26, 2017
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check if description changed prior to binding TaskLists and calling renderGFM
parent
fee0c932
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
10 deletions
+23
-10
issue_title_description.vue
...assets/javascripts/issue_show/issue_title_description.vue
+23
-10
No files found.
app/assets/javascripts/issue_show/issue_title_description.vue
View file @
1f8226e1
...
@@ -30,8 +30,9 @@ export default {
...
@@ -30,8 +30,9 @@ export default {
return
{
return
{
poll
,
poll
,
timeoutId
:
null
,
timeoutId
:
null
,
title
:
null
,
title
:
'<span></span>'
,
description
:
null
,
description
:
'<span></span>'
,
descriptionChange
:
false
,
};
};
},
},
methods
:
{
methods
:
{
...
@@ -40,6 +41,9 @@ export default {
...
@@ -40,6 +41,9 @@ export default {
this
.
triggerAnimation
(
body
);
this
.
triggerAnimation
(
body
);
},
},
triggerAnimation
(
body
)
{
triggerAnimation
(
body
)
{
// always reset to false before checking the change
this
.
descriptionChange
=
false
;
const
{
title
,
description
}
=
body
;
const
{
title
,
description
}
=
body
;
this
.
descriptionText
=
body
.
description_text
;
this
.
descriptionText
=
body
.
description_text
;
...
@@ -57,7 +61,12 @@ export default {
...
@@ -57,7 +61,12 @@ export default {
if
(
!
noTitleChange
)
{
if
(
!
noTitleChange
)
{
elementsToVisualize
.
push
(
this
.
$el
.
querySelector
(
'.title'
));
elementsToVisualize
.
push
(
this
.
$el
.
querySelector
(
'.title'
));
}
else
if
(
!
noDescriptionChange
)
{
}
if
(
!
noDescriptionChange
)
{
// only change to true when we need to bind TaskLists the html of description
this
.
descriptionChange
=
true
;
elementsToVisualize
.
push
(
this
.
$el
.
querySelector
(
'.wiki'
));
elementsToVisualize
.
push
(
this
.
$el
.
querySelector
(
'.wiki'
));
}
}
...
@@ -100,15 +109,19 @@ export default {
...
@@ -100,15 +109,19 @@ export default {
});
});
},
},
updated
()
{
updated
()
{
const
tl
=
new
gl
.
TaskList
({
// if new html is injected (description changed) - bind TaskList and call renderGFM
dataType
:
'issue'
,
if
(
this
.
descriptionChange
)
{
fieldName
:
'description'
,
const
tl
=
new
gl
.
TaskList
({
selector
:
'.detail-page-description'
,
dataType
:
'issue'
,
});
fieldName
:
'description'
,
selector
:
'.detail-page-description'
,
});
$
(
this
.
$refs
[
'issue-content-container-gfm-entry'
]).
renderGFM
();
$
(
this
.
$refs
[
'issue-content-container-gfm-entry'
]).
renderGFM
();
return
tl
;
return
tl
;
}
return
null
;
},
},
};
};
</
script
>
</
script
>
...
...
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