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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
decd7d95
Commit
decd7d95
authored
Jun 21, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moves tabs.js component into a vue file
parent
06df0128
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
94 deletions
+96
-94
app/assets/javascripts/boards/components/modal/header.js
app/assets/javascripts/boards/components/modal/header.js
+2
-2
app/assets/javascripts/boards/components/modal/tabs.js
app/assets/javascripts/boards/components/modal/tabs.js
+0
-46
app/assets/javascripts/boards/components/modal/tabs.vue
app/assets/javascripts/boards/components/modal/tabs.vue
+49
-0
app/assets/javascripts/boards/components/sidebar/remove_issue.vue
...ts/javascripts/boards/components/sidebar/remove_issue.vue
+45
-46
No files found.
app/assets/javascripts/boards/components/modal/header.js
View file @
decd7d95
import
Vue
from
'
vue
'
;
import
modalFilters
from
'
./filters
'
;
import
'
./tabs
'
;
import
modalTabs
from
'
./tabs.vue
'
;
import
ModalStore
from
'
../../stores/modal_store
'
;
import
modalMixin
from
'
../../mixins/modal_mixins
'
;
gl
.
issueBoards
.
ModalHeader
=
Vue
.
extend
({
components
:
{
'
modal-tabs
'
:
gl
.
issueBoards
.
M
odalTabs
,
m
odalTabs
,
modalFilters
,
},
mixins
:
[
modalMixin
],
...
...
app/assets/javascripts/boards/components/modal/tabs.js
deleted
100644 → 0
View file @
06df0128
import
Vue
from
'
vue
'
;
import
ModalStore
from
'
../../stores/modal_store
'
;
import
modalMixin
from
'
../../mixins/modal_mixins
'
;
gl
.
issueBoards
.
ModalTabs
=
Vue
.
extend
({
mixins
:
[
modalMixin
],
data
()
{
return
ModalStore
.
store
;
},
computed
:
{
selectedCount
()
{
return
ModalStore
.
selectedCount
();
},
},
destroyed
()
{
this
.
activeTab
=
'
all
'
;
},
template
:
`
<div class="top-area prepend-top-10 append-bottom-10">
<ul class="nav-links issues-state-filters">
<li :class="{ 'active': activeTab == 'all' }">
<a
href="#"
role="button"
@click.prevent="changeTab('all')">
Open issues
<span class="badge badge-pill">
{{ issuesCount }}
</span>
</a>
</li>
<li :class="{ 'active': activeTab == 'selected' }">
<a
href="#"
role="button"
@click.prevent="changeTab('selected')">
Selected issues
<span class="badge badge-pill">
{{ selectedCount }}
</span>
</a>
</li>
</ul>
</div>
`
,
});
app/assets/javascripts/boards/components/modal/tabs.vue
0 → 100644
View file @
decd7d95
<
script
>
import
ModalStore
from
'
../../stores/modal_store
'
;
import
modalMixin
from
'
../../mixins/modal_mixins
'
;
export
default
{
mixins
:
[
modalMixin
],
data
()
{
return
ModalStore
.
store
;
},
computed
:
{
selectedCount
()
{
return
ModalStore
.
selectedCount
();
},
},
destroyed
()
{
this
.
activeTab
=
'
all
'
;
},
};
</
script
>
<
template
>
<div
class=
"top-area prepend-top-10 append-bottom-10"
>
<ul
class=
"nav-links issues-state-filters"
>
<li
:class=
"
{ 'active': activeTab == 'all' }">
<a
href=
"#"
role=
"button"
@
click.prevent=
"changeTab('all')"
>
Open issues
<span
class=
"badge badge-pill"
>
{{
issuesCount
}}
</span>
</a>
</li>
<li
:class=
"
{ 'active': activeTab == 'selected' }">
<a
href=
"#"
role=
"button"
@
click.prevent=
"changeTab('selected')"
>
Selected issues
<span
class=
"badge badge-pill"
>
{{
selectedCount
}}
</span>
</a>
</li>
</ul>
</div>
</
template
>
app/assets/javascripts/boards/components/sidebar/remove_issue.vue
View file @
decd7d95
<
script
>
import
Flash
from
'
../../../flash
'
;
import
{
__
}
from
'
../../../locale
'
;
import
Vue
from
'
vue
'
;
import
Flash
from
'
../../../flash
'
;
import
{
__
}
from
'
../../../locale
'
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
export
default
{
export
default
{
props
:
{
issue
:
{
type
:
Object
,
...
...
@@ -26,9 +27,7 @@ export default {
const
lists
=
issue
.
getLists
();
const
listLabelIds
=
lists
.
map
(
list
=>
list
.
label
.
id
);
let
labelIds
=
issue
.
labels
.
map
(
label
=>
label
.
id
)
.
filter
(
id
=>
!
listLabelIds
.
includes
(
id
));
let
labelIds
=
issue
.
labels
.
map
(
label
=>
label
.
id
).
filter
(
id
=>
!
listLabelIds
.
includes
(
id
));
if
(
labelIds
.
length
===
0
)
{
labelIds
=
[
''
];
}
...
...
@@ -43,20 +42,20 @@ export default {
Vue
.
http
.
patch
(
this
.
updateUrl
,
data
).
catch
(()
=>
{
Flash
(
__
(
'
Failed to remove issue from board, please try again.
'
));
lists
.
forEach
((
list
)
=>
{
lists
.
forEach
(
list
=>
{
list
.
addIssue
(
issue
);
});
});
// Remove from the frontend store
lists
.
forEach
((
list
)
=>
{
lists
.
forEach
(
list
=>
{
list
.
removeIssue
(
issue
);
});
Store
.
detail
.
issue
=
{};
},
},
};
};
</
script
>
<
template
>
<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