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
Boxiang Sun
gitlab-ce
Commits
d5d2d7b2
Commit
d5d2d7b2
authored
Dec 11, 2017
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename recaptcha-dialog to recaptcha-modal
parent
bf22eb61
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
18 deletions
+18
-18
app/assets/javascripts/issue_show/components/app.vue
app/assets/javascripts/issue_show/components/app.vue
+5
-5
app/assets/javascripts/issue_show/components/description.vue
app/assets/javascripts/issue_show/components/description.vue
+3
-3
app/assets/javascripts/vue_shared/components/recaptcha_modal.vue
...ets/javascripts/vue_shared/components/recaptcha_modal.vue
+2
-2
app/assets/javascripts/vue_shared/mixins/recaptcha_modal_implementor.js
...ascripts/vue_shared/mixins/recaptcha_modal_implementor.js
+2
-2
app/assets/stylesheets/framework/modal.scss
app/assets/stylesheets/framework/modal.scss
+1
-1
spec/javascripts/issue_show/components/app_spec.js
spec/javascripts/issue_show/components/app_spec.js
+3
-3
spec/javascripts/issue_show/components/description_spec.js
spec/javascripts/issue_show/components/description_spec.js
+2
-2
No files found.
app/assets/javascripts/issue_show/components/app.vue
View file @
d5d2d7b2
...
@@ -9,7 +9,7 @@ import titleComponent from './title.vue';
...
@@ -9,7 +9,7 @@ import titleComponent from './title.vue';
import
descriptionComponent
from
'
./description.vue
'
;
import
descriptionComponent
from
'
./description.vue
'
;
import
editedComponent
from
'
./edited.vue
'
;
import
editedComponent
from
'
./edited.vue
'
;
import
formComponent
from
'
./form.vue
'
;
import
formComponent
from
'
./form.vue
'
;
import
RecaptchaDialogImplementor
from
'
../../vue_shared/mixins/recaptcha_dialog
_implementor
'
;
import
recaptchaModalImplementor
from
'
../../vue_shared/mixins/recaptcha_modal
_implementor
'
;
export
default
{
export
default
{
props
:
{
props
:
{
...
@@ -152,7 +152,7 @@ export default {
...
@@ -152,7 +152,7 @@ export default {
},
},
mixins
:
[
mixins
:
[
RecaptchaDialog
Implementor
,
recaptchaModal
Implementor
,
],
],
methods
:
{
methods
:
{
...
@@ -197,7 +197,7 @@ export default {
...
@@ -197,7 +197,7 @@ export default {
});
});
},
},
closeRecaptcha
Dialog
()
{
closeRecaptcha
Modal
()
{
this
.
store
.
setFormState
({
this
.
store
.
setFormState
({
updateLoading
:
false
,
updateLoading
:
false
,
});
});
...
@@ -273,10 +273,10 @@ export default {
...
@@ -273,10 +273,10 @@ export default {
:enable-autocomplete=
"enableAutocomplete"
:enable-autocomplete=
"enableAutocomplete"
/>
/>
<recaptcha-
dialog
<recaptcha-
modal
v-show=
"showRecaptcha"
v-show=
"showRecaptcha"
:html=
"recaptchaHTML"
:html=
"recaptchaHTML"
@
close=
"closeRecaptcha
Dialog
"
@
close=
"closeRecaptcha
Modal
"
/>
/>
</div>
</div>
<div
v-else
>
<div
v-else
>
...
...
app/assets/javascripts/issue_show/components/description.vue
View file @
d5d2d7b2
<
script
>
<
script
>
import
animateMixin
from
'
../mixins/animate
'
;
import
animateMixin
from
'
../mixins/animate
'
;
import
TaskList
from
'
../../task_list
'
;
import
TaskList
from
'
../../task_list
'
;
import
RecaptchaDialogImplementor
from
'
../../vue_shared/mixins/recaptcha_dialog
_implementor
'
;
import
recaptchaModalImplementor
from
'
../../vue_shared/mixins/recaptcha_modal
_implementor
'
;
export
default
{
export
default
{
mixins
:
[
mixins
:
[
animateMixin
,
animateMixin
,
RecaptchaDialog
Implementor
,
recaptchaModal
Implementor
,
],
],
props
:
{
props
:
{
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
>
>
</textarea>
</textarea>
<recaptcha-
dialog
<recaptcha-
modal
v-show=
"showRecaptcha"
v-show=
"showRecaptcha"
:html=
"recaptchaHTML"
:html=
"recaptchaHTML"
@
close=
"closeRecaptcha"
@
close=
"closeRecaptcha"
...
...
app/assets/javascripts/vue_shared/components/recaptcha_
dialog
.vue
→
app/assets/javascripts/vue_shared/components/recaptcha_
modal
.vue
View file @
d5d2d7b2
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
modal
from
'
./modal.vue
'
;
import
modal
from
'
./modal.vue
'
;
export
default
{
export
default
{
name
:
'
recaptcha-
dialog
'
,
name
:
'
recaptcha-
modal
'
,
props
:
{
props
:
{
html
:
{
html
:
{
...
@@ -67,7 +67,7 @@ export default {
...
@@ -67,7 +67,7 @@ export default {
<
template
>
<
template
>
<modal
<modal
kind=
"warning"
kind=
"warning"
class=
"recaptcha-
dialog js-recaptcha-dialog
"
class=
"recaptcha-
modal js-recaptcha-modal
"
:hide-footer=
"true"
:hide-footer=
"true"
:title=
"__('Please solve the reCAPTCHA')"
:title=
"__('Please solve the reCAPTCHA')"
@
toggle=
"close"
@
toggle=
"close"
...
...
app/assets/javascripts/vue_shared/mixins/recaptcha_
dialog
_implementor.js
→
app/assets/javascripts/vue_shared/mixins/recaptcha_
modal
_implementor.js
View file @
d5d2d7b2
import
RecaptchaDialog
from
'
../components/recaptcha_dialog
.vue
'
;
import
recaptchaModal
from
'
../components/recaptcha_modal
.vue
'
;
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -9,7 +9,7 @@ export default {
...
@@ -9,7 +9,7 @@ export default {
},
},
components
:
{
components
:
{
RecaptchaDialog
,
recaptchaModal
,
},
},
methods
:
{
methods
:
{
...
...
app/assets/stylesheets/framework/modal.scss
View file @
d5d2d7b2
...
@@ -55,7 +55,7 @@ body.modal-open {
...
@@ -55,7 +55,7 @@ body.modal-open {
}
}
}
}
.recaptcha-
dialog
.recaptcha-form
{
.recaptcha-
modal
.recaptcha-form
{
display
:
inline-block
;
display
:
inline-block
;
.recaptcha
{
.recaptcha
{
...
...
spec/javascripts/issue_show/components/app_spec.js
View file @
d5d2d7b2
...
@@ -272,10 +272,10 @@ describe('Issuable output', () => {
...
@@ -272,10 +272,10 @@ describe('Issuable output', () => {
});
});
});
});
it
(
'
opens recaptcha
dialog
if update rejected as spam
'
,
(
done
)
=>
{
it
(
'
opens recaptcha
modal
if update rejected as spam
'
,
(
done
)
=>
{
function
mockScriptSrc
()
{
function
mockScriptSrc
()
{
const
recaptchaChild
=
vm
.
$children
const
recaptchaChild
=
vm
.
$children
.
find
(
child
=>
child
.
$options
.
_componentTag
===
'
recaptcha-
dialog
'
);
// eslint-disable-line no-underscore-dangle
.
find
(
child
=>
child
.
$options
.
_componentTag
===
'
recaptcha-
modal
'
);
// eslint-disable-line no-underscore-dangle
recaptchaChild
.
scriptSrc
=
'
//scriptsrc
'
;
recaptchaChild
.
scriptSrc
=
'
//scriptsrc
'
;
}
}
...
@@ -302,7 +302,7 @@ describe('Issuable output', () => {
...
@@ -302,7 +302,7 @@ describe('Issuable output', () => {
.
then
(
promise
)
.
then
(
promise
)
.
then
(()
=>
setTimeoutPromise
())
.
then
(()
=>
setTimeoutPromise
())
.
then
(()
=>
{
.
then
(()
=>
{
modal
=
vm
.
$el
.
querySelector
(
'
.js-recaptcha-
dialog
'
);
modal
=
vm
.
$el
.
querySelector
(
'
.js-recaptcha-
modal
'
);
expect
(
modal
.
style
.
display
).
not
.
toEqual
(
'
none
'
);
expect
(
modal
.
style
.
display
).
not
.
toEqual
(
'
none
'
);
expect
(
modal
.
querySelector
(
'
.g-recaptcha
'
).
textContent
).
toEqual
(
'
recaptcha_html
'
);
expect
(
modal
.
querySelector
(
'
.g-recaptcha
'
).
textContent
).
toEqual
(
'
recaptcha_html
'
);
...
...
spec/javascripts/issue_show/components/description_spec.js
View file @
d5d2d7b2
...
@@ -54,7 +54,7 @@ describe('Description component', () => {
...
@@ -54,7 +54,7 @@ describe('Description component', () => {
it
(
'
opens recaptcha dialog if update rejected as spam
'
,
(
done
)
=>
{
it
(
'
opens recaptcha dialog if update rejected as spam
'
,
(
done
)
=>
{
let
modal
;
let
modal
;
const
recaptchaChild
=
vm
.
$children
const
recaptchaChild
=
vm
.
$children
.
find
(
child
=>
child
.
$options
.
_componentTag
===
'
recaptcha-
dialog
'
);
// eslint-disable-line no-underscore-dangle
.
find
(
child
=>
child
.
$options
.
_componentTag
===
'
recaptcha-
modal
'
);
// eslint-disable-line no-underscore-dangle
recaptchaChild
.
scriptSrc
=
'
//scriptsrc
'
;
recaptchaChild
.
scriptSrc
=
'
//scriptsrc
'
;
...
@@ -64,7 +64,7 @@ describe('Description component', () => {
...
@@ -64,7 +64,7 @@ describe('Description component', () => {
vm
.
$nextTick
()
vm
.
$nextTick
()
.
then
(()
=>
{
.
then
(()
=>
{
modal
=
vm
.
$el
.
querySelector
(
'
.js-recaptcha-
dialog
'
);
modal
=
vm
.
$el
.
querySelector
(
'
.js-recaptcha-
modal
'
);
expect
(
modal
.
style
.
display
).
not
.
toEqual
(
'
none
'
);
expect
(
modal
.
style
.
display
).
not
.
toEqual
(
'
none
'
);
expect
(
modal
.
querySelector
(
'
.g-recaptcha
'
).
textContent
).
toEqual
(
'
recaptcha_html
'
);
expect
(
modal
.
querySelector
(
'
.g-recaptcha
'
).
textContent
).
toEqual
(
'
recaptcha_html
'
);
...
...
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