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
d867b9a7
Commit
d867b9a7
authored
Sep 27, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix lints
parent
80f4fa87
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
40 deletions
+15
-40
app/assets/javascripts/boards/components/board_form.vue
app/assets/javascripts/boards/components/board_form.vue
+1
-21
app/assets/javascripts/boards/components/form_block.vue
app/assets/javascripts/boards/components/form_block.vue
+2
-2
app/assets/javascripts/boards/components/milestone_select.vue
...assets/javascripts/boards/components/milestone_select.vue
+10
-2
app/assets/javascripts/boards/services/board_service.js
app/assets/javascripts/boards/services/board_service.js
+0
-11
spec/javascripts/boards/milestone_select_spec.js
spec/javascripts/boards/milestone_select_spec.js
+2
-4
No files found.
app/assets/javascripts/boards/components/board_form.vue
View file @
d867b9a7
...
@@ -199,7 +199,7 @@ export default Vue.extend({
...
@@ -199,7 +199,7 @@ export default Vue.extend({
return
false
;
return
false
;
},
},
expandButtonText
()
{
expandButtonText
()
{
return
this
.
expanded
?
'
Collapse
'
:
'
Expand
'
return
this
.
expanded
?
'
Collapse
'
:
'
Expand
'
;
},
},
collapseScope
()
{
collapseScope
()
{
return
this
.
currentPage
===
'
new
'
;
return
this
.
currentPage
===
'
new
'
;
...
@@ -212,19 +212,6 @@ export default Vue.extend({
...
@@ -212,19 +212,6 @@ export default Vue.extend({
refreshPage
()
{
refreshPage
()
{
location
.
href
=
location
.
pathname
;
location
.
href
=
location
.
pathname
;
},
},
loadMilestones
(
e
)
{
this
.
milestoneDropdownOpen
=
!
this
.
milestoneDropdownOpen
;
BoardService
.
loadMilestones
.
call
(
this
);
if
(
this
.
milestoneDropdownOpen
)
{
this
.
$nextTick
(()
=>
{
const
milestoneDropdown
=
this
.
$refs
.
milestoneDropdown
;
const
rect
=
e
.
target
.
getBoundingClientRect
();
milestoneDropdown
.
style
.
width
=
`
${
rect
.
width
}
px`
;
});
}
},
submit
()
{
submit
()
{
gl
.
boardService
.
createBoard
(
this
.
board
)
gl
.
boardService
.
createBoard
(
this
.
board
)
.
then
(
resp
=>
resp
.
json
())
.
then
(
resp
=>
resp
.
json
())
...
@@ -252,13 +239,6 @@ export default Vue.extend({
...
@@ -252,13 +239,6 @@ export default Vue.extend({
cancel
()
{
cancel
()
{
Store
.
state
.
currentPage
=
''
;
Store
.
state
.
currentPage
=
''
;
},
},
selectMilestone
(
milestone
)
{
this
.
milestoneDropdownOpen
=
false
;
this
.
board
.
milestone_id
=
milestone
.
id
;
this
.
board
.
milestone
=
{
title
:
milestone
.
title
,
};
},
},
},
});
});
</
script
>
</
script
>
app/assets/javascripts/boards/components/form_block.vue
View file @
d867b9a7
...
@@ -41,7 +41,7 @@ export default {
...
@@ -41,7 +41,7 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
required
:
false
,
required
:
false
,
default
:
false
,
default
:
false
,
}
}
,
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -54,4 +54,4 @@ export default {
...
@@ -54,4 +54,4 @@ export default {
},
},
},
},
};
};
</
script
>
</
script
>
\ No newline at end of file
app/assets/javascripts/boards/components/milestone_select.vue
View file @
d867b9a7
...
@@ -84,7 +84,15 @@ export default {
...
@@ -84,7 +84,15 @@ export default {
};
};
},
},
mounted
()
{
mounted
()
{
BoardService
.
loadMilestones
.
call
(
this
).
then
(()
=>
this
.
loading
=
false
);
this
.
$http
.
get
(
this
.
milestonePath
)
.
then
(
resp
=>
resp
.
json
())
.
then
((
data
)
=>
{
this
.
milestones
=
data
;
this
.
loading
=
false
;
})
.
catch
(()
=>
{
this
.
loading
=
false
;
});
eventHub
.
$on
(
'
open
'
,
this
.
open
);
eventHub
.
$on
(
'
open
'
,
this
.
open
);
eventHub
.
$on
(
'
close
'
,
this
.
close
);
eventHub
.
$on
(
'
close
'
,
this
.
close
);
eventHub
.
$on
(
'
toggle
'
,
this
.
toggle
);
eventHub
.
$on
(
'
toggle
'
,
this
.
toggle
);
...
@@ -99,7 +107,7 @@ export default {
...
@@ -99,7 +107,7 @@ export default {
},
},
methods
:
{
methods
:
{
selectMilestone
(
milestone
)
{
selectMilestone
(
milestone
)
{
this
.
board
.
milestone
=
milestone
;
this
.
$set
(
this
.
board
,
'
milestone
'
,
milestone
)
;
this
.
$emit
(
'
input
'
,
milestone
.
id
);
this
.
$emit
(
'
input
'
,
milestone
.
id
);
this
.
close
();
this
.
close
();
},
},
...
...
app/assets/javascripts/boards/services/board_service.js
View file @
d867b9a7
...
@@ -99,17 +99,6 @@ class BoardService {
...
@@ -99,17 +99,6 @@ class BoardService {
return
this
.
issues
.
bulkUpdate
(
data
);
return
this
.
issues
.
bulkUpdate
(
data
);
}
}
static
loadMilestones
(
path
)
{
this
.
loading
=
true
;
return
this
.
$http
.
get
(
this
.
milestonePath
)
.
then
(
resp
=>
resp
.
json
())
.
then
((
data
)
=>
{
this
.
milestones
=
data
;
this
.
loading
=
false
;
});
}
}
}
window
.
BoardService
=
BoardService
;
window
.
BoardService
=
BoardService
;
spec/javascripts/boards/milestone_select_spec.js
View file @
d867b9a7
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
/* global mockBoardService */
/* global mockBoardService */
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
milestoneSelect
from
'
~/boards/components/milestone_select
'
;
import
MilestoneSelect
from
'
~/boards/components/milestone_select.vue
'
;
import
'
~/boards/services/board_service
'
;
import
'
~/boards/services/board_service
'
;
import
'
~/boards/stores/boards_store
'
;
import
'
~/boards/stores/boards_store
'
;
import
'
./mock_data
'
;
import
'
./mock_data
'
;
...
@@ -14,8 +14,6 @@ describe('Milestone select component', () => {
...
@@ -14,8 +14,6 @@ describe('Milestone select component', () => {
let
vm
;
let
vm
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
const
MilestoneComp
=
Vue
.
extend
(
milestoneSelect
);
Vue
.
http
.
interceptors
.
push
(
boardsMockInterceptor
);
Vue
.
http
.
interceptors
.
push
(
boardsMockInterceptor
);
gl
.
boardService
=
mockBoardService
();
gl
.
boardService
=
mockBoardService
();
gl
.
issueBoards
.
BoardsStore
.
create
();
gl
.
issueBoards
.
BoardsStore
.
create
();
...
@@ -24,7 +22,7 @@ describe('Milestone select component', () => {
...
@@ -24,7 +22,7 @@ describe('Milestone select component', () => {
vm
.
board
.
milestone_id
=
milestone
.
id
;
vm
.
board
.
milestone_id
=
milestone
.
id
;
});
});
vm
=
new
Milestone
Comp
({
vm
=
new
Milestone
Select
({
propsData
:
{
propsData
:
{
board
:
boardObj
,
board
:
boardObj
,
milestonePath
:
'
/test/issue-boards/milestones.json
'
,
milestonePath
:
'
/test/issue-boards/milestones.json
'
,
...
...
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