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
c352e7e1
Commit
c352e7e1
authored
Jan 29, 2019
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some cleanup and improvements on frontent logic
parent
992fcf6c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
8 deletions
+13
-8
app/assets/javascripts/issue_show/components/app.vue
app/assets/javascripts/issue_show/components/app.vue
+7
-5
app/assets/javascripts/issue_show/components/description.vue
app/assets/javascripts/issue_show/components/description.vue
+1
-1
locale/gitlab.pot
locale/gitlab.pot
+4
-1
spec/javascripts/issue_show/components/description_spec.js
spec/javascripts/issue_show/components/description_spec.js
+1
-1
No files found.
app/assets/javascripts/issue_show/components/app.vue
View file @
c352e7e1
<
script
>
import
Visibility
from
'
visibilityjs
'
;
import
{
s__
,
sprintf
}
from
'
~/locale
'
;
import
{
visitUrl
}
from
'
../../lib/utils/url_utility
'
;
import
Poll
from
'
../../lib/utils/poll
'
;
import
eventHub
from
'
../event_hub
'
;
...
...
@@ -166,6 +167,9 @@ export default {
const
titleChanged
=
this
.
initialTitleText
!==
this
.
store
.
formState
.
title
;
return
descriptionChanged
||
titleChanged
;
},
defaultErrorMessage
()
{
return
sprintf
(
s__
(
'
Error updating %{issuableType}.
'
),
{
issuableType
:
this
.
issuableType
});
},
},
created
()
{
this
.
service
=
new
Service
(
this
.
endpoint
);
...
...
@@ -220,9 +224,7 @@ export default {
this
.
store
.
updateState
(
data
);
})
.
catch
(()
=>
{
const
errMsg
=
`Error updating
${
this
.
issuableType
}
`
;
window
.
Flash
(
errMsg
);
window
.
Flash
(
this
.
defaultErrorMessage
);
});
},
...
...
@@ -260,10 +262,10 @@ export default {
if
(
error
&&
error
.
name
===
'
SpamError
'
)
{
this
.
openRecaptcha
();
}
else
{
let
errMsg
=
`Error updating
${
this
.
issuableType
}
`
;
let
errMsg
=
this
.
defaultErrorMessage
;
if
(
error
&&
error
.
response
&&
error
.
response
.
data
&&
error
.
response
.
data
.
errors
)
{
errMsg
=
error
.
response
.
data
.
errors
;
errMsg
+=
error
.
response
.
data
.
errors
.
join
(
'
'
)
;
}
eventHub
.
$emit
(
'
close.form
'
);
...
...
app/assets/javascripts/issue_show/components/description.vue
View file @
c352e7e1
...
...
@@ -93,7 +93,7 @@ export default {
taskListUpdateError
()
{
window
.
Flash
(
__
(
'
Someone edited this issue at the same time you did
and we updated the issue descriptio
n.
'
,
'
Someone edited this issue at the same time you did
. The description has been updated and you will need to make your changes agai
n.
'
,
),
);
...
...
locale/gitlab.pot
View file @
c352e7e1
...
...
@@ -3040,6 +3040,9 @@ msgstr ""
msgid "Error saving label update."
msgstr ""
msgid "Error updating %{issuableType}"
msgstr ""
msgid "Error updating status for all todos."
msgstr ""
...
...
@@ -6527,7 +6530,7 @@ msgstr ""
msgid "Snippets"
msgstr ""
msgid "Someone edited this issue at the same time you did
and we updated the issue descriptio
n."
msgid "Someone edited this issue at the same time you did
. The description has been updated and you will need to make your changes agai
n."
msgstr ""
msgid "Something went wrong on our end"
...
...
spec/javascripts/issue_show/components/description_spec.js
View file @
c352e7e1
...
...
@@ -191,7 +191,7 @@ describe('Description component', () => {
describe
(
'
taskListUpdateError
'
,
()
=>
{
it
(
'
should create flash notification and emit an event to parent
'
,
()
=>
{
const
msg
=
'
Someone edited this issue at the same time you did
and we updated the issue descriptio
n.
'
;
'
Someone edited this issue at the same time you did
. The description has been updated and you will need to make your changes agai
n.
'
;
spyOn
(
window
,
'
Flash
'
);
spyOn
(
vm
,
'
$emit
'
);
...
...
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