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
d77238d0
Commit
d77238d0
authored
Aug 28, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kml template uploading
parent
f781af46
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
1 deletion
+25
-1
select.css
js/select.css
+3
-0
select.js
js/select.js
+11
-0
select.html
select.html
+3
-0
select.php
select.php
+8
-1
No files found.
js/select.css
View file @
d77238d0
div
{
padding-bottom
:
4px
;
}
\ No newline at end of file
js/select.js
View file @
d77238d0
...
@@ -52,11 +52,22 @@ function parse_list(res){
...
@@ -52,11 +52,22 @@ function parse_list(res){
function
copy_models
(){
function
copy_models
(){
// testing
$
.
ajax
({
url
:
"select.php?cmd=copy"
,
success
:
function
(
response
){
console
.
log
(
response
);
}
});
$
(
".chkbox"
).
each
(
function
(){
$
(
".chkbox"
).
each
(
function
(){
if
(
$
(
this
).
prop
(
"checked"
)){
if
(
$
(
this
).
prop
(
"checked"
)){
$
.
ajax
({
$
.
ajax
({
url
:
"select.php?cmd=copy&set="
+
$
(
this
).
attr
(
'set'
)
+
"&model="
+
$
(
this
).
attr
(
'model'
),
url
:
"select.php?cmd=copy&set="
+
$
(
this
).
attr
(
'set'
)
+
"&model="
+
$
(
this
).
attr
(
'model'
),
type
:
'post'
,
data
:
$
(
'#kml'
)[
0
].
files
[
0
],
processData
:
false
,
success
:
function
(
response
){
success
:
function
(
response
){
console
.
log
(
response
);
console
.
log
(
response
);
}
}
...
...
select.html
View file @
d77238d0
...
@@ -21,6 +21,9 @@
...
@@ -21,6 +21,9 @@
</head>
</head>
<body>
<body>
<div>
KML template:
<input
id=
'kml'
type=
'file'
/>
</div>
<div>
<div>
<button
class=
'copy'
>
Copy checked to
<i>
models/
</i></button>
<button
class=
'copy'
>
Copy checked to
<i>
models/
</i></button>
</div>
</div>
...
...
select.php
View file @
d77238d0
...
@@ -11,6 +11,8 @@ if (isset($_GET['showall'])){
...
@@ -11,6 +11,8 @@ if (isset($_GET['showall'])){
if
(
$_GET
[
'cmd'
]
==
'copy'
){
if
(
$_GET
[
'cmd'
]
==
'copy'
){
$kml_template
=
file_get_contents
(
'php://input'
);
$set
=
$_GET
[
'set'
];
$set
=
$_GET
[
'set'
];
$model
=
$_GET
[
'model'
];
$model
=
$_GET
[
'model'
];
...
@@ -33,7 +35,12 @@ if ($_GET['cmd']=='copy'){
...
@@ -33,7 +35,12 @@ if ($_GET['cmd']=='copy'){
$kml
=
"
$base0
/
$model
/
$model
.kml"
;
$kml
=
"
$base0
/
$model
/
$model
.kml"
;
if
(
!
is_file
(
$kml
)){
if
(
!
is_file
(
$kml
)){
file_put_contents
(
$kml
,
generate_default_kml
(
$model
,
$ts
));
if
(
$kml_template
==
""
){
$kml_data
=
generate_default_kml
(
$model
,
$ts
);
}
else
{
$kml_data
=
$kml_template
;
}
file_put_contents
(
$kml
,
$kml_data
);
}
}
//gen thumbnail
//gen thumbnail
...
...
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