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
Jérome Perrin
gitlab-ce
Commits
6718c188
Commit
6718c188
authored
Apr 05, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed order in Vue file
parent
3369232c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
77 deletions
+78
-77
app/assets/javascripts/boards/components/board_list.js
app/assets/javascripts/boards/components/board_list.js
+78
-77
No files found.
app/assets/javascripts/boards/components/board_list.js
View file @
6718c188
...
@@ -6,60 +6,7 @@ import eventHub from '../eventhub';
...
@@ -6,60 +6,7 @@ import eventHub from '../eventhub';
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
export
default
{
export
default
{
template
:
`
name
:
'
BoardList
'
,
<div class="board-list-component">
<div
class="board-list-loading text-center"
aria-label="Loading issues"
v-if="loading">
<i
class="fa fa-spinner fa-spin"
aria-hidden="true">
</i>
</div>
<board-new-issue
:list="list"
v-if="list.type !== 'closed' && showIssueForm"/>
<ul
class="board-list"
v-show="!loading"
ref="list"
:data-board="list.id"
:class="{ 'is-smaller': showIssueForm }">
<board-card
v-for="(issue, index) in issues"
ref="issue"
:index="index"
:list="list"
:issue="issue"
:issue-link-base="issueLinkBase"
:root-path="rootPath"
:disabled="disabled"
:key="issue.id" />
<li
class="board-list-count text-center"
v-if="showCount"
data-id="-1">
<i
class="fa fa-spinner fa-spin"
aria-label="Loading more issues"
aria-hidden="true"
v-show="list.loadingMore">
</i>
<span v-if="list.issues.length === list.issuesSize">
Showing all issues
</span>
<span v-else>
Showing {{ list.issues.length }} of {{ list.issuesSize }} issues
</span>
</li>
</ul>
</div>
`
,
components
:
{
boardCard
,
boardNewIssue
,
},
props
:
{
props
:
{
disabled
:
{
disabled
:
{
type
:
Boolean
,
type
:
Boolean
,
...
@@ -94,29 +41,9 @@ export default {
...
@@ -94,29 +41,9 @@ export default {
showIssueForm
:
false
,
showIssueForm
:
false
,
};
};
},
},
watch
:
{
components
:
{
filters
:
{
boardCard
,
handler
()
{
boardNewIssue
,
this
.
list
.
loadingMore
=
false
;
this
.
$refs
.
list
.
scrollTop
=
0
;
},
deep
:
true
,
},
issues
()
{
this
.
$nextTick
(()
=>
{
if
(
this
.
scrollHeight
()
<=
this
.
listHeight
()
&&
this
.
list
.
issuesSize
>
this
.
list
.
issues
.
length
)
{
this
.
list
.
page
+=
1
;
this
.
list
.
getIssues
(
false
);
}
if
(
this
.
scrollHeight
()
>
Math
.
ceil
(
this
.
listHeight
()))
{
this
.
showCount
=
true
;
}
else
{
this
.
showCount
=
false
;
}
});
},
},
},
methods
:
{
methods
:
{
listHeight
()
{
listHeight
()
{
...
@@ -147,6 +74,30 @@ export default {
...
@@ -147,6 +74,30 @@ export default {
}
}
},
},
},
},
watch
:
{
filters
:
{
handler
()
{
this
.
list
.
loadingMore
=
false
;
this
.
$refs
.
list
.
scrollTop
=
0
;
},
deep
:
true
,
},
issues
()
{
this
.
$nextTick
(()
=>
{
if
(
this
.
scrollHeight
()
<=
this
.
listHeight
()
&&
this
.
list
.
issuesSize
>
this
.
list
.
issues
.
length
)
{
this
.
list
.
page
+=
1
;
this
.
list
.
getIssues
(
false
);
}
if
(
this
.
scrollHeight
()
>
Math
.
ceil
(
this
.
listHeight
()))
{
this
.
showCount
=
true
;
}
else
{
this
.
showCount
=
false
;
}
});
},
},
created
()
{
created
()
{
eventHub
.
$on
(
`hide-issue-form-
${
this
.
list
.
id
}
`
,
this
.
toggleForm
);
eventHub
.
$on
(
`hide-issue-form-
${
this
.
list
.
id
}
`
,
this
.
toggleForm
);
},
},
...
@@ -193,4 +144,54 @@ export default {
...
@@ -193,4 +144,54 @@ export default {
eventHub
.
$off
(
`hide-issue-form-
${
this
.
list
.
id
}
`
,
this
.
toggleForm
);
eventHub
.
$off
(
`hide-issue-form-
${
this
.
list
.
id
}
`
,
this
.
toggleForm
);
this
.
$refs
.
list
.
removeEventListener
(
'
scroll
'
,
this
.
onScroll
);
this
.
$refs
.
list
.
removeEventListener
(
'
scroll
'
,
this
.
onScroll
);
},
},
template
:
`
<div class="board-list-component">
<div
class="board-list-loading text-center"
aria-label="Loading issues"
v-if="loading">
<i
class="fa fa-spinner fa-spin"
aria-hidden="true">
</i>
</div>
<board-new-issue
:list="list"
v-if="list.type !== 'closed' && showIssueForm"/>
<ul
class="board-list"
v-show="!loading"
ref="list"
:data-board="list.id"
:class="{ 'is-smaller': showIssueForm }">
<board-card
v-for="(issue, index) in issues"
ref="issue"
:index="index"
:list="list"
:issue="issue"
:issue-link-base="issueLinkBase"
:root-path="rootPath"
:disabled="disabled"
:key="issue.id" />
<li
class="board-list-count text-center"
v-if="showCount"
data-id="-1">
<i
class="fa fa-spinner fa-spin"
aria-label="Loading more issues"
aria-hidden="true"
v-show="list.loadingMore">
</i>
<span v-if="list.issues.length === list.issuesSize">
Showing all issues
</span>
<span v-else>
Showing {{ list.issues.length }} of {{ list.issuesSize }} issues
</span>
</li>
</ul>
</div>
`
,
};
};
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