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
3d14b768
Commit
3d14b768
authored
Feb 06, 2018
by
George Tsiolis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move BoardNewIssue vue component
parent
399ba520
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
50 deletions
+70
-50
app/assets/javascripts/boards/components/board_list.vue
app/assets/javascripts/boards/components/board_list.vue
+1
-1
app/assets/javascripts/boards/components/board_new_issue.vue
app/assets/javascripts/boards/components/board_new_issue.vue
+61
-48
app/assets/javascripts/boards/models/issue.js
app/assets/javascripts/boards/models/issue.js
+2
-0
ee/changelogs/unreleased/refactor-move-board-new-issue-vue-component.yml
...nreleased/refactor-move-board-new-issue-vue-component.yml
+5
-0
spec/javascripts/boards/board_new_issue_spec.js
spec/javascripts/boards/board_new_issue_spec.js
+1
-1
No files found.
app/assets/javascripts/boards/components/board_list.vue
View file @
3d14b768
<
script
>
import
Sortable
from
'
vendor/Sortable
'
;
import
boardNewIssue
from
'
./board_new_issue
'
;
import
boardNewIssue
from
'
./board_new_issue
.vue
'
;
import
boardCard
from
'
./board_card.vue
'
;
import
eventHub
from
'
../eventhub
'
;
import
loadingIcon
from
'
../../vue_shared/components/loading_icon.vue
'
;
...
...
app/assets/javascripts/boards/components/board_new_issue.
js
→
app/assets/javascripts/boards/components/board_new_issue.
vue
View file @
3d14b768
/* global ListIssue */
<
script
>
import
eventHub
from
'
../eventhub
'
;
import
ProjectSelect
from
'
./project_select.vue
'
;
import
ListIssue
from
'
../models/issue
'
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
export
default
{
name
:
'
BoardNewIssue
'
,
components
:
{
ProjectSelect
,
},
props
:
{
groupId
:
{
type
:
Number
,
...
...
@@ -24,9 +28,6 @@ export default {
selectedProject
:
{},
};
},
components
:
{
'
project-select
'
:
ProjectSelect
,
},
computed
:
{
disabled
()
{
if
(
this
.
groupId
)
{
...
...
@@ -35,6 +36,10 @@ export default {
return
this
.
title
===
''
;
},
},
mounted
()
{
this
.
$refs
.
input
.
focus
();
eventHub
.
$on
(
'
setSelectedProject
'
,
this
.
setSelectedProject
);
},
methods
:
{
submit
(
e
)
{
e
.
preventDefault
();
...
...
@@ -81,49 +86,57 @@ export default {
this
.
selectedProject
=
selectedProject
;
},
},
mounted
()
{
this
.
$refs
.
input
.
focus
();
eventHub
.
$on
(
'
setSelectedProject
'
,
this
.
setSelectedProject
);
},
template
:
`
<div class="board-new-issue-form">
<div class="card">
<form @submit="submit($event)">
<div class="flash-container"
v-if="error">
<div class="flash-alert">
An error occurred. Please try again.
</div>
</div>
<label class="label-light"
:for="list.id + '-title'">
Title
</label>
<input class="form-control"
type="text"
v-model="title"
ref="input"
autocomplete="off"
:id="list.id + '-title'" />
<project-select
v-if="groupId"
:groupId="groupId"
/>
<div class="clearfix prepend-top-10">
<button class="btn btn-success pull-left"
type="submit"
:disabled="disabled"
ref="submit-button">
Submit issue
</button>
<button class="btn btn-default pull-right"
type="button"
@click="cancel">
Cancel
</button>
};
</
script
>
<
template
>
<div
class=
"board-new-issue-form"
>
<div
class=
"card"
>
<form
@
submit=
"submit($event)"
>
<div
class=
"flash-container"
v-if=
"error"
>
<div
class=
"flash-alert"
>
An error occurred. Please try again.
</div>
</form>
</div>
</div>
<label
class=
"label-light"
:for=
"list.id + '-title'"
>
Title
</label>
<input
class=
"form-control"
type=
"text"
v-model=
"title"
ref=
"input"
autocomplete=
"off"
:id=
"list.id + '-title'"
/>
<project-select
v-if=
"groupId"
:group-id=
"groupId"
/>
<div
class=
"clearfix prepend-top-10"
>
<button
class=
"btn btn-success pull-left"
type=
"submit"
:disabled=
"disabled"
ref=
"submit-button"
>
Submit issue
</button>
<button
class=
"btn btn-default pull-right"
type=
"button"
@
click=
"cancel"
>
Cancel
</button>
</div>
</form>
</div>
`
,
};
</div>
</
template
>
app/assets/javascripts/boards/models/issue.js
View file @
3d14b768
...
...
@@ -122,3 +122,5 @@ class ListIssue {
}
window
.
ListIssue
=
ListIssue
;
export
default
ListIssue
;
ee/changelogs/unreleased/refactor-move-board-new-issue-vue-component.yml
0 → 100644
View file @
3d14b768
---
title
:
Move BoardNewIssue vue component
merge_request
:
16947
author
:
George Tsiolis
type
:
performance
spec/javascripts/boards/board_new_issue_spec.js
View file @
3d14b768
...
...
@@ -4,7 +4,7 @@
import
Vue
from
'
vue
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
boardNewIssue
from
'
~/boards/components/board_new_issue
'
;
import
boardNewIssue
from
'
~/boards/components/board_new_issue
.vue
'
;
import
'
~/boards/models/list
'
;
import
{
listObj
,
boardsMockInterceptor
,
mockBoardService
}
from
'
./mock_data
'
;
...
...
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