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
Tatuya Kamada
gitlab-ce
Commits
a09b850a
Commit
a09b850a
authored
Aug 09, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mobile improvements
parent
324067e2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
4 deletions
+43
-4
app/assets/javascripts/boards/components/board.js.es6
app/assets/javascripts/boards/components/board.js.es6
+5
-1
app/assets/javascripts/boards/components/board_list.js.es6
app/assets/javascripts/boards/components/board_list.js.es6
+5
-1
app/assets/javascripts/boards/mixins/sortable_default_options.js.es6
...javascripts/boards/mixins/sortable_default_options.js.es6
+2
-2
app/assets/stylesheets/pages/boards.scss
app/assets/stylesheets/pages/boards.scss
+29
-0
app/views/projects/boards/components/_board.html.haml
app/views/projects/boards/components/_board.html.haml
+1
-0
app/views/projects/boards/components/_card.html.haml
app/views/projects/boards/components/_card.html.haml
+1
-0
No files found.
app/assets/javascripts/boards/components/board.js.es6
View file @
a09b850a
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
}
}
},
},
ready: function () {
ready: function () {
cons
t options = _.extend({
le
t options = _.extend({
disabled: this.disabled,
disabled: this.disabled,
group: 'boards',
group: 'boards',
draggable: '.is-draggable',
draggable: '.is-draggable',
...
@@ -52,6 +52,10 @@
...
@@ -52,6 +52,10 @@
}
}
}, gl.boardSortableDefaultOptions);
}, gl.boardSortableDefaultOptions);
if (bp.getBreakpointSize() === 'sm' || bp.getBreakpointSize() === 'xs') {
options.handle = '.js-board-drag-handle';
}
Sortable.create(this.$el.parentNode, options);
Sortable.create(this.$el.parentNode, options);
}
}
});
});
...
...
app/assets/javascripts/boards/components/board_list.js.es6
View file @
a09b850a
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
},
},
ready: function () {
ready: function () {
const list = this.list;
const list = this.list;
cons
t options = _.extend({
le
t options = _.extend({
group: 'issues',
group: 'issues',
disabled: this.disabled,
disabled: this.disabled,
onAdd: (e) => {
onAdd: (e) => {
...
@@ -62,6 +62,10 @@
...
@@ -62,6 +62,10 @@
}
}
}, gl.boardSortableDefaultOptions);
}, gl.boardSortableDefaultOptions);
if (bp.getBreakpointSize() === 'sm' || bp.getBreakpointSize() === 'xs') {
options.handle = '.js-card-drag-handle';
}
Sortable.create(this.$els.list, options);
Sortable.create(this.$els.list, options);
// Scroll event on list to load more
// Scroll event on list to load more
...
...
app/assets/javascripts/boards/mixins/sortable_default_options.js.es6
View file @
a09b850a
(
function (w)
{
(
(w) =>
{
if (!window.gl) {
if (!window.gl) {
window.gl = {};
window.gl = {};
}
}
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
fallbackOnBody: true,
fallbackOnBody: true,
ghostClass: 'is-ghost',
ghostClass: 'is-ghost',
filter: '.has-tooltip',
filter: '.has-tooltip',
scrollSensitivity:
5
0,
scrollSensitivity:
10
0,
scrollSpeed: 10,
scrollSpeed: 10,
onStart: function () {
onStart: function () {
document.body.classList.add('is-dragging');
document.body.classList.add('is-dragging');
...
...
app/assets/stylesheets/pages/boards.scss
View file @
a09b850a
...
@@ -140,10 +140,19 @@
...
@@ -140,10 +140,19 @@
}
}
.board-title
{
.board-title
{
position
:
relative
;
margin
:
0
;
margin
:
0
;
padding
:
$gl-padding
;
padding
:
$gl-padding
;
font-size
:
1em
;
font-size
:
1em
;
border-bottom
:
1px
solid
$border-color
;
border-bottom
:
1px
solid
$border-color
;
.board-mobile-handle
{
position
:
relative
;
left
:
0
;
top
:
1px
;
margin-top
:
0
;
margin-right
:
5px
;
}
}
}
.board-search-container
{
.board-search-container
{
...
@@ -241,6 +250,7 @@
...
@@ -241,6 +250,7 @@
}
}
.card
{
.card
{
position
:
relative
;
width
:
100%
;
width
:
100%
;
padding
:
10px
$gl-padding
;
padding
:
10px
$gl-padding
;
background
:
#fff
;
background
:
#fff
;
...
@@ -248,6 +258,14 @@
...
@@ -248,6 +258,14 @@
box-shadow
:
0
1px
2px
rgba
(
186
,
186
,
186
,
0
.5
);
box-shadow
:
0
1px
2px
rgba
(
186
,
186
,
186
,
0
.5
);
list-style
:
none
;
list-style
:
none
;
&
.user-can-drag
{
padding-left
:
(
$gl-padding
*
2
);
@media
(
min-width
:
$screen-sm-min
)
{
padding-left
:
$gl-padding
;
}
}
&
:not
(
:last-child
)
{
&
:not
(
:last-child
)
{
margin-bottom
:
5px
;
margin-bottom
:
5px
;
}
}
...
@@ -262,6 +280,17 @@
...
@@ -262,6 +280,17 @@
}
}
}
}
.board-mobile-handle
{
position
:
absolute
;
left
:
10px
;
top
:
50%
;
margin-top
:
(
-15px
/
2
);
@media
(
min-width
:
$screen-sm-min
)
{
display
:
none
;
}
}
.card-title
{
.card-title
{
margin
:
0
;
margin
:
0
;
font-size
:
1em
;
font-size
:
1em
;
...
...
app/views/projects/boards/components/_board.html.haml
View file @
a09b850a
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
.board-inner
.board-inner
%header
.board-header
{
":class"
=>
"{ 'has-border': list.label }"
,
":style"
=>
"{ borderTopColor: (list.label ? list.label.color : null) }"
}
%header
.board-header
{
":class"
=>
"{ 'has-border': list.label }"
,
":style"
=>
"{ borderTopColor: (list.label ? list.label.color : null) }"
}
%h3
.board-title.js-board-handle
{
":class"
=>
"{ 'user-can-drag': (!disabled && !isPreset) }"
}
%h3
.board-title.js-board-handle
{
":class"
=>
"{ 'user-can-drag': (!disabled && !isPreset) }"
}
=
icon
(
"align-justify"
,
class:
"board-mobile-handle js-board-drag-handle"
,
"v-if"
=>
"(!disabled && !isPreset)"
)
{{ list.title }}
{{ list.title }}
%span
.pull-right
{
"v-if"
=>
"list.type !== 'blank'"
}
%span
.pull-right
{
"v-if"
=>
"list.type !== 'blank'"
}
{{ list.issues.length }}
{{ list.issues.length }}
...
...
app/views/projects/boards/components/_card.html.haml
View file @
a09b850a
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
"track-by"
=>
"id"
}
"track-by"
=>
"id"
}
%li
.card
{
":data-issue"
=>
"issue.id"
,
%li
.card
{
":data-issue"
=>
"issue.id"
,
":class"
=>
"{ 'user-can-drag': !disabled }"
}
":class"
=>
"{ 'user-can-drag': !disabled }"
}
=
icon
(
"align-justify"
,
class:
"board-mobile-handle js-card-drag-handle"
,
"v-if"
=>
"!disabled"
)
%h4
.card-title
%h4
.card-title
%a
{
":href"
=>
"issueLinkBase + '/' + issue.id"
,
%a
{
":href"
=>
"issueLinkBase + '/' + issue.id"
,
":title"
=>
"issue.title"
}
":title"
=>
"issue.title"
}
...
...
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