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
0d1472bf
Commit
0d1472bf
authored
Oct 11, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix spec failures - don't create board config if element doesn't exist
parent
4df7e5e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
28 deletions
+32
-28
app/assets/javascripts/boards/boards_bundle.js
app/assets/javascripts/boards/boards_bundle.js
+32
-28
No files found.
app/assets/javascripts/boards/boards_bundle.js
View file @
0d1472bf
...
...
@@ -191,35 +191,39 @@ $(() => {
},
});
gl
.
boardConfigToggle
=
new
Vue
({
el
:
document
.
querySelector
(
'
.js-board-config
'
),
data
()
{
return
{
canAdminList
:
convertPermissionToBoolean
(
this
.
$options
.
el
.
dataset
.
canAdminList
,
),
};
},
methods
:
{
showPage
:
page
=>
gl
.
issueBoards
.
BoardsStore
.
showPage
(
page
),
},
computed
:
{
buttonText
()
{
return
this
.
canAdminList
?
'
Edit board
'
:
'
View scope
'
;
const
configEl
=
document
.
querySelector
(
'
.js-board-config
'
);
if
(
configEl
)
{
gl
.
boardConfigToggle
=
new
Vue
({
el
:
configEl
,
data
()
{
return
{
canAdminList
:
convertPermissionToBoolean
(
this
.
$options
.
el
.
dataset
.
canAdminList
,
),
};
},
},
template
:
`
<div class="prepend-left-10">
<button
class="btn btn-inverted"
type="button"
@click.prevent="showPage('edit')"
>
{{ buttonText }}
</button>
</div>
`
,
});
methods
:
{
showPage
:
page
=>
gl
.
issueBoards
.
BoardsStore
.
showPage
(
page
),
},
computed
:
{
buttonText
()
{
return
this
.
canAdminList
?
'
Edit board
'
:
'
View scope
'
;
},
},
template
:
`
<div class="prepend-left-10">
<button
class="btn btn-inverted"
type="button"
@click.prevent="showPage('edit')"
>
{{ buttonText }}
</button>
</div>
`
,
});
}
gl
.
IssueBoardsModalAddBtn
=
new
Vue
({
mixins
:
[
gl
.
issueBoards
.
ModalMixins
],
...
...
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