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
79f3469d
Commit
79f3469d
authored
Jun 01, 2018
by
Renán Sosa Guillen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
product-cart functionality
parent
34cbd991
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
271 additions
and
127 deletions
+271
-127
forms.py
catalog/forms.py
+3
-2
body.css
catalog/static/css/body.css
+159
-53
dataRetrieval.js
catalog/static/js/dataRetrieval.js
+78
-70
base_top.html
catalog/templates/base_top.html
+31
-2
No files found.
catalog/forms.py
View file @
79f3469d
# -*- coding: utf-8 -*-
from
django
import
forms
import
datetime
#from django.contrib.auth.forms import UserCreationForm
#from django.contrib.auth.models import User
#from buscador.models import Investigador, Reto
...
...
@@ -12,7 +13,7 @@ platforms = [
class
ASFSearchForm
(
forms
.
Form
):
polygon
=
forms
.
CharField
(
widget
=
forms
.
TextInput
(
attrs
=
{
'class'
:
"form-control"
}))
platform
=
forms
.
ChoiceField
(
choices
=
platforms
,
widget
=
forms
.
Select
(
attrs
=
{
'class'
:
"form-control"
}))
start
=
forms
.
DateField
(
widget
=
forms
.
Date
TimeInput
(
attrs
=
{
'type'
:
'datetime-local
'
}),
required
=
True
)
end
=
forms
.
DateField
(
widget
=
forms
.
DateTimeInput
(
attrs
=
{
'type'
:
'datetime-local
'
}),
required
=
True
)
start
=
forms
.
DateField
(
widget
=
forms
.
Date
Input
(
attrs
=
{
'type'
:
'date
'
}),
required
=
True
)
end
=
forms
.
DateField
(
initial
=
datetime
.
date
.
today
,
widget
=
forms
.
DateInput
(
attrs
=
{
'type'
:
'date
'
}),
required
=
True
)
maxResults
=
forms
.
IntegerField
()
catalog/static/css/body.css
View file @
79f3469d
...
...
@@ -135,87 +135,181 @@ li.pol {
border-color
:
#222d32
;
}
div
.item-info-view
{
/*div .item-info-view {*/
/*position: absolute;*/
/*background: white;*/
/*border-top-left-radius: 10px;*/
/*border-bottom-left-radius: 10px;*/
/*border-bottom-right-radius: 10px;*/
/*top: 52px;*/
/*left: -402px;*/
/*width: 400px;*/
/*height: 360px;*/
/*background-color: #dc7828;*/
/*}*/
/*div .item-info-cart-view {*/
/*position: absolute;*/
/*background: white;*/
/*border-top-left-radius: 10px;*/
/*border-bottom-left-radius: 10px;*/
/*border-bottom-right-radius: 10px;*/
/*top: -106px;*/
/*left: -417px;*/
/*width: 400px;*/
/*height: 360px;*/
/*background-color: #dc7828;*/
/*}*/
/*ul.control-sidebar-menu li div.item-info-view,*/
/*ul.control-sidebar-menu li div.item-info-cart-view {*/
/*display: none;*/
/*}*/
/*ul.control-sidebar-menu li:hover div.item-info-view,*/
/*ul.control-sidebar-menu li:hover div.item-info-cart-view {*/
/*display: block;*/
/*}*/
/*div .cropped-preview {*/
/*max-height: 200px;*/
/*overflow: hidden;*/
/*}*/
div
.info-product-box
{
position
:
absolute
;
background
:
white
;
border-top-left-radius
:
10
px
;
border-bottom-left-radius
:
10
px
;
border-bottom-right-radius
:
1
0px
;
top
:
52px
;
left
:
-402px
;
width
:
400px
;
height
:
360
px
;
background-color
:
#dc7828
;
display
:
block
;
top
:
148
px
;
left
:
-552
px
;
height
:
9
0px
;
background
:
#fff
;
width
:
240%
;
box-shadow
:
0
1px
1px
rgba
(
0
,
0
,
0
,
0.1
)
;
border-radius
:
2
px
;
margin-bottom
:
15px
;
}
div
.item-info-cart-view
{
position
:
absolute
;
background
:
white
;
border-top-left-radius
:
10px
;
border-bottom-left-radius
:
10px
;
border-bottom-right-radius
:
10px
;
top
:
-106px
;
left
:
-417px
;
width
:
400px
;
height
:
360px
;
ul
.control-sidebar-menu
li
div
.bg-geo
{
display
:
none
;
}
ul
.control-sidebar-menu
li
:hover
div
.bg-geo
{
display
:
block
;
}
div
.bg-geo
{
background-color
:
#dc7828
;
}
ul
.control-sidebar-menu
li
div
.item-info-view
,
ul
.control-sidebar-menu
li
div
.item-info-cart-view
{
display
:
none
;
.info-product-box-img
{
border-top-left-radius
:
2px
;
border-bottom-left-radius
:
2px
;
float
:
left
;
height
:
90px
;
width
:
90px
;
text-align
:
center
;
}
ul
.control-sidebar-menu
li
:hover
div
.item-info-view
,
ul
.control-sidebar-menu
li
:hover
div
.item-info-cart-view
{
display
:
block
;
.info-product-box-img
img
{
border-top-left-radius
:
2px
;
border-bottom-left-radius
:
2px
;
height
:
90px
;
}
div
.cropped-preview
{
max-height
:
200px
;
overflow
:
hidden
;
.info-product-box-content
{
font
:
Helvetica
;
padding
:
5px
10px
;
margin-left
:
90px
;
}
div
.cropped-preview
img
{
width
:
50px
;
/*.info-product-box-text {*/
/*text-transform: uppercase;*/
/*}*/
.info-product-box-number
{
display
:
block
;
font-weight
:
bold
;
font-size
:
18px
;
}
div
.cropped-preview
img
{
width
:
100%
;
b
order-top-left-radius
:
10px
;
.info-product-box
.progress
.progress-bar
{
border-radius
:
0
;
b
ackground
:
#fff
;
}
div
.polygon-item-data
{
margin
:
10px
;
color
:
white
;
.info-product-box
.progress
{
background
:
rgba
(
0
,
0
,
0
,
0.2
);
margin
:
5px
-10px
5px
-10px
;
height
:
2px
;
}
div
.polygon-item-data
.city
{
font-size
:
12px
;
font-weight
:
bolder
;
padding-bottom
:
5px
;
border-bottom
:
2px
solid
;
.progress-description
{
margin
:
0
;
}
div
.polygon-item-data
.info
{
font-size
:
16px
;
margin-top
:
15px
;
margin-left
:
15px
;
.progress-description
,
.info-product-box-text
{
display
:
block
;
font-size
:
14px
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
div
.polygon-item-data
.info
.type
{
font-weight
:
bold
;
margin-left
:
10px
;
.info-product-box-text
,
.info-product-box-number
,
.progress-description
{
color
:
white
;
}
div
.
polygon-item-data
.info
.data-info
{
margin-left
:
27px
;
div
.
menu-info
h4
{
cursor
:
pointer
;
}
div
.item-info-view
.button-add-del
{
padding-left
:
58%
;
.treeview-menu
>
li
{
text-align
:
center
;
}
/*div .cropped-preview img {*/
/*width: 50px;*/
/*}*/
/*div .cropped-preview img {*/
/*width: 100%;*/
/*border-top-left-radius: 10px;*/
/*}*/
/*div .polygon-item-data {*/
/*margin: 10px;*/
/*color: white;*/
/*}*/
/*div .polygon-item-data .city {*/
/*font-size: 12px;*/
/*font-weight: bolder;*/
/*padding-bottom: 5px;*/
/*border-bottom: 2px solid;*/
/*}*/
/*div .polygon-item-data .info {*/
/*font-size: 16px;*/
/*margin-top: 15px;*/
/*margin-left: 15px;*/
/*}*/
/*div .polygon-item-data .info .type {*/
/*font-weight: bold;*/
/*margin-left: 10px;*/
/*}*/
/*div .polygon-item-data .info .data-info {*/
/*margin-left: 27px;*/
/*}*/
/*div .item-info-view .button-add-del {*/
/*padding-left: 58%;*/
/*}*/
div
#product-list-globe
,
div
#product-list-cart-items
{
max-height
:
500px
;
...
...
@@ -235,6 +329,18 @@ div .sidebar-button button {
margin-top
:
17px
;
margin-left
:
10px
;
}
.menu-info
input
[
type
=
checkbox
]
{
position
:
relative
;
left
:
140px
;
bottom
:
30px
;
}
/*ul.control-sidebar-menu input[type=checkbox] {*/
/*position: absolute;*/
/*right: 20px;*/
/*bottom: 35px;*/
/*}*/
/*----------product list clases----------*/
div
.draw-button
{
...
...
catalog/static/js/dataRetrieval.js
View file @
79f3469d
This diff is collapsed.
Click to expand it.
catalog/templates/base_top.html
View file @
79f3469d
...
...
@@ -101,19 +101,48 @@
<div
class=
"tab-content"
>
<!-- Home tab content -->
<div
class=
"tab-pane"
id=
"control-sidebar-home-tab"
>
<form
id=
'product-to-cart-form'
role=
"form"
method=
"post"
>
{% csrf_token %}
<div
class=
"container"
>
<div
class=
"sidebar-title"
>
<h3><b>
Products
</b></h3>
</div>
<div
class=
"sidebar-button"
>
<button
type=
"
button
"
name=
"search"
id=
"add-cart"
class=
"btn btn-primary"
>
<button
type=
"
submit
"
name=
"search"
id=
"add-cart"
class=
"btn btn-primary"
>
Add to cart
</button>
</div>
</div>
<!-- this ul element is filled with data -->
<ul
id=
"product-list-globe"
class=
"control-sidebar-menu"
></ul>
<ul
id=
"product-list-globe"
class=
"control-sidebar-menu"
>
{#
<li
id=
"4569852"
class=
"hover-me"
>
#}
{#
<a
href=
"javascript:void(0)"
>
#}
{#
<i
class=
"menu-icon glyphicon glyphicon-bookmark bg-red"
></i>
#}
{#
<div
class=
"menu-info"
>
#}
{#
<h4
class=
"control-sidebar-subheading"
>
#}
{# S2MSI1C_15QZ#}
{#
</h4>
#}
{#
<p>
2018-05-15T16:18:29.027
</p>
#}
{#
<input
type=
"checkbox"
value=
"4569852"
>
#}
{#
</div>
#}
{#
</a>
#}
{#
<div
class=
"info-product-box bg-geo"
style=
"top: 148px;"
>
#}
{#
<span
class=
"info-product-box-img"
>
#}
{#
<img
src=
"/static/images/sat_preview/sat_test.jpg"
>
#}
{#
</span>
#}
{#
<div
class=
"info-product-box-content"
>
#}
{#
<span
class=
"info-product-box-text"
>
S2B_MSIL1C_20180515T161829_N0206_R040_T15QZD_20180515T194031
</span>
#}
{#
<span
class=
"info-product-box-number"
>
686.51 MB
</span>
#}
{#
<div
class=
"progress"
>
#}
{#
<div
class=
"progress-bar"
style=
"width: 100%"
></div>
#}
{#
</div>
#}
{#
<span
class=
"progress-description"
>
Multi-Spectral Instrument
</span>
#}
{#
</div>
#}
{#
</div>
#}
{#
</li>
#}
</ul>
<!-- /.control-sidebar-menu -->
{#
</form>
#}
</div>
<!-- /.tab-pane -->
<!-- Stats tab content -->
...
...
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