Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GoGoCarto
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
Pixel Humain
GoGoCarto
Commits
201a8e41
Unverified
Commit
201a8e41
authored
4 years ago
by
Sebastian Castro
Browse files
Options
Downloads
Patches
Plain Diff
test example for javascript translation
parent
7bb56167
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
assets/js/element-form/init-map.js
+5
-5
5 additions, 5 deletions
assets/js/element-form/init-map.js
assets/js/home.js
+2
-2
2 additions, 2 deletions
assets/js/home.js
templates/element-form/element-form.html.twig
+3
-0
3 additions, 0 deletions
templates/element-form/element-form.html.twig
with
10 additions
and
7 deletions
assets/js/element-form/init-map.js
+
5
−
5
View file @
201a8e41
...
...
@@ -42,12 +42,12 @@ function createMarker(position)
marker
=
new
L
.
Marker
(
position
,
{
draggable
:
true
}
).
addTo
(
map
);
marker
.
on
(
'
dragend
'
,
function
()
{
$
(
'
#input-latitude
'
).
attr
(
'
value
'
,
marker
.
getLatLng
().
lat
);
$
(
'
#input-latitude
'
).
attr
(
'
value
'
,
marker
.
getLatLng
().
lat
);
$
(
'
#input-longitude
'
).
attr
(
'
value
'
,
marker
.
getLatLng
().
lng
);
});
// TODO translate message
marker
.
bindPopup
(
"
<center>
Déplacez moi pour préciser la position</br>(au centre du bâtiment)
</center>
"
).
openPopup
();
});
// TODO translate message
TEST
marker
.
bindPopup
(
`
<center>
${
$
(
'
.translate
'
).
data
(
'
move-me
'
)}
</center>
`
).
openPopup
();
}
function
fitBounds
(
rawbounds
)
...
...
This diff is collapsed.
Click to expand it.
assets/js/home.js
+
2
−
2
View file @
201a8e41
...
...
@@ -12,7 +12,7 @@ $(document).ready(function()
carto
=
goGoCarto
(
'
#gogocarto
'
,
gogoJsConf
);
// on search submit, redirect to the route provided by gogocartoJs
$
(
'
.search-bar
'
).
on
(
'
searchRoute
'
,
function
(
evt
,
route
)
{
$
(
'
.search-bar
'
).
on
(
'
searchRoute
'
,
function
(
evt
,
route
)
{
var
mainOption
;
// in small screen a select is displayed
if
(
$
(
'
.category-field-select
'
).
is
(
'
:visible
'
))
...
...
@@ -29,7 +29,7 @@ $(document).ready(function()
if
(
mainOption
)
route
+=
'
?cat=
'
+
mainOption
;
var
path
=
window
.
location
.
pathname
+
'
/annuaire
'
+
route
;
window
.
location
.
href
=
window
.
location
.
origin
+
path
.
replace
(
'
//
'
,
'
/
'
);
})
})
// clear viewport and address cookies
eraseCookie
(
'
viewport
'
);
...
...
This diff is collapsed.
Click to expand it.
templates/element-form/element-form.html.twig
+
3
−
0
View file @
201a8e41
{%
extends
"page-layout.html.twig"
%}
{# TODO translate message TEST #}
<div
class=
"translate"
data-move-me=
"
{{
'move_me'
|
trans
}}
"
></div>
{%
set
pageName
=
'element-form'
%}
{%
set
navTitle
=
'add_element._label'
|
trans
()
%}
...
...
This diff is collapsed.
Click to expand it.
Sebastian Castro
@seballot
mentioned in commit
914ef665
·
3 years ago
mentioned in commit
914ef665
mentioned in commit 914ef665003bc42f2a586885e2d593b7c06ddb6e
Toggle commit list
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