Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x3domlet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
x3domlet
Commits
f4bfab1e
Commit
f4bfab1e
authored
Jul 14, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kml saving results display
parent
dbfa2f03
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
kml.js
js/kml.js
+14
-0
test.html
test.html
+3
-0
No files found.
js/kml.js
View file @
f4bfab1e
...
...
@@ -93,6 +93,20 @@ function postKmlData(filename, xml) {
data
:
xml
,
async
:
true
,
complete
:
function
(
response
){
//console.log(response.responseText);
var
res
=
parseInt
(
response
.
responseText
);
if
(
res
==
0
){
console
.
log
(
"test!"
);
$
(
"#kmlstatus"
).
css
({
color
:
"rgba(70,200,70,1)"
}).
html
(
"saved"
);
$
(
"#kmlstatus"
).
show
(
0
).
delay
(
500
).
fadeOut
(
250
);
}
else
{
var
msg
=
"some error"
;
if
((
res
==-
1
)
||
(
res
==-
2
))
msg
=
"file does not exist"
;
if
(
res
==-
3
)
msg
=
"read only file"
;
$
(
"#kmlstatus"
).
css
({
color
:
"rgba(200,70,70,1)"
}).
html
(
"fail: "
+
msg
);
$
(
"#kmlstatus"
).
show
(
0
).
delay
(
1000
).
fadeOut
(
250
);
}
//do nothing
},
contentType
:
"text/xml; charset=
\"
utf-8
\"
"
...
...
test.html
View file @
f4bfab1e
...
...
@@ -139,6 +139,9 @@ Instructions:
<button
id=
'restorekml'
class=
'ic donothide'
title=
'restore'
><img
src=
'js/images/ic_file_download_black_48dp_1x.png'
class=
'icim donothide'
/></button>
<button
id=
'savekml'
class=
'ic donothide'
title=
'save'
><img
src=
'js/images/ic_file_upload_black_48dp_1x.png'
class=
'icim donothide'
/></button>
</td>
<td
valign=
'middle'
>
<div
id=
'kmlstatus'
></div>
</td>
</tr>
<tr
class=
'experimental'
>
<td>
...
...
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