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
87ca75a3
Commit
87ca75a3
authored
Oct 09, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move board delete to Service
parent
d5635118
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
app/assets/javascripts/boards/components/board_form.vue
app/assets/javascripts/boards/components/board_form.vue
+4
-8
app/assets/javascripts/boards/services/board_service.js
app/assets/javascripts/boards/services/board_service.js
+4
-0
app/views/shared/boards/_switcher.html.haml
app/views/shared/boards/_switcher.html.haml
+0
-1
No files found.
app/assets/javascripts/boards/components/board_form.vue
View file @
87ca75a3
...
...
@@ -15,10 +15,6 @@ const Store = gl.issueBoards.BoardsStore;
export
default
{
props
:
{
boardPath
:
{
type
:
String
,
required
:
true
,
},
canAdminBoard
:
{
type
:
Boolean
,
required
:
true
,
...
...
@@ -130,7 +126,7 @@ export default {
submit
()
{
if
(
this
.
isDeleteForm
)
{
this
.
submitDisabled
=
true
;
this
.
$http
.
delete
(
this
.
boardPath
)
gl
.
boardService
.
deleteBoard
(
this
.
currentBoard
)
.
then
(()
=>
{
gl
.
utils
.
visitUrl
(
Store
.
rootPath
);
})
...
...
@@ -153,11 +149,11 @@ export default {
Store
.
state
.
currentPage
=
''
;
},
resetFormState
()
{
if
(
this
.
currentBoard
&&
Object
.
keys
(
this
.
currentBoard
).
length
&&
this
.
isEditForm
)
{
Store
.
updateBoardConfig
(
this
.
currentBoard
);
}
else
if
(
this
.
isNewForm
)
{
if
(
this
.
isNewForm
)
{
// Clear the form when we open the "New board" modal
Store
.
updateBoardConfig
();
}
else
if
(
this
.
currentBoard
&&
Object
.
keys
(
this
.
currentBoard
).
length
)
{
Store
.
updateBoardConfig
(
this
.
currentBoard
);
}
},
},
...
...
app/assets/javascripts/boards/services/board_service.js
View file @
87ca75a3
...
...
@@ -46,6 +46,10 @@ class BoardService {
return
this
.
boards
.
save
({},
{
board
});
}
deleteBoard
({
id
})
{
return
this
.
boards
.
delete
({
id
});
}
all
()
{
return
this
.
lists
.
get
();
}
...
...
app/views/shared/boards/_switcher.html.haml
View file @
87ca75a3
...
...
@@ -36,7 +36,6 @@
Delete board
%board-form
{
":milestone-path"
=>
"milestonePath"
,
"board-path"
=>
current_board_path
(
board
),
"labels-path"
=>
labels_filter_path
(
true
),
"project-id"
=>
@project
&
.
id
,
"group-id"
=>
@group
&
.
id
,
...
...
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