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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
f175fb22
Commit
f175fb22
authored
Jun 03, 2020
by
Marvin Karegyeya
Committed by
Kushal Pandya
Jun 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove nextpage function logic from list model
parent
7843e90b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
11 deletions
+20
-11
app/assets/javascripts/boards/models/list.js
app/assets/javascripts/boards/models/list.js
+2
-10
app/assets/javascripts/boards/stores/boards_store.js
app/assets/javascripts/boards/stores/boards_store.js
+13
-1
changelogs/unreleased/Remove-nextPage-function-logic-from-listmodel.yml
...eleased/Remove-nextPage-function-logic-from-listmodel.yml
+5
-0
No files found.
app/assets/javascripts/boards/models/list.js
View file @
f175fb22
/* eslint-disable no-underscore-dangle, class-methods-use-this
, consistent-return
*/
/* eslint-disable no-underscore-dangle, class-methods-use-this */
import
ListIssue
from
'
ee_else_ce/boards/models/issue
'
;
import
{
__
}
from
'
~/locale
'
;
...
...
@@ -8,8 +8,6 @@ import flash from '~/flash';
import
boardsStore
from
'
../stores/boards_store
'
;
import
ListMilestone
from
'
./milestone
'
;
const
PER_PAGE
=
20
;
const
TYPES
=
{
backlog
:
{
isPreset
:
true
,
...
...
@@ -91,13 +89,7 @@ class List {
}
nextPage
()
{
if
(
this
.
issuesSize
>
this
.
issues
.
length
)
{
if
(
this
.
issues
.
length
/
PER_PAGE
>=
1
)
{
this
.
page
+=
1
;
}
return
this
.
getIssues
(
false
);
}
return
boardsStore
.
goToNextPage
(
this
);
}
getIssues
(
emptyIssues
=
true
)
{
...
...
app/assets/javascripts/boards/stores/boards_store.js
View file @
f175fb22
/* eslint-disable no-shadow, no-param-reassign */
/* eslint-disable no-shadow, no-param-reassign
,consistent-return
*/
/* global List */
import
$
from
'
jquery
'
;
...
...
@@ -22,6 +22,7 @@ import ListLabel from '../models/label';
import
ListAssignee
from
'
../models/assignee
'
;
import
ListMilestone
from
'
../models/milestone
'
;
const
PER_PAGE
=
20
;
const
boardsStore
=
{
disabled
:
false
,
timeTracking
:
{
...
...
@@ -137,6 +138,17 @@ const boardsStore = {
findIssueLabel
(
issue
,
findLabel
)
{
return
issue
.
labels
.
find
(
label
=>
label
.
id
===
findLabel
.
id
);
},
goToNextPage
(
list
)
{
if
(
list
.
issuesSize
>
list
.
issues
.
length
)
{
if
(
list
.
issues
.
length
/
PER_PAGE
>=
1
)
{
list
.
page
+=
1
;
}
return
list
.
getIssues
(
false
);
}
},
addListIssue
(
list
,
issue
,
listFrom
,
newIndex
)
{
let
moveBeforeId
=
null
;
let
moveAfterId
=
null
;
...
...
changelogs/unreleased/Remove-nextPage-function-logic-from-listmodel.yml
0 → 100644
View file @
f175fb22
---
title
:
Remove nextpage function logic from list model
merge_request
:
31904
author
:
nuwe1
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