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
fa6d7094
Commit
fa6d7094
authored
May 11, 2017
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Decorate server response objects
Set property defaults and match JS variable naming conventions
parent
8b2eaa60
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
app/assets/javascripts/groups/components/group_item.vue
app/assets/javascripts/groups/components/group_item.vue
+3
-3
app/assets/javascripts/groups/stores/groups_store.js
app/assets/javascripts/groups/stores/groups_store.js
+8
-3
No files found.
app/assets/javascripts/groups/components/group_item.vue
View file @
fa6d7094
...
@@ -10,7 +10,7 @@ export default {
...
@@ -10,7 +10,7 @@ export default {
},
},
methods
:
{
methods
:
{
toggleSubGroups
()
{
toggleSubGroups
()
{
if
(
!
this
.
group
.
subGroups
||
(
this
.
group
.
subGroups
&&
!
this
.
group
.
subGroups
.
length
)
)
{
if
(
!
this
.
group
.
hasSubgroups
)
{
return
;
return
;
}
}
...
@@ -22,7 +22,7 @@ export default {
...
@@ -22,7 +22,7 @@ export default {
<
template
>
<
template
>
<li
@
click=
"toggleSubGroups"
class=
"list-group-item"
>
<li
@
click=
"toggleSubGroups"
class=
"list-group-item"
>
<span
v-show=
"group.
subGroups && group.subGroups.length
"
>
<span
v-show=
"group.
hasSubgroups
"
>
<i
<i
v-show=
"group.isOpen"
v-show=
"group.isOpen"
class=
"fa fa-caret-down"
class=
"fa fa-caret-down"
...
@@ -33,7 +33,7 @@ export default {
...
@@ -33,7 +33,7 @@ export default {
aria-hidden=
"true"
/>
aria-hidden=
"true"
/>
</span>
</span>
<p><a
:href=
"group.web
_url"
>
{{
group
.
full_n
ame
}}
</a></p>
<p><a
:href=
"group.web
Url"
>
{{
group
.
fullN
ame
}}
</a></p>
<p>
{{
group
.
description
}}
</p>
<p>
{{
group
.
description
}}
</p>
<group-folder
v-if=
"group.subGroups && group.isOpen"
:groups=
"group.subGroups"
/>
<group-folder
v-if=
"group.subGroups && group.isOpen"
:groups=
"group.subGroups"
/>
...
...
app/assets/javascripts/groups/stores/groups_store.js
View file @
fa6d7094
...
@@ -18,9 +18,14 @@ export default class GroupsStore {
...
@@ -18,9 +18,14 @@ export default class GroupsStore {
}
}
static
decorateGroup
(
rawGroup
)
{
static
decorateGroup
(
rawGroup
)
{
const
group
=
rawGroup
;
return
{
group
.
isOpen
=
false
;
fullName
:
rawGroup
.
name
,
return
group
;
description
:
rawGroup
.
description
,
webUrl
:
rawGroup
.
web_url
,
parentId
:
rawGroup
.
parentId
,
hasSubgroups
:
!!
rawGroup
.
parent_id
,
isOpen
:
false
,
};
}
}
static
toggleSubGroups
(
toggleGroup
)
{
static
toggleSubGroups
(
toggleGroup
)
{
...
...
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