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
46ead909
Commit
46ead909
authored
May 10, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
descripcion reportes
parent
4562eac7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
179 additions
and
101 deletions
+179
-101
dataRetrieval.js
catalog/static/catalog/js/dataRetrieval.js
+36
-1
map.html
catalog/templates/map.html
+2
-1
templates.html
catalog/templates/templates.html
+141
-99
No files found.
catalog/static/catalog/js/dataRetrieval.js
View file @
46ead909
...
@@ -300,6 +300,40 @@ function creatCategoryProductContainer(catalog){
...
@@ -300,6 +300,40 @@ function creatCategoryProductContainer(catalog){
})
})
}
}
function
creatCategoryProductContainer2
(
catalog
){
productCategory
=
new
Map
();
console
.
log
(
catalog
);
console
.
log
(
catalog
[
0
].
product
.
title
);
console
.
log
(
catalog
[
0
].
start_date
);
console
.
log
(
catalog
[
0
].
end_date
);
console
.
log
(
catalog
.
length
);
var
temp_1
=
document
.
querySelector
(
'#product_list_category_2'
);
temp_1
.
content
.
querySelector
(
'span'
).
textContent
=
catalog
[
0
].
product
.
beginposition
;
temp_1
.
content
.
querySelectorAll
(
'span'
)[
1
].
textContent
=
catalog
[
0
].
start_date
;
temp_1
.
content
.
querySelectorAll
(
'span'
)[
2
].
textContent
=
catalog
[
0
].
end_date
;
temp_1
.
content
.
querySelectorAll
(
'span'
)[
3
].
textContent
=
catalog
.
length
;
temp_1
.
content
.
querySelector
(
'ul .control-sidebar-menu'
).
id
=
"L-"
+
catalog
[
0
].
product
.
title
;
var
clone_1
=
document
.
importNode
(
temp_1
.
content
,
true
);
document
.
querySelector
(
'#product-list-globe'
).
appendChild
(
clone_1
);
productCategory
=
new
Map
();
catalog
.
forEach
(
function
(
category
){
if
(
!
productCategory
.
has
(
category
.
product
.
tileid
)){
productCategory
.
set
(
category
.
product
.
tileid
,
1
)
var
temp_1
=
document
.
querySelector
(
'#product_list_category'
);
temp_1
.
content
.
querySelector
(
'li'
).
classList
.
add
(
"hidden"
);
temp_1
.
content
.
querySelector
(
'span'
).
textContent
=
category
.
product
.
tileid
;
temp_1
.
content
.
querySelector
(
'ul .control-sidebar-menu'
).
id
=
"L-"
+
category
.
product
.
tileid
;
var
clone_1
=
document
.
importNode
(
temp_1
.
content
,
true
);
document
.
querySelector
(
'#product-list-globe'
).
appendChild
(
clone_1
);
}
})
}
$
(
'#ajax-input'
).
focus
(
function
()
{
$
(
'#ajax-input'
).
focus
(
function
()
{
console
.
log
(
'in'
);
console
.
log
(
'in'
);
INPUT_ON_FOCUS
=
true
;
INPUT_ON_FOCUS
=
true
;
...
@@ -441,7 +475,8 @@ $(document).ready(function () {
...
@@ -441,7 +475,8 @@ $(document).ready(function () {
if
(
product_list
.
catalog
.
length
>
0
)
{
if
(
product_list
.
catalog
.
length
>
0
)
{
creatCategoryProductContainer
(
data
.
catalog
);
if
(
advanced_search
==
'True'
){
creatCategoryProductContainer
(
data
.
catalog
);}
else
{
creatCategoryProductContainer2
(
data
.
catalog
);}
requestedImages
=
0
requestedImages
=
0
catalogLength
=
data
.
catalog
.
length
catalogLength
=
data
.
catalog
.
length
data
.
catalog
.
forEach
(
function
(
data
,
index
)
{
data
.
catalog
.
forEach
(
function
(
data
,
index
)
{
...
...
catalog/templates/map.html
View file @
46ead909
...
@@ -368,6 +368,7 @@
...
@@ -368,6 +368,7 @@
var
prod_from_cartDB_url
=
"{% url 'from-cart-rqst' %}"
;
// url for requesting product from cart table in DB
var
prod_from_cartDB_url
=
"{% url 'from-cart-rqst' %}"
;
// url for requesting product from cart table in DB
var
purch_prod_url
=
"{% url 'purch-prod-rqst' %}"
;
var
purch_prod_url
=
"{% url 'purch-prod-rqst' %}"
;
var
del_prod_cartDB_url
=
"{% url 'del-cart-rqst' %}"
;
var
del_prod_cartDB_url
=
"{% url 'del-cart-rqst' %}"
;
var
advanced_search
=
'{{ advanced_search }}'
;
</script>
</script>
<script>
<script>
...
...
catalog/templates/templates.html
View file @
46ead909
<!--
<!--
Templates for filling with info in dataRetrieval.js file
Templates for filling with info in dataRetrieval.js file
-->
-->
...
@@ -20,9 +19,51 @@
...
@@ -20,9 +19,51 @@
</template>
</template>
<!-- city list template -->
<!-- city list template -->
<template
id=
"product_list_category_2"
>
<li
class=
"treeview"
>
<a
href=
"#"
>
<div
class=
"row"
>
<div
class=
"col-lg-2"
style=
"padding-top:33px"
>
<i
class=
"fa fa-cubes"
></i>
</div>
<div
class=
"col-lg-8"
style=
"padding: 0px"
>
<div>
<span
id=
""
></span>
</div>
<div>
<label>
Start Date:
</label>
<span></span>
</div>
<div>
<label>
End Date:
</label>
<span></span>
</div>
<div>
<label>
Number of objects:
</label>
<span></span>
</div>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
</div>
<!--div class="col-lg-2" style="padding-top:33px">
<i class="glyphicon glyphicon-remove" style="" onclick="deleteProductCar(this);"></i>
</div-->
</div>
</a>
<ul
class=
"treeview-menu sidebar-form"
>
<li>
<ul
id=
""
class=
"control-sidebar-menu product_list_category"
></ul>
</li>
</ul>
</li>
</template>
<!-- product list template -->
<!-- product list template -->
<template
id=
"product_list_category"
>
<template
id=
"product_list_category"
>
<li
class=
"treeview
"
>
<li
class=
"treeview"
id=
"lista_productos
"
>
<a
href=
"#"
>
<a
href=
"#"
>
<i
class=
"fa fa-cubes"
></i>
<i
class=
"fa fa-cubes"
></i>
<span></span>
<span></span>
...
@@ -38,6 +79,7 @@
...
@@ -38,6 +79,7 @@
</li>
</li>
</template>
</template>
<template
id=
"product_list_template"
>
<template
id=
"product_list_template"
>
<div
id=
""
class=
"single-product-input"
>
<div
id=
""
class=
"single-product-input"
>
<input
type=
"checkbox"
name=
"product_selected"
value=
""
checked
>
<input
type=
"checkbox"
name=
"product_selected"
value=
""
checked
>
...
@@ -78,7 +120,7 @@
...
@@ -78,7 +120,7 @@
</div>
</div>
<div
class=
"col-lg-8"
style=
"padding: 0px"
>
<div
class=
"col-lg-8"
style=
"padding: 0px"
>
<div>
<div>
<span
id=
""
></span>
<span
id=
""
></span>
</div>
</div>
<div>
<div>
<label>
Process:
</label>
<label>
Process:
</label>
...
...
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