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
3c62b51c
Commit
3c62b51c
authored
Jul 30, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed modal input not clearing
parent
89c56c1f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
+18
-8
app/assets/javascripts/ide/components/new_dropdown/modal.vue
app/assets/javascripts/ide/components/new_dropdown/modal.vue
+5
-3
app/assets/javascripts/vue_shared/components/gl_modal.vue
app/assets/javascripts/vue_shared/components/gl_modal.vue
+13
-5
No files found.
app/assets/javascripts/ide/components/new_dropdown/modal.vue
View file @
3c62b51c
...
@@ -59,9 +59,10 @@ export default {
...
@@ -59,9 +59,10 @@ export default {
}
}
},
},
focusInput
()
{
focusInput
()
{
setTimeout
(()
=>
{
this
.
$refs
.
fieldName
.
focus
();
this
.
$refs
.
fieldName
.
focus
();
});
},
closedModal
()
{
this
.
name
=
''
;
},
},
},
},
};
};
...
@@ -75,6 +76,7 @@ export default {
...
@@ -75,6 +76,7 @@ export default {
footer-primary-button-variant=
"success"
footer-primary-button-variant=
"success"
@
submit=
"submitForm"
@
submit=
"submitForm"
@
open=
"focusInput"
@
open=
"focusInput"
@
closed=
"closedModal"
>
>
<div
<div
class=
"form-group row"
class=
"form-group row"
...
...
app/assets/javascripts/vue_shared/components/gl_modal.vue
View file @
3c62b51c
<
script
>
<
script
>
import
$
from
'
jquery
'
;
const
buttonVariants
=
[
'
danger
'
,
'
primary
'
,
'
success
'
,
'
warning
'
];
const
buttonVariants
=
[
'
danger
'
,
'
primary
'
,
'
success
'
,
'
warning
'
];
const
sizeVariants
=
[
'
sm
'
,
'
md
'
,
'
lg
'
,
'
xl
'
];
const
sizeVariants
=
[
'
sm
'
,
'
md
'
,
'
lg
'
,
'
xl
'
];
...
@@ -38,6 +40,12 @@ export default {
...
@@ -38,6 +40,12 @@ export default {
return
this
.
modalSize
===
'
md
'
?
''
:
`modal-
${
this
.
modalSize
}
`
;
return
this
.
modalSize
===
'
md
'
?
''
:
`modal-
${
this
.
modalSize
}
`
;
},
},
},
},
mounted
()
{
$
(
this
.
$el
).
on
(
'
shown.bs.modal
'
,
this
.
opened
).
on
(
'
hidden.bs.modal
'
,
this
.
closed
);
},
beforeDestroy
()
{
$
(
this
.
$el
).
off
(
'
shown.bs.modal
'
,
this
.
opened
).
off
(
'
hidden.bs.modal
'
,
this
.
closed
);
},
methods
:
{
methods
:
{
emitCancel
(
event
)
{
emitCancel
(
event
)
{
this
.
$emit
(
'
cancel
'
,
event
);
this
.
$emit
(
'
cancel
'
,
event
);
...
@@ -45,10 +53,11 @@ export default {
...
@@ -45,10 +53,11 @@ export default {
emitSubmit
(
event
)
{
emitSubmit
(
event
)
{
this
.
$emit
(
'
submit
'
,
event
);
this
.
$emit
(
'
submit
'
,
event
);
},
},
opened
({
propertyName
})
{
opened
()
{
if
(
propertyName
===
'
opacity
'
)
{
this
.
$emit
(
'
open
'
);
this
.
$emit
(
'
open
'
);
}
},
closed
()
{
this
.
$emit
(
'
closed
'
);
},
},
},
},
};
};
...
@@ -60,7 +69,6 @@ export default {
...
@@ -60,7 +69,6 @@ export default {
class=
"modal fade"
class=
"modal fade"
tabindex=
"-1"
tabindex=
"-1"
role=
"dialog"
role=
"dialog"
@
transitionend=
"opened"
>
>
<div
<div
:class=
"modalSizeClass"
:class=
"modalSizeClass"
...
...
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