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
Boxiang Sun
gitlab-ce
Commits
97bbf0df
Commit
97bbf0df
authored
Oct 24, 2018
by
Martin Wortschack
Committed by
Mike Greiling
Oct 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Endless scroll loader is visible on user profile overview page"
parent
22ab1a82
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
7 deletions
+20
-7
app/assets/javascripts/activities.js
app/assets/javascripts/activities.js
+6
-4
app/assets/javascripts/pager.js
app/assets/javascripts/pager.js
+9
-2
app/assets/javascripts/pages/users/user_tabs.js
app/assets/javascripts/pages/users/user_tabs.js
+1
-1
changelogs/unreleased/53023-endless-scroll-loader-is-visible-on-user-profile-overview-page.yml
...croll-loader-is-visible-on-user-profile-overview-page.yml
+4
-0
No files found.
app/assets/javascripts/activities.js
View file @
97bbf0df
...
...
@@ -6,10 +6,12 @@ import Pager from './pager';
import
{
localTimeAgo
}
from
'
./lib/utils/datetime_utility
'
;
export
default
class
Activities
{
constructor
()
{
Pager
.
init
(
20
,
true
,
false
,
data
=>
data
,
this
.
updateTooltips
)
;
constructor
(
container
=
''
)
{
this
.
container
=
container
;
$
(
'
.event-filter-link
'
).
on
(
'
click
'
,
(
e
)
=>
{
Pager
.
init
(
20
,
true
,
false
,
data
=>
data
,
this
.
updateTooltips
,
this
.
container
);
$
(
'
.event-filter-link
'
).
on
(
'
click
'
,
e
=>
{
e
.
preventDefault
();
this
.
toggleFilter
(
e
.
currentTarget
);
this
.
reloadActivities
();
...
...
@@ -22,7 +24,7 @@ export default class Activities {
reloadActivities
()
{
$
(
'
.content_list
'
).
html
(
''
);
Pager
.
init
(
20
,
true
,
false
,
data
=>
data
,
this
.
updateTooltips
);
Pager
.
init
(
20
,
true
,
false
,
data
=>
data
,
this
.
updateTooltips
,
this
.
container
);
}
toggleFilter
(
sender
)
{
...
...
app/assets/javascripts/pager.js
View file @
97bbf0df
...
...
@@ -7,14 +7,21 @@ const ENDLESS_SCROLL_BOTTOM_PX = 400;
const
ENDLESS_SCROLL_FIRE_DELAY_MS
=
1000
;
export
default
{
init
(
limit
=
0
,
preload
=
false
,
disable
=
false
,
prepareData
=
$
.
noop
,
callback
=
$
.
noop
)
{
init
(
limit
=
0
,
preload
=
false
,
disable
=
false
,
prepareData
=
$
.
noop
,
callback
=
$
.
noop
,
container
=
''
,
)
{
this
.
url
=
$
(
'
.content_list
'
).
data
(
'
href
'
)
||
removeParams
([
'
limit
'
,
'
offset
'
]);
this
.
limit
=
limit
;
this
.
offset
=
parseInt
(
getParameterByName
(
'
offset
'
),
10
)
||
this
.
limit
;
this
.
disable
=
disable
;
this
.
prepareData
=
prepareData
;
this
.
callback
=
callback
;
this
.
loading
=
$
(
'
.loading
'
).
first
();
this
.
loading
=
$
(
`
${
container
}
.loading`
).
first
();
if
(
preload
)
{
this
.
offset
=
0
;
this
.
getOld
();
...
...
app/assets/javascripts/pages/users/user_tabs.js
View file @
97bbf0df
...
...
@@ -170,7 +170,7 @@ export default class UserTabs {
this
.
loadActivityCalendar
(
'
activity
'
);
// eslint-disable-next-line no-new
new
Activities
();
new
Activities
(
'
#activity
'
);
this
.
loaded
.
activity
=
true
;
}
...
...
changelogs/unreleased/53023-endless-scroll-loader-is-visible-on-user-profile-overview-page.yml
0 → 100644
View file @
97bbf0df
title
:
Adds container to pager to enable scoping
merge_request
:
22529
?
author
type
:
other
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