Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Géocontrib Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GéoContrib
Géocontrib Frontend
Commits
e2c02cf3
Commit
e2c02cf3
authored
Dec 14, 2021
by
Timothee P
Browse files
Options
Downloads
Patches
Plain Diff
Fix filename
parent
a63a2457
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!213
2.3.2-rc1
,
!203
REDMINE_ISSUE-12652
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/views/feature/Feature_detail.vue
+15
-15
15 additions, 15 deletions
src/views/feature/Feature_detail.vue
with
15 additions
and
15 deletions
src/views/feature/Feature_detail.vue
+
15
−
15
View file @
e2c02cf3
...
@@ -369,7 +369,6 @@ export default {
...
@@ -369,7 +369,6 @@ export default {
errors
:
null
,
errors
:
null
,
title
:
""
,
title
:
""
,
file
:
null
,
file
:
null
,
type
:
""
,
},
},
comment
:
{
comment
:
{
id_for_label
:
"
add-comment
"
,
id_for_label
:
"
add-comment
"
,
...
@@ -478,9 +477,9 @@ export default {
...
@@ -478,9 +477,9 @@ export default {
.
postCommentAttachment
({
.
postCommentAttachment
({
featureId
:
this
.
$route
.
params
.
slug_signal
,
featureId
:
this
.
$route
.
params
.
slug_signal
,
file
:
this
.
comment_form
.
attachment_file
.
file
,
file
:
this
.
comment_form
.
attachment_file
.
file
,
fileName
:
this
.
comment_form
.
attachment_file
.
title
,
fileName
:
this
.
comment_form
.
attachment_file
.
fileName
,
commentId
:
response
.
data
.
id
,
title
:
this
.
comment_form
.
attachment_file
.
title
,
title
:
this
.
comment_form
.
attachment_file
.
title
,
commentId
:
response
.
data
.
id
,
})
})
.
then
(()
=>
{
.
then
(()
=>
{
this
.
confirmComment
();
this
.
confirmComment
();
...
@@ -496,7 +495,8 @@ export default {
...
@@ -496,7 +495,8 @@ export default {
this
.
$store
.
commit
(
"
DISPLAY_MESSAGE
"
,
"
Ajout du commentaire confirmé
"
);
this
.
$store
.
commit
(
"
DISPLAY_MESSAGE
"
,
"
Ajout du commentaire confirmé
"
);
this
.
getFeatureEvents
();
//* display new comment on the page
this
.
getFeatureEvents
();
//* display new comment on the page
this
.
comment_form
.
attachment_file
.
file
=
null
;
this
.
comment_form
.
attachment_file
.
file
=
null
;
this
.
comment_form
.
attachment_file
.
title
=
null
;
this
.
comment_form
.
attachment_file
.
fileName
=
""
;
this
.
comment_form
.
attachment_file
.
title
=
""
;
this
.
comment_form
.
comment
.
value
=
null
;
this
.
comment_form
.
comment
.
value
=
null
;
},
},
...
@@ -518,19 +518,19 @@ export default {
...
@@ -518,19 +518,19 @@ export default {
// * read image file
// * read image file
const
files
=
e
.
target
.
files
||
e
.
dataTransfer
.
files
;
const
files
=
e
.
target
.
files
||
e
.
dataTransfer
.
files
;
const
_this
=
this
;
//* 'this' is different in onload function
const
handleFile
=
(
isValid
)
=>
{
function
handleFile
(
isValid
)
{
if
(
isValid
)
{
if
(
isValid
)
{
const
period
=
files
[
0
].
name
.
lastIndexOf
(
"
.
"
);
this
.
comment_form
.
attachment_file
.
file
=
files
[
0
];
//* store the file to post afterwards
const
fileName
=
files
[
0
].
name
.
substring
(
0
,
period
);
let
title
=
files
[
0
].
name
const
fileExtension
=
files
[
0
].
name
.
substring
(
period
+
1
);
this
.
comment_form
.
attachment_file
.
fileName
=
title
;
//* name of the file
const
shortName
=
fileName
.
slice
(
0
,
10
)
+
"
[...].
"
+
fileExtension
;
const
fileExtension
=
title
.
substring
(
title
.
lastIndexOf
(
"
.
"
)
+
1
);
_this
.
comment_form
.
attachment_file
.
file
=
files
[
0
];
//* store the file to post later
if
((
title
.
length
-
fileExtension
.
length
)
>
11
)
{
_this
.
comment_form
.
attachment_file
.
type
=
fileExtension
;
//* for adding to fileName
title
=
title
.
slice
(
0
,
10
)
+
"
[...].
"
+
fileExtension
;
_this
.
comment_form
.
attachment_file
.
title
=
shortName
;
//* for display
}
_this
.
comment_form
.
attachment_file
.
errors
=
null
;
this
.
comment_form
.
attachment_file
.
title
=
title
;
//* title for display
this
.
comment_form
.
attachment_file
.
errors
=
null
;
}
else
{
}
else
{
_
this
.
comment_form
.
attachment_file
.
errors
=
this
.
comment_form
.
attachment_file
.
errors
=
"
Transférez une image valide. Le fichier que vous avez transféré n'est pas une image, ou il est corrompu.
"
;
"
Transférez une image valide. Le fichier que vous avez transféré n'est pas une image, ou il est corrompu.
"
;
}
}
}
}
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment