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
3ad5c06d
Commit
3ad5c06d
authored
May 29, 2018
by
Renán Sosa Guillen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slide bar, cart addition
parent
22d085ee
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
13 deletions
+30
-13
body.css
catalog/static/css/body.css
+4
-2
dataRetrieval.js
catalog/static/js/dataRetrieval.js
+20
-5
base_top.html
catalog/templates/base_top.html
+3
-3
map.html
catalog/templates/map.html
+1
-1
views.py
catalog/views.py
+2
-2
No files found.
catalog/static/css/body.css
View file @
3ad5c06d
...
@@ -161,11 +161,13 @@ div .item-info-cart-view {
...
@@ -161,11 +161,13 @@ div .item-info-cart-view {
background-color
:
#dc7828
;
background-color
:
#dc7828
;
}
}
ul
.control-sidebar-menu
li
div
.item-info-view
{
ul
.control-sidebar-menu
li
div
.item-info-view
,
ul
.control-sidebar-menu
li
div
.item-info-cart-view
{
display
:
none
;
display
:
none
;
}
}
ul
.control-sidebar-menu
li
:hover
div
.item-info-view
{
ul
.control-sidebar-menu
li
:hover
div
.item-info-view
,
ul
.control-sidebar-menu
li
:hover
div
.item-info-cart-view
{
display
:
block
;
display
:
block
;
}
}
...
...
catalog/static/js/dataRetrieval.js
View file @
3ad5c06d
...
@@ -81,6 +81,13 @@ function erase_input() {
...
@@ -81,6 +81,13 @@ function erase_input() {
$
(
'#ajax-input'
).
val
(
''
);
$
(
'#ajax-input'
).
val
(
''
);
}
}
function
erase_product_globe_list
()
{
var
pol_element
=
document
.
getElementById
(
'product-list-cart'
);
while
(
pol_element
.
firstChild
)
{
pol_element
.
removeChild
(
pol_element
.
firstChild
);
}
}
var
prevfeature
=
null
;
var
prevfeature
=
null
;
function
drawApiResponse
(
element
)
{
function
drawApiResponse
(
element
)
{
product_list
.
catalog
.
forEach
(
function
(
data
)
{
product_list
.
catalog
.
forEach
(
function
(
data
)
{
...
@@ -161,7 +168,9 @@ $(document).ready(function () {
...
@@ -161,7 +168,9 @@ $(document).ready(function () {
// function for making POST request to productList in view.py
// function for making POST request to productList in view.py
$
(
'#product-form'
).
submit
(
function
(
event
)
{
$
(
'#product-form'
).
submit
(
function
(
event
)
{
var
submit_data
=
$
(
'#product-form'
).
serialize
();
var
submit_data
=
$
(
'#product-form'
).
serialize
();
erase_product_globe_list
();
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
url
:
prod_req_url
,
url
:
prod_req_url
,
...
@@ -233,8 +242,13 @@ $(document).ready(function () {
...
@@ -233,8 +242,13 @@ $(document).ready(function () {
$
(
'#product-list-globe'
).
append
(
product_html
);
$
(
'#product-list-globe'
).
append
(
product_html
);
}
}
});
});
});
});
$
(
'#globe'
).
addClass
(
"active"
);
$
(
'#control-sidebar-home-tab'
).
attr
(
'class'
,
"tab-pane active"
);
$
(
'aside'
).
addClass
(
"control-sidebar-open"
);
}
}
}
}
});
});
...
@@ -267,10 +281,10 @@ $(document).ready(function () {
...
@@ -267,10 +281,10 @@ $(document).ready(function () {
'<ul id="product-list-cart-items" class="control-sidebar-menu">'
;
'<ul id="product-list-cart-items" class="control-sidebar-menu">'
;
var
product_html_li
=
''
;
var
product_html_li
=
''
;
console
.
log
(
"djdj: "
,
productListGlobe
);
console
.
log
(
"djdj: "
,
productListGlobe
);
productListGlobe
.
forEach
(
function
(
data
)
{
productListGlobe
.
forEach
(
function
(
data
)
{
console
.
log
(
"SS: "
,
data
.
product
.
size
);
console
.
log
(
"SS: "
,
data
.
product
.
size
);
product_html_li
+=
'<li id="'
+
data
.
id
+
' class="hover-me">'
+
product_html_li
+=
'<li id="'
+
data
.
id
+
'
"
class="hover-me">'
+
'<a href="javascript:void(0)">'
+
'<a href="javascript:void(0)">'
+
'<i class="menu-icon glyphicon glyphicon-bookmark bg-red"></i>'
+
'<i class="menu-icon glyphicon glyphicon-bookmark bg-red"></i>'
+
'<div class="menu-info">'
+
'<div class="menu-info">'
+
...
@@ -290,13 +304,14 @@ $(document).ready(function () {
...
@@ -290,13 +304,14 @@ $(document).ready(function () {
'<span class="data-info">'
+
data
.
product
.
size
+
'</span>'
+
'<span class="data-info">'
+
data
.
product
.
size
+
'</span>'
+
'</p>'
+
'</p>'
+
'<p class="info">'
+
'<p class="info">'
+
'<i class="fa fa-
calendar-
gear"></i>'
+
'<i class="fa fa-gear"></i>'
+
'<span class="type">Instrument:</span><br>'
+
'<span class="type">Instrument:</span><br>'
+
'<span class="data-info">'
+
data
.
product
.
instrumentname
+
'</span>'
+
'<span class="data-info">'
+
data
.
product
.
instrumentname
+
'</span>'
+
'</p>'
+
'</p>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</li>'
;
'</li>'
;
console
.
log
(
"DUPLI: "
,
product_html_li
);
});
});
product_html_li
+=
'</ul>'
+
product_html_li
+=
'</ul>'
+
...
@@ -304,7 +319,7 @@ $(document).ready(function () {
...
@@ -304,7 +319,7 @@ $(document).ready(function () {
'</ul>'
+
'</ul>'
+
'</li>'
;
'</li>'
;
console
.
log
(
"DUPLI2: "
,
product_html
+
product_html_li
);
$
(
'#product-list-cart'
).
append
(
product_html
+
product_html_li
);
$
(
'#product-list-cart'
).
append
(
product_html
+
product_html_li
);
// product_html = '';
// product_html = '';
});
});
...
...
catalog/templates/base_top.html
View file @
3ad5c06d
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
</li>
</li>
<!-- Control Sidebar Toggle Button -->
<!-- Control Sidebar Toggle Button -->
<li>
<li>
<a
href=
"#"
data-toggle=
"control-sidebar"
><i
class=
"fa fa-shopping-cart"
></i></a>
<a
id=
"product-list-toggle"
href=
"#"
data-toggle=
"control-sidebar"
><i
class=
"fa fa-shopping-cart"
></i></a>
</li>
</li>
</ul>
</ul>
</div>
</div>
...
@@ -94,8 +94,8 @@
...
@@ -94,8 +94,8 @@
<aside
class=
"control-sidebar control-sidebar-dark"
>
<aside
class=
"control-sidebar control-sidebar-dark"
>
<!-- Create the tabs -->
<!-- Create the tabs -->
<ul
class=
"nav nav-tabs nav-justified control-sidebar-tabs"
>
<ul
class=
"nav nav-tabs nav-justified control-sidebar-tabs"
>
<li><a
href=
"#control-sidebar-home-tab"
data-toggle=
"tab"
><i
class=
"fa fa-globe"
></i></a></li>
<li
id=
"globe"
><a
href=
"#control-sidebar-home-tab"
data-toggle=
"tab"
><i
class=
"fa fa-globe"
></i></a></li>
<li><a
href=
"#control-sidebar-settings-tab"
data-toggle=
"tab"
><i
class=
"fa fa-shopping-cart"
></i></a></li>
<li
id=
"cart"
><a
href=
"#control-sidebar-settings-tab"
data-toggle=
"tab"
><i
class=
"fa fa-shopping-cart"
></i></a></li>
</ul>
</ul>
<!-- Tab panes -->
<!-- Tab panes -->
<div
class=
"tab-content"
>
<div
class=
"tab-content"
>
...
...
catalog/templates/map.html
View file @
3ad5c06d
...
@@ -187,7 +187,7 @@
...
@@ -187,7 +187,7 @@
</a>
</a>
<ul
class=
"treeview-menu sidebar-form"
>
<ul
class=
"treeview-menu sidebar-form"
>
<li>
<li>
<input
class=
"form-control"
type=
"
text
"
name=
"cloudPercentage"
>
<input
class=
"form-control"
type=
"
number
"
name=
"cloudPercentage"
>
</li>
</li>
</ul>
</ul>
</li>
</li>
...
...
catalog/views.py
View file @
3ad5c06d
...
@@ -43,10 +43,10 @@ def requestToImage(request):
...
@@ -43,10 +43,10 @@ def requestToImage(request):
# img_link = img_link[:img_link.find("/") + 2] + "emmhp:geoemm29@" + img_link[img_link.find("/") + 2:]
# img_link = img_link[:img_link.find("/") + 2] + "emmhp:geoemm29@" + img_link[img_link.find("/") + 2:]
# r = requests.get(img_link, auth=("emmhp", "geoemm29"), stream=True)
# r = requests.get(img_link, auth=("emmhp", "geoemm29"), stream=True)
# print("RAAAW: ", r.raw
.read()
)
# print("RAAAW: ", r.raw)
return
JsonResponse
({
'img'
:
"reqToIMG"
})
return
JsonResponse
({
'img'
:
"reqToIMG"
})
# return HttpResponse(r.raw
.read()
, content_type="image/jpeg")
# return HttpResponse(r.raw, content_type="image/jpeg")
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
def
productList
(
request
):
def
productList
(
request
):
...
...
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