Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Caillat Michel
yafits
Commits
bf2da0e3
Commit
bf2da0e3
authored
Jun 20, 2019
by
Caillat Michel
Browse files
Take into account the urlRoot
parent
b629a2f6
Changes
3
Hide whitespace changes
Inline
Side-by-side
yafitsv/views/olqv.ejs
View file @
bf2da0e3
...
...
@@ -857,7 +857,7 @@ var SAMPPNGPublishControl = (function (Control) {
_im_layer_1
=
new
ol
.
layer
.
Image
({
source
:
new
ol
.
source
.
ImageStatic
({
url
:
window
.
location
.
origin
+
"
/
"
+
path_to_png
,
url
:
"
<%=urlRoot%>
"
+
"
/
"
+
path_to_png
,
projection
:
_projection_1
,
imageExtent
:
_extent
,
imageLoadFunction
:
_imageLoadFunction_1
})
...
...
@@ -907,7 +907,7 @@ var SAMPPNGPublishControl = (function (Control) {
}
_im_layer_2
=
new
ol
.
layer
.
Image
({
source
:
new
ol
.
source
.
ImageStatic
({
url
:
window
.
location
.
origin
+
"
/
"
+
path_to_png
,
url
:
"
<%=urlRoot%>
"
+
"
/
"
+
path_to_png
,
projection
:
_projection_2
,
imageExtent
:
_extent
,
imageLoadFunction
:
_imageLoadFunction_2
...
...
yafitsv/views/olqv_2d.ejs
View file @
bf2da0e3
...
...
@@ -658,21 +658,9 @@ var _marker_styles_f = function(feature) {
_map_1
.
removeLayer
(
_box_layer_1
);
_map_1
.
removeLayer
(
_marker_layer_1
);
}
console
.
log
(
"
pathname=
"
+
window
.
location
.
pathname
.
split
(
"
/
"
));
console
.
log
(
window
.
location
.
pathname
);
// Tricky part for situation where the actual server is reached
// by a redirection ( e.g. artemix.obspm.fr/fits/visit for
// juliette.obspm.fr:3021/visit
// This should be improved !
var
imageURL
=
window
.
location
.
origin
;
var
pathname_a
=
window
.
location
.
pathname
.
split
(
"
/
"
);
if
(
pathname_a
.
length
>
3
)
{
imageURL
+=
"
/
"
+
pathname_a
[
1
];
}
imageURL
+=
"
/
"
+
path_to_png
;
console
.
log
(
"
Image's URL is
"
+
imageURL
);
_im_layer_1
=
new
ol
.
layer
.
Image
({
var
imageURL
=
"
<%=urlRoot%>/
"
+
path_to_png
;
console
.
log
(
"
Image's URL is
"
+
imageURL
);
_im_layer_1
=
new
ol
.
layer
.
Image
({
source
:
new
ol
.
source
.
ImageStatic
({
url
:
imageURL
,
projection
:
_projection_1
,
...
...
yafitsv/views/setData.ejs
View file @
bf2da0e3
...
...
@@ -33,14 +33,13 @@
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
(){
console
.
log
(
window
.
location
.
href
);
document
.
getElementById
(
"
loading
"
).
style
=
"
block
"
;
$
.
post
(
"
setData
"
,
{
"
fileName
"
:
"
<%=path_to_fits%>
"
}).
done
(
function
(
resp
){
if
(
resp
[
"
status
"
]
==
false
)
{
alert
(
resp
[
"
message
"
]);
}
else
{
document
.
location
.
replace
(
"
?path=
"
+
"
<%=path_to_fits%>
"
);
document
.
location
.
replace
(
"
<%=urlRoot%>/visit/
?path=<%=path_to_fits%>
"
);
}
document
.
getElementById
(
"
loading
"
).
style
=
"
none
"
;
});
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment