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
05c409d2
Commit
05c409d2
authored
May 04, 2017
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use nextTick and cache timeAgoEl
parent
7a37ada1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
issue_title_description.vue
...assets/javascripts/issue_show/issue_title_description.vue
+10
-10
No files found.
app/assets/javascripts/issue_show/issue_title_description.vue
View file @
05c409d2
<
script
>
import
Vue
from
'vue'
;
import
Visibility
from
'visibilityjs'
;
import
Poll
from
'./../lib/utils/poll'
;
import
Service
from
'./services/index'
;
...
...
@@ -37,13 +38,13 @@ export default {
return
{
poll
,
apiData
:
{},
timeoutId
:
null
,
title
:
null
,
titleText
:
''
,
tasks
:
'0 of 0'
,
description
:
null
,
descriptionText
:
''
,
descriptionChange
:
false
,
t
asks
:
'0 of 0'
,
t
imeAgoEl
:
$
(
'.issue_edited_ago'
)
,
titleEl
:
document
.
querySelector
(
'title'
),
};
},
...
...
@@ -86,18 +87,18 @@ export default {
this
.
titleEl
.
innerText
=
currentTabTitleScope
.
join
(
'·'
);
},
animate
(
title
,
description
,
elementsToVisualize
)
{
this
.
timeoutId
=
setTimeout
(()
=>
{
this
.
title
=
title
;
this
.
description
=
description
;
this
.
setTabTitle
();
this
.
title
=
title
;
this
.
description
=
description
;
this
.
setTabTitle
();
Vue
.
nextTick
(()
=>
{
elementsToVisualize
.
forEach
((
element
)
=>
{
if
(
element
)
{
element
.
classList
.
remove
(
'issue-realtime-pre-pulse'
);
element
.
classList
.
add
(
'issue-realtime-trigger-pulse'
);
}
});
}
,
0
);
});
},
triggerAnimation
()
{
// always reset to false before checking the change
...
...
@@ -124,10 +125,9 @@ export default {
},
updateEditedTimeAgo
()
{
const
toolTipTime
=
gl
.
utils
.
formatDate
(
this
.
apiData
.
updated_at
);
const
$timeAgoNode
=
$
(
'.issue_edited_ago'
);
$timeAgoNode
.
attr
(
'datetime'
,
this
.
apiData
.
updated_at
);
$timeAgoNode
.
attr
(
'data-original-title'
,
toolTipTime
);
this
.
timeAgoEl
.
attr
(
'datetime'
,
this
.
apiData
.
updated_at
);
this
.
timeAgoEl
.
attr
(
'data-original-title'
,
toolTipTime
);
},
},
computed
:
{
...
...
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