Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
f905eb0b
Commit
f905eb0b
authored
May 10, 2019
by
José Luis Uc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Agregado interación con el treeview
parent
a5d4d557
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
4 deletions
+29
-4
forms.py
catalog/forms.py
+1
-1
dataRetrieval.js
catalog/static/catalog/js/dataRetrieval.js
+6
-0
sidtMap.js
catalog/static/catalog/js/sidtMap.js
+5
-0
map.html
catalog/templates/map.html
+17
-3
No files found.
catalog/forms.py
View file @
f905eb0b
...
...
@@ -12,7 +12,7 @@ from .widgets import FengyuanChenDatePickerInput
all_process
=
Process
.
objects
.
filter
(
status
=
True
)
platforms
=
[
]
platforms
=
[]
for
each_process
in
all_process
:
platforms
.
append
((
each_process
.
platform_id
,
each_process
.
name
))
...
...
catalog/static/catalog/js/dataRetrieval.js
View file @
f905eb0b
...
...
@@ -175,6 +175,12 @@ function drawPolygon(element) {
osmap
.
addPolygon
(
coords
);
}
});
let
processTreeview
=
$
(
'li.processTreeview a'
);
let
parentClassList
=
processTreeview
[
0
].
parentElement
.
classList
;
if
(
!
parentClassList
.
contains
(
'menu-open'
)){
processTreeview
.
click
();
}
}
function
erase_input
()
{
...
...
catalog/static/catalog/js/sidtMap.js
View file @
f905eb0b
...
...
@@ -121,6 +121,11 @@ sidtMap.prototype.addInteraction = function()
this
.
interaction
.
on
(
"drawend"
,
function
(
e
){
self
.
showCoords
(
e
.
feature
.
getGeometry
());
let
processTreeview
=
$
(
'li.processTreeview a'
);
let
parentClassList
=
processTreeview
[
0
].
parentElement
.
classList
;
if
(
!
parentClassList
.
contains
(
'menu-open'
)){
processTreeview
.
click
();
}
});
this
.
interaction
.
on
(
"drawstart"
,
function
(
e
){
...
...
catalog/templates/map.html
View file @
f905eb0b
...
...
@@ -143,7 +143,7 @@
<input
type=
"hidden"
id=
"search_name"
name=
"search_name"
value=
"Drawn Polygon"
>
<input
type=
"hidden"
id=
"area_description"
name=
"area_description"
value=
"Without Description"
>
<ul
class=
"sidebar-menu"
data-widget=
"tree"
>
<li
class=
"treeview"
>
<li
class=
"
processTreeview
treeview"
>
<a
href=
"#"
>
<i
class=
"fa fa-sync-alt"
></i>
<span>
Process
</span>
...
...
@@ -155,7 +155,7 @@
<li
class=
"col-xs-12"
>
{{ searchForm.platform }}
</li>
</ul>
</li>
<li
class=
"treeview"
>
<li
class=
"
dateTreeview
treeview"
>
<a
href=
"#"
>
<i
class=
"fa fa-calendar-alt"
></i>
<span>
Date range
</span>
...
...
@@ -182,7 +182,7 @@
<li>
{{ searchForm.polygon }}
</li>
</ul>
</li>
<li
class=
"
treeview
"
>
<li
class=
"
cloudTreeview treeview
"
>
<a
href=
"#"
>
<i
class=
"fa fa-cloud"
></i>
<span>
Cloud percentage
</span>
...
...
@@ -364,4 +364,18 @@
var
purch_prod_url
=
"{% url 'purch-prod-rqst' %}"
;
var
del_prod_cartDB_url
=
"{% url 'del-cart-rqst' %}"
;
</script>
<script>
$
(
'#id_platform'
).
click
(
function
()
{
let
dateTreeview
=
$
(
'li.dateTreeview a'
);
dateTreeview
.
click
();
});
$
(
'#id_end'
).
on
(
'hide.datepicker'
,
function
(
e
)
{
setTimeout
(
function
()
{
let
cloudTreeview
=
$
(
'li.cloudTreeview a'
);
cloudTreeview
.
click
();
},
500
);
});
</script>
{% endblock %}
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