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
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 {
...
@@ -10,17 +10,17 @@ export default {
props
:
{
props
:
{
deleteWikiUrl
:
{
deleteWikiUrl
:
{
type
:
String
,
type
:
String
,
required
:
fals
e
,
required
:
tru
e
,
default
:
''
,
default
:
''
,
},
},
pageTitle
:
{
pageTitle
:
{
type
:
String
,
type
:
String
,
required
:
fals
e
,
required
:
tru
e
,
default
:
''
,
default
:
''
,
},
},
csrfToken
:
{
csrfToken
:
{
type
:
String
,
type
:
String
,
required
:
fals
e
,
required
:
tru
e
,
default
:
''
,
default
:
''
,
},
},
},
},
...
...
app/assets/javascripts/pages/projects/wikis/index.js
View file @
504ef7a5
...
@@ -14,22 +14,27 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -14,22 +14,27 @@ document.addEventListener('DOMContentLoaded', () => {
new
ZenMode
();
// eslint-disable-line no-new
new
ZenMode
();
// eslint-disable-line no-new
new
GLForm
(
$
(
'
.wiki-form
'
),
true
);
// eslint-disable-line no-new
new
GLForm
(
$
(
'
.wiki-form
'
),
true
);
// eslint-disable-line no-new
Vue
.
use
(
Translate
);
const
deleteWikiButton
=
document
.
getElementById
(
'
delete-wiki-button
'
);
const
{
deleteWikiUrl
,
pageTitle
}
=
document
.
getElementById
(
'
delete-wiki-button
'
).
dataset
;
const
deleteWikiModalEl
=
document
.
getElementById
(
'
delete-wiki-modal
'
);
if
(
deleteWikiButton
)
{
const
deleteModal
=
new
Vue
({
// eslint-disable-line
Vue
.
use
(
Translate
);
el
:
deleteWikiModalEl
,
data
:
{
const
{
deleteWikiUrl
,
pageTitle
}
=
deleteWikiButton
.
dataset
;
deleteWikiUrl
:
''
,
const
deleteWikiModalEl
=
document
.
getElementById
(
'
delete-wiki-modal
'
);
},
const
deleteModal
=
new
Vue
({
// eslint-disable-line
render
(
createElement
)
{
el
:
deleteWikiModalEl
,
return
createElement
(
deleteWikiModal
,
{
data
:
{
props
:
{
deleteWikiUrl
:
''
,
pageTitle
,
},
deleteWikiUrl
,
render
(
createElement
)
{
csrfToken
:
csrf
.
token
,
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