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
6ae82d57
Commit
6ae82d57
authored
May 24, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix local timeago on user dashboard
parent
d7e8adea
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
3 deletions
+22
-3
app/assets/javascripts/activities.js.coffee
app/assets/javascripts/activities.js.coffee
+4
-1
app/assets/javascripts/lib/datetime_utility.js.coffee
app/assets/javascripts/lib/datetime_utility.js.coffee
+8
-1
app/assets/javascripts/pager.js.coffee
app/assets/javascripts/pager.js.coffee
+2
-1
app/assets/javascripts/user_tabs.js.coffee
app/assets/javascripts/user_tabs.js.coffee
+3
-0
app/assets/stylesheets/framework/tw_bootstrap.scss
app/assets/stylesheets/framework/tw_bootstrap.scss
+5
-0
No files found.
app/assets/javascripts/activities.js.coffee
View file @
6ae82d57
class
@
Activities
constructor
:
->
Pager
.
init
20
,
true
Pager
.
init
20
,
true
,
false
,
@
fixTooltips
$
(
".event-filter-link"
).
on
"click"
,
(
event
)
=>
event
.
preventDefault
()
@
toggleFilter
(
$
(
event
.
currentTarget
))
@
reloadActivities
()
fixTooltips
:
->
gl
.
utils
.
localTimeAgo
(
$
(
'.js-timeago'
,
'#activity'
))
reloadActivities
:
->
$
(
".content_list"
).
html
''
Pager
.
init
20
,
true
...
...
app/assets/javascripts/lib/datetime_utility.js.coffee
View file @
6ae82d57
...
...
@@ -12,6 +12,13 @@
$el
.
attr
(
'title'
,
gl
.
utils
.
formatDate
(
$el
.
attr
(
'datetime'
)))
)
$timeagoEls
.
timeago
()
if
setTimeago
if
setTimeago
$timeagoEls
.
timeago
()
$timeagoEls
.
tooltip
(
'destroy'
)
# Recreate with custom template
$timeagoEls
.
tooltip
(
template
:
'<div class="tooltip local-timeago" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
)
)
window
app/assets/javascripts/pager.js.coffee
View file @
6ae82d57
@
Pager
=
init
:
(
@
limit
=
0
,
preload
,
@
disable
=
false
)
->
init
:
(
@
limit
=
0
,
preload
,
@
disable
=
false
,
@
callback
=
$
.
noop
)
->
@
loading
=
$
(
'.loading'
).
first
()
if
preload
...
...
@@ -19,6 +19,7 @@
@
loading
.
hide
()
success
:
(
data
)
->
Pager
.
append
(
data
.
count
,
data
.
html
)
Pager
.
callback
()
dataType
:
"json"
append
:
(
count
,
html
)
->
...
...
app/assets/javascripts/user_tabs.js.coffee
View file @
6ae82d57
...
...
@@ -122,6 +122,9 @@ class @UserTabs
@
parentEl
.
find
(
tabSelector
).
html
(
data
.
html
)
@
loaded
[
action
]
=
true
# Fix tooltips
gl
.
utils
.
localTimeAgo
(
$
(
'.js-timeago'
,
tabSelector
))
loadActivities
:
(
source
)
->
return
if
@
loaded
[
'activity'
]
is
true
...
...
app/assets/stylesheets/framework/tw_bootstrap.scss
View file @
6ae82d57
...
...
@@ -192,3 +192,8 @@
.text-info
:hover
{
color
:
$brand-info
;
}
// Prevent datetimes on tooltips to break into two lines
.local-timeago
{
white-space
:
nowrap
;
}
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