BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1041f5da
Commit
1041f5da
authored
Feb 26, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refactor/move-board-new-issue-vue-component' into 'master'
Move BoardNewIssue vue component See merge request gitlab-org/gitlab-ce!16947
parents
1553a34d
89c652b8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
41 deletions
+61
-41
board_list.vue
app/assets/javascripts/boards/components/board_list.vue
+1
-1
board_new_issue.vue
app/assets/javascripts/boards/components/board_new_issue.vue
+52
-39
issue.js
app/assets/javascripts/boards/models/issue.js
+2
-0
refactor-move-board-new-issue-vue-component.yml
...nreleased/refactor-move-board-new-issue-vue-component.yml
+5
-0
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 @
1041f5da
<
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 @
1041f5da
/* global ListIssue */
<
script
>
import
eventHub
from
'../eventhub'
;
import
ListIssue
from
'../models/issue'
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
...
...
@@ -17,6 +18,9 @@ export default {
error
:
false
,
};
},
mounted
()
{
this
.
$refs
.
input
.
focus
();
},
methods
:
{
submit
(
e
)
{
e
.
preventDefault
();
...
...
@@ -59,42 +63,51 @@ export default {
eventHub
.
$emit
(
`hide-issue-form-
${
this
.
list
.
id
}
`
);
},
},
mounted
()
{
this
.
$refs
.
input
.
focus
();
},
template
:
`
<div class="card board-new-issue-form">
<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'" />
<div class="clearfix prepend-top-10">
<button class="btn btn-success pull-left"
type="submit"
:disabled="title === ''"
ref="submit-button">
Submit issue
</button>
<button class="btn btn-default pull-right"
type="button"
@click="cancel">
Cancel
</button>
</div>
</form>
</div>
`
,
};
</
script
>
<
template
>
<div
class=
"card board-new-issue-form"
>
<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'"
/>
<div
class=
"clearfix prepend-top-10"
>
<button
class=
"btn btn-success pull-left"
type=
"submit"
:disabled=
"title === ''"
ref=
"submit-button"
>
Submit issue
</button>
<button
class=
"btn btn-default pull-right"
type=
"button"
@
click=
"cancel"
>
Cancel
</button>
</div>
</form>
</div>
</
template
>
app/assets/javascripts/boards/models/issue.js
View file @
1041f5da
...
...
@@ -110,3 +110,5 @@ class ListIssue {
}
window
.
ListIssue
=
ListIssue
;
export
default
ListIssue
;
changelogs/unreleased/refactor-move-board-new-issue-vue-component.yml
0 → 100644
View file @
1041f5da
---
title
:
Move BoardNewIssue vue component
merge_request
:
16947
author
:
George Tsiolis
type
:
performance
spec/javascripts/boards/board_new_issue_spec.js
View file @
1041f5da
...
...
@@ -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