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
fd0dc53f
Commit
fd0dc53f
authored
Sep 26, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
start separating milestone and dropdown components
parent
778abce6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
54 deletions
+78
-54
app/assets/javascripts/boards/components/board_new_form.vue
app/assets/javascripts/boards/components/board_new_form.vue
+12
-19
app/assets/javascripts/boards/components/dropdown.vue
app/assets/javascripts/boards/components/dropdown.vue
+39
-0
app/assets/javascripts/boards/components/milestone_select.vue
...assets/javascripts/boards/components/milestone_select.vue
+11
-20
app/assets/javascripts/vue_shared/components/popup_dialog.vue
...assets/javascripts/vue_shared/components/popup_dialog.vue
+16
-15
No files found.
app/assets/javascripts/boards/components/board_new_form.vue
View file @
fd0dc53f
<
template
>
<popup-dialog
:title=
"title"
>
<!-- TODO: handle Delete button with btn-danger class and method delete to link_to current_board_path(board) -->
<popup-dialog
v-show=
"currentPage"
:title=
"title"
:primaryButtonLabel=
"buttonText"
@
toggle=
"cancel"
@
submit=
"submit"
>
<p
v-if=
"currentPage === 'delete'"
>
Are you sure you want to delete this board?
</p>
<form
v-else
@
submit=
"submit"
>
<div
class=
"append-bottom-20"
>
<label
class=
"label-light"
for=
"board-new-name"
>
...
...
@@ -31,11 +37,12 @@
</button>
</div>
<div
v-if=
"expand"
>
<p>
<p
class=
"light append-bottom-10"
>
Board scope affects which issues are displayed for anyone who visits this board
</p>
<!-- TODO: if current_board_parent.issue_board_milestone_available?(current_user) -->
<div
class=
"board-inner-container"
>
<input
type=
"hidden"
id=
"board-milestone"
...
...
@@ -46,24 +53,10 @@
:milestone-path=
"milestonePath"
:select-milestone=
"selectMilestone"
>
</board-milestone-select>
</div>
</div>
</form>
<template
slot=
"footer"
>
<!-- TODO: handle Delete button with btn-danger class and method delete to link_to current_board_path(board) -->
<button
class=
"btn btn-primary pull-left"
@
click=
"submit"
type=
"button"
>
{{
buttonText
}}
</button>
<button
class=
"btn btn-default pull-right"
type=
"button"
>
Cancel
</button>
</
template
>
</popup-dialog>
</
template
>
...
...
app/assets/javascripts/boards/components/dropdown.vue
0 → 100644
View file @
fd0dc53f
<
template
>
<div
class=
""
>
<div
class=
"media"
>
<label
class=
"media-body"
>
Milestone
</label>
<a
href=
"#"
data-dropdown-trigger=
"#milestone-dropdown"
ref=
"trigger"
>
Edit
</a>
</div>
<div
class=
"droplab-dropdown"
>
<div>
Current value
</div>
<ul
ref=
"list"
class=
"dropdown-menu"
>
<slot
name=
"items"
></slot>
</ul>
</div>
</div>
</
template
>
<
script
>
import
DropLab
from
'
~/droplab/drop_lab
'
;
export
default
{
props
:
{
},
data
()
{
return
{
loading
:
false
,
};
},
mounted
()
{
this
.
droplab
=
new
DropLab
();
this
.
droplab
.
init
(
this
.
$refs
.
trigger
,
this
.
$refs
.
list
);
},
};
</
script
>
app/assets/javascripts/boards/components/milestone_select.vue
View file @
fd0dc53f
<
template
>
<div
class=
"droplab-dropdown"
>
<div
class=
"media"
>
<label
class=
"media-body"
>
Milestone
</label>
<a
href=
"#"
data-dropdown-trigger=
"#milestone-dropdown"
ref=
"trigger"
>
Edit
</a>
</div>
<div>
{{
board
.
milestone
?
board
.
milestone
.
title
:
'
Milestone
'
}}
<ul
ref=
"list"
class=
"dropdown-menu"
>
<div>
<gl-dropdown>
<template
slot=
"items"
>
<li
v-for=
"milestone in extraMilestones"
:key=
"milestone.id"
...
...
@@ -21,7 +11,7 @@
@
click.prevent.stop=
"selectMilestone(milestone)"
>
<i
class=
"fa fa-check"
v-if=
"
board.milestone_id === milestone.id
"
></i>
v-if=
"
false
"
></i>
{{
milestone
.
title
}}
</a>
</li>
...
...
@@ -35,12 +25,12 @@
@
click.prevent.stop=
"selectMilestone(milestone)"
>
<i
class=
"fa fa-check"
v-if=
"
board.milestone_id === milestone.id
"
></i>
v-if=
"
false
"
></i>
{{
milestone
.
title
}}
</a>
</li>
</
ul
>
</
div
>
</
template
>
</
gl-dropdown
>
</div>
</template>
...
...
@@ -48,6 +38,7 @@
/* global BoardService */
import
DropLab
from
'
~/droplab/drop_lab
'
;
import
GlDropdown
from
'
./dropdown.vue
'
;
import
extraMilestones
from
'
../mixins/extra_milestones
'
;
export
default
{
...
...
@@ -72,11 +63,11 @@ export default {
extraMilestones
,
};
},
components
:
{
GlDropdown
,
},
mounted
()
{
BoardService
.
loadMilestones
.
call
(
this
);
this
.
droplab
=
new
DropLab
();
this
.
droplab
.
init
(
this
.
$refs
.
trigger
,
this
.
$refs
.
list
);
},
};
</
script
>
app/assets/javascripts/vue_shared/components/popup_dialog.vue
View file @
fd0dc53f
...
...
@@ -48,20 +48,21 @@ export default {
tabindex=
"-1"
>
<div
class=
"modal-dialog"
class=
"modal-dialog
modal-sm
"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<slot
name=
"header"
>
<button
type=
"button"
class=
"close"
<h4
class=
"modal-title pull-left"
>
{{
this
.
title
}}
</h4>
<button
type=
"button"
class=
"close pull-right"
@
click=
"close"
aria-label=
"Close"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
<h4
class=
"modal-title"
>
{{
this
.
title
}}
</h4>
</slot>
</div>
<div
class=
"modal-body"
>
...
...
@@ -69,22 +70,22 @@ export default {
<p>
{{
this
.
body
}}
</p>
</slot>
</div>
<div
class=
"modal-footer"
>
<slot
name=
"footer"
>
<button
type=
"button"
class=
"btn btn-default"
@
click=
"emitSubmit(false)"
>
Cancel
</button>
<slot
name=
"footer"
>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn"
class=
"btn
pull-left
"
:class=
"btnKindClass"
@
click=
"emitSubmit(true)"
>
{{
primaryButtonLabel
}}
</button>
</slot>
</div>
<button
type=
"button"
class=
"btn btn-default pull-right"
@
click=
"close"
>
Cancel
</button>
</div>
</slot>
</div>
</div>
</div>
...
...
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