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
cd5e83b6
Commit
cd5e83b6
authored
Oct 19, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scroll board into view when clicking issue
Changed return statement instead of if Delete objects after issue is closed
parent
a0f6526f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
49 additions
and
15 deletions
+49
-15
boards_bundle.js.es6
app/assets/javascripts/boards/boards_bundle.js.es6
+7
-1
board.js.es6
app/assets/javascripts/boards/components/board.js.es6
+21
-0
board_card.js.es6
app/assets/javascripts/boards/components/board_card.js.es6
+1
-5
board_sidebar.js.es6
...assets/javascripts/boards/components/board_sidebar.js.es6
+13
-6
boards.scss
app/assets/stylesheets/pages/boards.scss
+4
-0
_sidebar.html.haml
app/views/projects/boards/components/_sidebar.html.haml
+1
-1
index.html.haml
app/views/projects/boards/index.html.haml
+1
-1
show.html.haml
app/views/projects/boards/show.html.haml
+1
-1
No files found.
app/assets/javascripts/boards/boards_bundle.js.es6
View file @
cd5e83b6
...
...
@@ -33,9 +33,15 @@ $(() => {
endpoint: $boardApp.dataset.endpoint,
boardId: $boardApp.dataset.boardId,
disabled: $boardApp.dataset.disabled === 'true',
issueLinkBase: $boardApp.dataset.issueLinkBase
issueLinkBase: $boardApp.dataset.issueLinkBase,
detailIssue: Store.detail
},
init: Store.create.bind(Store),
computed: {
detailIssueVisible () {
return Object.keys(this.detailIssue.issue).length;
}
},
created () {
gl.boardService = new BoardService(this.endpoint, this.boardId);
},
...
...
app/assets/javascripts/boards/components/board.js.es6
View file @
cd5e83b6
...
...
@@ -21,6 +21,7 @@
},
data () {
return {
detailIssue: Store.detail,
filters: Store.state.filters,
showIssueForm: false
};
...
...
@@ -32,6 +33,26 @@
this.list.getIssues(true);
},
deep: true
},
detailIssue: {
handler () {
if (!Object.keys(this.detailIssue.issue).length) return;
const issue = this.list.findIssue(this.detailIssue.issue.id);
if (issue) {
const boardsList = document.querySelectorAll('.boards-list')[0];
const right = (this.$el.offsetLeft + this.$el.offsetWidth) - boardsList.offsetWidth;
const left = boardsList.scrollLeft - this.$el.offsetLeft;
if (right - boardsList.scrollLeft > 0) {
boardsList.scrollLeft = right;
} else if (left > 0) {
boardsList.scrollLeft = this.$el.offsetLeft;
}
}
},
deep: true
}
},
methods: {
...
...
app/assets/javascripts/boards/components/board_card.js.es6
View file @
cd5e83b6
...
...
@@ -20,11 +20,7 @@
},
computed: {
issueDetailVisible () {
if (this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id) {
return true;
} else {
return false;
}
return this.detailIssue.issue && this.detailIssue.issue.id === this.issue.id;
}
},
methods: {
...
...
app/assets/javascripts/boards/components/board_sidebar.js.es6
View file @
cd5e83b6
...
...
@@ -29,15 +29,22 @@
issue () {
if (this.showSidebar) {
this.$nextTick(() => {
new IssuableContext(this.currentUser);
new MilestoneSelect();
new gl.DueDateSelectors();
new LabelsSelect();
new Sidebar();
new Subscription('.subscription');
this.issuableContext =
new IssuableContext(this.currentUser);
this.milestoneSelect =
new MilestoneSelect();
this.dueDateSelect =
new gl.DueDateSelectors();
this.labelsSelect =
new LabelsSelect();
this.sidebar =
new Sidebar();
this.subscription =
new Subscription('.subscription');
});
} else {
$('.right-sidebar').getNiceScroll().remove();
delete this.issuableContext;
delete this.milestoneSelect;
delete this.dueDateSelect;
delete this.labelsSelect;
delete this.sidebar;
delete this.subscription;
}
}
},
...
...
app/assets/stylesheets/pages/boards.scss
View file @
cd5e83b6
...
...
@@ -76,6 +76,10 @@ lex
height
:
475px
;
// Needed for PhantomJS
height
:
calc
(
100vh
-
220px
);
min-height
:
475px
;
&
.is-compact
{
width
:
calc
(
100%
-
290px
);
}
}
}
...
...
app/views/projects/boards/components/_sidebar.html.haml
View file @
cd5e83b6
...
...
@@ -12,7 +12,7 @@
{{ issue.id }}
%a
.gutter-toggle.pull-right
{
role:
"button"
,
href:
"#"
,
"@click"
=>
"closeSidebar"
,
"@click
.prevent
"
=>
"closeSidebar"
,
"aria-label"
=>
"Toggle sidebar"
}
=
icon
(
"times"
)
.js-issuable-update
...
...
app/views/projects/boards/index.html.haml
View file @
cd5e83b6
...
...
@@ -11,7 +11,7 @@
=
render
'shared/issuable/filter'
,
type: :boards
#board-app
.boards-app
{
"v-cloak"
=>
true
,
data:
board_data
}
.boards-list
.boards-list
{
":class"
=>
"{ 'is-compact': detailIssueVisible }"
}
.boards-app-loading.text-center
{
"v-if"
=>
"loading"
}
=
icon
(
"spinner spin"
)
=
render
"projects/boards/components/board"
...
...
app/views/projects/boards/show.html.haml
View file @
cd5e83b6
...
...
@@ -11,7 +11,7 @@
=
render
'shared/issuable/filter'
,
type: :boards
#board-app
.boards-app
{
"v-cloak"
=>
true
,
data:
board_data
}
.boards-list
.boards-list
{
":class"
=>
"{ 'is-compact': detailIssueVisible }"
}
.boards-app-loading.text-center
{
"v-if"
=>
"loading"
}
=
icon
(
"spinner spin"
)
=
render
"projects/boards/components/board"
...
...
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