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
504ef7a5
Commit
504ef7a5
authored
May 07, 2018
by
Constance Okoghenun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made delete wiki modal component props required and changed the component init behaviour
parent
22651a63
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
21 deletions
+26
-21
app/assets/javascripts/pages/projects/wikis/components/delete_wiki_modal.vue
...pts/pages/projects/wikis/components/delete_wiki_modal.vue
+3
-3
app/assets/javascripts/pages/projects/wikis/index.js
app/assets/javascripts/pages/projects/wikis/index.js
+23
-18
No files found.
app/assets/javascripts/pages/projects/wikis/components/delete_wiki_modal.vue
View file @
504ef7a5
...
...
@@ -10,17 +10,17 @@ export default {
props
:
{
deleteWikiUrl
:
{
type
:
String
,
required
:
fals
e
,
required
:
tru
e
,
default
:
''
,
},
pageTitle
:
{
type
:
String
,
required
:
fals
e
,
required
:
tru
e
,
default
:
''
,
},
csrfToken
:
{
type
:
String
,
required
:
fals
e
,
required
:
tru
e
,
default
:
''
,
},
},
...
...
app/assets/javascripts/pages/projects/wikis/index.js
View file @
504ef7a5
...
...
@@ -14,22 +14,27 @@ document.addEventListener('DOMContentLoaded', () => {
new
ZenMode
();
// eslint-disable-line no-new
new
GLForm
(
$
(
'
.wiki-form
'
),
true
);
// eslint-disable-line no-new
Vue
.
use
(
Translate
);
const
{
deleteWikiUrl
,
pageTitle
}
=
document
.
getElementById
(
'
delete-wiki-button
'
).
dataset
;
const
deleteWikiModalEl
=
document
.
getElementById
(
'
delete-wiki-modal
'
);
const
deleteModal
=
new
Vue
({
// eslint-disable-line
el
:
deleteWikiModalEl
,
data
:
{
deleteWikiUrl
:
''
,
},
render
(
createElement
)
{
return
createElement
(
deleteWikiModal
,
{
props
:
{
pageTitle
,
deleteWikiUrl
,
csrfToken
:
csrf
.
token
,
},
});
},
});
const
deleteWikiButton
=
document
.
getElementById
(
'
delete-wiki-button
'
);
if
(
deleteWikiButton
)
{
Vue
.
use
(
Translate
);
const
{
deleteWikiUrl
,
pageTitle
}
=
deleteWikiButton
.
dataset
;
const
deleteWikiModalEl
=
document
.
getElementById
(
'
delete-wiki-modal
'
);
const
deleteModal
=
new
Vue
({
// eslint-disable-line
el
:
deleteWikiModalEl
,
data
:
{
deleteWikiUrl
:
''
,
},
render
(
createElement
)
{
return
createElement
(
deleteWikiModal
,
{
props
:
{
pageTitle
,
deleteWikiUrl
,
csrfToken
:
csrf
.
token
,
},
});
},
});
}
});
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