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
1c4c0342
Commit
1c4c0342
authored
Oct 03, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove some unused code
parent
84cf1644
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
30 deletions
+8
-30
app/assets/javascripts/boards/boards_bundle.js
app/assets/javascripts/boards/boards_bundle.js
+0
-2
app/assets/javascripts/boards/components/board_form.vue
app/assets/javascripts/boards/components/board_form.vue
+2
-24
app/assets/javascripts/boards/services/board_service.js
app/assets/javascripts/boards/services/board_service.js
+5
-2
app/assets/javascripts/boards/stores/boards_store.js
app/assets/javascripts/boards/stores/boards_store.js
+1
-2
No files found.
app/assets/javascripts/boards/boards_bundle.js
View file @
1c4c0342
...
...
@@ -72,7 +72,6 @@ $(() => {
weight
:
$boardApp
.
dataset
.
boardWeight
,
authorUsername
:
$boardApp
.
dataset
.
boardAuthorUsername
,
assigneeUsername
:
$boardApp
.
dataset
.
boardAssigneeUsername
,
labelIds
:
$boardApp
.
dataset
.
label_ids
||
[],
labels
:
JSON
.
parse
(
$boardApp
.
dataset
.
labels
||
[]),
defaultAvatar
:
$boardApp
.
dataset
.
defaultAvatar
,
cantEdit
:
[],
...
...
@@ -94,7 +93,6 @@ $(() => {
updateFilterPath
(
'
milestone_title
'
,
this
.
milestoneTitle
,
'
milestone
'
);
updateFilterPath
(
'
weight
'
,
this
.
weight
,
'
weight
'
);
updateFilterPath
(
'
author_username
'
,
this
.
authorUsername
,
'
author
'
);
updateFilterPath
(
'
assignee_username
'
,
this
.
assigneeUsername
,
'
assignee
'
);
const
filterPath
=
gl
.
issueBoards
.
BoardsStore
.
filter
.
path
.
split
(
'
&
'
);
...
...
app/assets/javascripts/boards/components/board_form.vue
View file @
1c4c0342
...
...
@@ -247,9 +247,6 @@ export default Vue.extend({
}
},
methods
:
{
refreshPage
()
{
location
.
href
=
location
.
pathname
;
},
submit
()
{
if
(
this
.
currentPage
===
'
delete
'
)
{
this
.
submitDisabled
=
true
;
...
...
@@ -265,21 +262,7 @@ export default Vue.extend({
gl
.
boardService
.
createBoard
(
this
.
board
)
.
then
(
resp
=>
resp
.
json
())
.
then
((
data
)
=>
{
if
(
this
.
currentBoard
&&
this
.
currentPage
!==
'
new
'
)
{
this
.
currentBoard
.
name
=
this
.
board
.
name
;
// We reload the page to make sure the store & state of the app are correct
this
.
refreshPage
();
// Enable the button thanks to our jQuery disabling it
$
(
this
.
$refs
.
submitBtn
).
enable
();
// Reset the selectors current page
Store
.
state
.
currentPage
=
''
;
Store
.
state
.
reload
=
true
;
}
else
if
(
this
.
currentPage
===
'
new
'
)
{
gl
.
utils
.
visitUrl
(
`
${
Store
.
rootPath
}
/
${
data
.
id
}
`
);
}
gl
.
utils
.
visitUrl
(
`
${
Store
.
rootPath
}
/
${
data
.
id
}
`
);
})
.
catch
(()
=>
{
Flash
(
'
Unable to save your changes. Please try again.
'
)
...
...
@@ -294,12 +277,7 @@ export default Vue.extend({
if
(
this
.
currentBoard
&&
Object
.
keys
(
this
.
currentBoard
).
length
&&
this
.
currentPage
!==
'
new
'
)
{
Store
.
updateBoardConfig
(
this
.
currentBoard
);
}
else
{
Store
.
updateBoardConfig
({
name
:
''
,
id
:
false
,
label_ids
:
[],
assignee
:
{},
});
Store
.
updateBoardConfig
();
}
if
(
!
this
.
board
.
labels
)
{
...
...
app/assets/javascripts/boards/services/board_service.js
View file @
1c4c0342
...
...
@@ -30,14 +30,17 @@ class BoardService {
}
createBoard
(
board
)
{
board
.
board
=
board
.
board
||
{};
if
(
board
.
labels
&&
board
.
labels
.
length
>
0
)
{
board
.
board
=
board
.
board
||
{};
board
.
board
.
label_ids
=
board
.
labels
.
map
(
b
=>
b
.
id
);
board
.
board
.
milestone_id
=
board
.
milestone_id
;
}
if
(
board
.
assignee
)
{
board
.
assignee_id
=
board
.
assignee
.
id
;
board
.
board
.
assignee_id
=
board
.
assignee
.
id
;
}
board
.
board
.
weight
=
board
.
weight
;
if
(
board
.
id
)
{
return
this
.
boards
.
update
({
id
:
board
.
id
},
board
);
}
...
...
app/assets/javascripts/boards/stores/boards_store.js
View file @
1c4c0342
...
...
@@ -53,14 +53,13 @@ gl.issueBoards.BoardsStore = {
this
.
state
.
reload
=
false
;
this
.
state
.
currentPage
=
page
;
},
updateBoardConfig
(
board
)
{
updateBoardConfig
(
board
=
{}
)
{
this
.
boardConfig
.
name
=
board
.
name
;
this
.
boardConfig
.
milestone
=
board
.
milestone
;
this
.
boardConfig
.
milestone_id
=
board
.
milestone_id
;
this
.
boardConfig
.
id
=
board
.
id
;
this
.
boardConfig
.
weight
=
board
.
weight
;
this
.
boardConfig
.
labels
=
board
.
labels
||
[];
Vue
.
set
(
this
.
boardConfig
,
'
label_ids
'
,
board
.
labels
.
map
(
b
=>
b
.
id
));
this
.
boardConfig
.
author_id
=
board
.
author_id
;
this
.
boardConfig
.
assignee_id
=
board
.
assignee_id
;
Vue
.
set
(
this
.
boardConfig
,
'
assignee
'
,
board
.
assignee
);
...
...
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