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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GéoContrib
Géocontrib Frontend
Commits
1e5fae9b
Commit
1e5fae9b
authored
3 years ago
by
Timothee P
Browse files
Options
Downloads
Patches
Plain Diff
display success message
parent
b2fe5296
No related branches found
No related tags found
1 merge request
!57
Anom/redmine ticket 11852 empty comment
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/App.vue
+8
-10
8 additions, 10 deletions
src/App.vue
src/store/index.js
+8
-0
8 additions, 0 deletions
src/store/index.js
src/store/modules/map.js
+1
-1
1 addition, 1 deletion
src/store/modules/map.js
src/views/feature/Feature_detail.vue
+14
-8
14 additions, 8 deletions
src/views/feature/Feature_detail.vue
with
31 additions
and
19 deletions
src/App.vue
+
8
−
10
View file @
1e5fae9b
...
@@ -138,18 +138,16 @@
...
@@ -138,18 +138,16 @@
<div
<div
v-for=
"(message, index) in messages"
v-for=
"(message, index) in messages"
:key=
"'message-' + index"
:key=
"'message-' + index"
class=
"ui
positive
message"
class=
"ui
info
message"
>
>
<div
class=
"ui info message"
>
<div
class=
"header"
>
<div
class=
"header"
>
<i
class=
"info circle icon"
></i>
Informations
<i
class=
"info circle icon"
></i>
Informations
</div>
<ul
class=
"list"
>
{{
message
.
comment
}}
</ul>
</div>
</div>
<ul
class=
"list"
>
{{
message
.
comment
}}
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
src/store/index.js
+
8
−
0
View file @
1e5fae9b
...
@@ -47,6 +47,7 @@ export default new Vuex.Store({
...
@@ -47,6 +47,7 @@ export default new Vuex.Store({
SSO_SETTED
:
false
,
SSO_SETTED
:
false
,
USER_LEVEL_PROJECTS
:
null
,
USER_LEVEL_PROJECTS
:
null
,
user_permissions
:
null
,
user_permissions
:
null
,
messages
:
[]
},
},
mutations
:
{
mutations
:
{
...
@@ -89,6 +90,13 @@ export default new Vuex.Store({
...
@@ -89,6 +90,13 @@ export default new Vuex.Store({
SET_USER_PERMISSIONS
(
state
,
userPermissions
)
{
SET_USER_PERMISSIONS
(
state
,
userPermissions
)
{
state
.
user_permissions
=
userPermissions
;
state
.
user_permissions
=
userPermissions
;
},
},
DISPLAY_MESSAGE
(
state
,
comment
)
{
state
.
messages
=
[{
comment
},
...
state
.
messages
];
document
.
getElementById
(
"
messages
"
).
scrollIntoView
({
block
:
"
start
"
,
inline
:
"
nearest
"
});
},
CLEAR_MESSAGES
(
state
)
{
state
.
messages
=
[];
}
},
},
getters
:
{
getters
:
{
...
...
This diff is collapsed.
Click to expand it.
src/store/modules/map.js
+
1
−
1
View file @
1e5fae9b
...
@@ -15,7 +15,7 @@ const map = {
...
@@ -15,7 +15,7 @@ const map = {
basemapsToDelete
:
[],
basemapsToDelete
:
[],
features
:
[],
features
:
[],
geojsonFeatures
:
null
,
geojsonFeatures
:
null
,
layers
:
null
layers
:
null
,
},
},
mutations
:
{
mutations
:
{
SET_LAYERS
(
state
,
layers
)
{
SET_LAYERS
(
state
,
layers
)
{
...
...
This diff is collapsed.
Click to expand it.
src/views/feature/Feature_detail.vue
+
14
−
8
View file @
1e5fae9b
...
@@ -150,6 +150,7 @@
...
@@ -150,6 +150,7 @@
<td>
<td>
{{
link
.
relation_type_display
}}
{{
link
.
relation_type_display
}}
<router-link
<router-link
v-if=
"link.feature_to.feature_type_slug"
:to=
"
{
:to=
"
{
name: 'details-signalement',
name: 'details-signalement',
params: {
params: {
...
@@ -438,20 +439,25 @@ export default {
...
@@ -438,20 +439,25 @@ export default {
comment
:
response
.
data
.
id
,
comment
:
response
.
data
.
id
,
})
})
.
then
(()
=>
{
.
then
(()
=>
{
this
.
getFeatureEvents
();
//* display new comment on the page
this
.
confirmComment
();
this
.
getFeatureAttachments
();
//* display new attachment from comment on the page
//this.getFeatureAttachments(); //* display new attachment from comment on the page
this
.
comment_form
.
attachment_file
.
file
=
null
;
this
.
comment_form
.
attachment_file
.
value
=
null
;
this
.
comment_form
.
title
.
file
=
null
;
this
.
comment_form
.
title
.
value
=
null
;
this
.
comment_form
.
comment
.
value
=
null
;
});
});
}
else
{
}
else
{
this
.
getFeatureEv
ent
s
();
this
.
confirmComm
ent
();
}
}
});
});
},
},
confirmComment
()
{
this
.
$store
.
commit
(
"
DISPLAY_MESSAGE
"
,
"
Ajout du commentaire confirmé
"
);
this
.
getFeatureEvents
();
//* display new comment on the page
this
.
comment_form
.
attachment_file
.
file
=
null
;
this
.
comment_form
.
attachment_file
.
value
=
null
;
this
.
comment_form
.
title
.
file
=
null
;
this
.
comment_form
.
title
.
value
=
null
;
this
.
comment_form
.
comment
.
value
=
null
;
},
getAttachmentFileData
(
evt
)
{
getAttachmentFileData
(
evt
)
{
const
files
=
evt
.
target
.
files
||
evt
.
dataTransfer
.
files
;
const
files
=
evt
.
target
.
files
||
evt
.
dataTransfer
.
files
;
const
period
=
files
[
0
].
name
.
lastIndexOf
(
"
.
"
);
const
period
=
files
[
0
].
name
.
lastIndexOf
(
"
.
"
);
...
...
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