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
Léo-Paul Géneau
gitlab-ce
Commits
61fa7b75
Commit
61fa7b75
authored
Jul 26, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes boards correctly
parent
c369ea6c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
13 deletions
+27
-13
app/assets/javascripts/boards/components/board.js.coffee
app/assets/javascripts/boards/components/board.js.coffee
+3
-1
app/assets/javascripts/boards/components/board_delete.js.coffee
...sets/javascripts/boards/components/board_delete.js.coffee
+6
-0
app/assets/javascripts/boards/components/board_list.js.coffee
...assets/javascripts/boards/components/board_list.js.coffee
+2
-0
app/assets/javascripts/boards/stores/boards_store.js.coffee
app/assets/javascripts/boards/stores/boards_store.js.coffee
+3
-0
app/assets/stylesheets/pages/boards.scss
app/assets/stylesheets/pages/boards.scss
+1
-0
app/views/projects/boards/components/_board.html.haml
app/views/projects/boards/components/_board.html.haml
+2
-2
vendor/assets/javascripts/clipboard.js
vendor/assets/javascripts/clipboard.js
+10
-10
No files found.
app/assets/javascripts/boards/components/board.js.coffee
View file @
61fa7b75
...
@@ -10,7 +10,7 @@ Board = Vue.extend
...
@@ -10,7 +10,7 @@ Board = Vue.extend
isPreset
:
->
isPreset
:
->
typeof
this
.
board
.
id
!=
'number'
typeof
this
.
board
.
id
!=
'number'
ready
:
->
ready
:
->
Sortable
.
create
this
.
$el
.
parentNode
,
this
.
sortable
=
Sortable
.
create
this
.
$el
.
parentNode
,
group
:
'boards'
group
:
'boards'
animation
:
150
animation
:
150
draggable
:
'.is-draggable'
draggable
:
'.is-draggable'
...
@@ -19,5 +19,7 @@ Board = Vue.extend
...
@@ -19,5 +19,7 @@ Board = Vue.extend
ghostClass
:
'is-ghost'
ghostClass
:
'is-ghost'
onUpdate
:
(
e
)
->
onUpdate
:
(
e
)
->
BoardsStore
.
moveBoard
(
e
.
oldIndex
+
1
,
e
.
newIndex
+
1
)
BoardsStore
.
moveBoard
(
e
.
oldIndex
+
1
,
e
.
newIndex
+
1
)
beforeDestroy
:
->
this
.
sortable
.
destroy
()
Vue
.
component
(
'board'
,
Board
)
Vue
.
component
(
'board'
,
Board
)
app/assets/javascripts/boards/components/board_delete.js.coffee
View file @
61fa7b75
BoardDelete
=
Vue
.
extend
BoardDelete
=
Vue
.
extend
props
:
props
:
boardId
:
Number
boardId
:
Number
methods
:
deleteBoard
:
->
$
(
this
.
$el
).
tooltip
(
'destroy'
)
if
confirm
(
'Are you sure you want to delete this list?'
)
BoardsStore
.
removeBoard
(
this
.
boardId
)
Vue
.
component
'board-delete'
,
BoardDelete
Vue
.
component
'board-delete'
,
BoardDelete
app/assets/javascripts/boards/components/board_list.js.coffee
View file @
61fa7b75
...
@@ -56,5 +56,7 @@ BoardList = Vue.extend
...
@@ -56,5 +56,7 @@ BoardList = Vue.extend
this
.
$els
.
list
.
onscroll
=
=>
this
.
$els
.
list
.
onscroll
=
=>
if
(
this
.
scrollTop
()
>
this
.
scrollHeight
()
-
this
.
scrollOffset
)
and
!
this
.
loadMore
if
(
this
.
scrollTop
()
>
this
.
scrollHeight
()
-
this
.
scrollOffset
)
and
!
this
.
loadMore
this
.
loadFromLastId
()
this
.
loadFromLastId
()
beforeDestroy
:
->
this
.
sortable
.
destroy
()
Vue
.
component
(
'board-list'
,
BoardList
)
Vue
.
component
(
'board-list'
,
BoardList
)
app/assets/javascripts/boards/stores/boards_store.js.coffee
View file @
61fa7b75
...
@@ -6,6 +6,9 @@
...
@@ -6,6 +6,9 @@
author
:
{}
author
:
{}
assignee
:
{}
assignee
:
{}
milestone
:
{}
milestone
:
{}
removeBoard
:
(
id
)
->
BoardsStore
.
state
.
boards
=
_
.
reject
BoardsStore
.
state
.
boards
,
(
board
)
->
board
.
id
is
id
moveBoard
:
(
oldIndex
,
newIndex
)
->
moveBoard
:
(
oldIndex
,
newIndex
)
->
boardFrom
=
_
.
find
BoardsStore
.
state
.
boards
,
(
board
)
->
boardFrom
=
_
.
find
BoardsStore
.
state
.
boards
,
(
board
)
->
board
.
index
is
oldIndex
board
.
index
is
oldIndex
...
...
app/assets/stylesheets/pages/boards.scss
View file @
61fa7b75
...
@@ -110,6 +110,7 @@
...
@@ -110,6 +110,7 @@
color
:
$gray-darkest
;
color
:
$gray-darkest
;
background-color
:
transparent
;
background-color
:
transparent
;
border
:
0
;
border
:
0
;
outline
:
0
;
&
:hover
{
&
:hover
{
color
:
$gl-link-color
;
color
:
$gl-link-color
;
...
...
app/views/projects/boards/components/_board.html.haml
View file @
61fa7b75
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
{{ board.title }}
{{ board.title }}
%span
.pull-right
%span
.pull-right
{{ board.issues.length }}
{{ board.issues.length }}
%board-delete
{
"inline-template"
=>
true
,
"v-if"
=>
"!isPreset"
}
%board-delete
{
"inline-template"
=>
true
,
"v-if"
=>
"!isPreset"
,
":board-id"
=>
"board.id"
}
%button
.board-delete.has-tooltip.pull-right
{
type:
"button"
,
title:
"Delete board"
,
data:
{
placement:
"bottom"
}
}
%button
.board-delete.has-tooltip.pull-right
{
type:
"button"
,
title:
"Delete board"
,
data:
{
placement:
"bottom"
}
,
"@click"
=>
"deleteBoard"
}
%span
.sr-only
%span
.sr-only
Delete board
Delete board
=
icon
(
"trash"
)
=
icon
(
"trash"
)
...
...
vendor/assets/javascripts/clipboard.js
View file @
61fa7b75
...
@@ -154,12 +154,12 @@ function E () {
...
@@ -154,12 +154,12 @@ function E () {
E
.
prototype
=
{
E
.
prototype
=
{
on
:
function
(
name
,
callback
,
ctx
)
{
on
:
function
(
name
,
callback
,
ctx
)
{
var
e
=
this
.
e
||
(
this
.
e
=
{});
var
e
=
this
.
e
||
(
this
.
e
=
{});
(
e
[
name
]
||
(
e
[
name
]
=
[])).
push
({
(
e
[
name
]
||
(
e
[
name
]
=
[])).
push
({
fn
:
callback
,
fn
:
callback
,
ctx
:
ctx
ctx
:
ctx
});
});
return
this
;
return
this
;
},
},
...
@@ -169,7 +169,7 @@ E.prototype = {
...
@@ -169,7 +169,7 @@ E.prototype = {
self
.
off
(
name
,
fn
);
self
.
off
(
name
,
fn
);
callback
.
apply
(
ctx
,
arguments
);
callback
.
apply
(
ctx
,
arguments
);
};
};
return
this
.
on
(
name
,
fn
,
ctx
);
return
this
.
on
(
name
,
fn
,
ctx
);
},
},
...
@@ -178,11 +178,11 @@ E.prototype = {
...
@@ -178,11 +178,11 @@ E.prototype = {
var
evtArr
=
((
this
.
e
||
(
this
.
e
=
{}))[
name
]
||
[]).
slice
();
var
evtArr
=
((
this
.
e
||
(
this
.
e
=
{}))[
name
]
||
[]).
slice
();
var
i
=
0
;
var
i
=
0
;
var
len
=
evtArr
.
length
;
var
len
=
evtArr
.
length
;
for
(
i
;
i
<
len
;
i
++
)
{
for
(
i
;
i
<
len
;
i
++
)
{
evtArr
[
i
].
fn
.
apply
(
evtArr
[
i
].
ctx
,
data
);
evtArr
[
i
].
fn
.
apply
(
evtArr
[
i
].
ctx
,
data
);
}
}
return
this
;
return
this
;
},
},
...
@@ -190,21 +190,21 @@ E.prototype = {
...
@@ -190,21 +190,21 @@ E.prototype = {
var
e
=
this
.
e
||
(
this
.
e
=
{});
var
e
=
this
.
e
||
(
this
.
e
=
{});
var
evts
=
e
[
name
];
var
evts
=
e
[
name
];
var
liveEvents
=
[];
var
liveEvents
=
[];
if
(
evts
&&
callback
)
{
if
(
evts
&&
callback
)
{
for
(
var
i
=
0
,
len
=
evts
.
length
;
i
<
len
;
i
++
)
{
for
(
var
i
=
0
,
len
=
evts
.
length
;
i
<
len
;
i
++
)
{
if
(
evts
[
i
].
fn
!==
callback
)
liveEvents
.
push
(
evts
[
i
]);
if
(
evts
[
i
].
fn
!==
callback
)
liveEvents
.
push
(
evts
[
i
]);
}
}
}
}
// Remove event from queue to prevent memory leak
// Remove event from queue to prevent memory leak
// Suggested by https://github.com/lazd
// Suggested by https://github.com/lazd
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
(
liveEvents
.
length
)
(
liveEvents
.
length
)
?
e
[
name
]
=
liveEvents
?
e
[
name
]
=
liveEvents
:
delete
e
[
name
];
:
delete
e
[
name
];
return
this
;
return
this
;
}
}
};
};
...
@@ -618,4 +618,4 @@ exports['default'] = Clipboard;
...
@@ -618,4 +618,4 @@ exports['default'] = Clipboard;
module
.
exports
=
exports
[
'
default
'
];
module
.
exports
=
exports
[
'
default
'
];
},{
"
./clipboard-action
"
:
6
,
"
delegate-events
"
:
1
,
"
tiny-emitter
"
:
5
}]},{},[
7
])(
7
)
},{
"
./clipboard-action
"
:
6
,
"
delegate-events
"
:
1
,
"
tiny-emitter
"
:
5
}]},{},[
7
])(
7
)
});
});
\ No newline at end of file
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