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
d4bb14e5
Commit
d4bb14e5
authored
Jan 31, 2019
by
Sergio Adrian Gongora Euan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.geoint.mx/mario.chirinos/GeoInt_SIDT
into dev
parents
206ca7b6
cfd87035
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
22 deletions
+42
-22
.gitignore
.gitignore
+24
-4
dataRetrieval.js
catalog/static/catalog/js/dataRetrieval.js
+17
-17
db.sqlite3
db.sqlite3
+0
-0
geosentinel
geosentinel
+1
-1
No files found.
.gitignore
View file @
d4bb14e5
# compiled code
# project
*.pyc
*.pyc
.idea/
.idea/
__pycache__/
geosentinel/
geosentinel/
geosentinel
db.sqlite3-journal
# django stufff
*.log
*.pot
*.pyc
__pycache__/
local_settings.py
db.sqlite3
media
# virtual env
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# pyenv
.python-version
catalog/static/catalog/js/dataRetrieval.js
View file @
d4bb14e5
...
@@ -26,33 +26,33 @@ var makeRequest = function (value) {
...
@@ -26,33 +26,33 @@ var makeRequest = function (value) {
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
polygonList
=
data
.
polygonList
;
polygonList
=
data
.
polygonList
;
while
(
pol_element
.
firstChild
)
{
while
(
pol_element
.
firstChild
)
{
pol_element
.
removeChild
(
pol_element
.
firstChild
);
pol_element
.
removeChild
(
pol_element
.
firstChild
);
}
}
if
(
polygonList
.
length
<=
0
)
{
if
(
polygonList
.
length
<=
0
)
{
var
temp
=
document
.
querySelector
(
'#city_list_template'
);
var
temp
=
document
.
querySelector
(
'#city_list_template'
);
// filling template
// filling template
temp
.
content
.
querySelector
(
'li'
).
id
=
''
;
temp
.
content
.
querySelector
(
'li'
).
id
=
''
;
temp
.
content
.
querySelectorAll
(
'span'
)[
0
].
textContent
=
'No cities matched your search. Try again.'
;
temp
.
content
.
querySelectorAll
(
'span'
)[
0
].
textContent
=
'No cities matched your search. Try again.'
;
temp
.
content
.
querySelectorAll
(
'span'
)[
1
].
textContent
=
''
;
temp
.
content
.
querySelectorAll
(
'span'
)[
1
].
textContent
=
''
;
temp
.
content
.
querySelectorAll
(
'div'
)[
3
].
textContent
=
''
;
temp
.
content
.
querySelectorAll
(
'div'
)[
3
].
textContent
=
''
;
var
clone
=
document
.
importNode
(
temp
.
content
,
true
);
var
clone
=
document
.
importNode
(
temp
.
content
,
true
);
document
.
querySelector
(
'#polygon-list'
).
appendChild
(
clone
);
document
.
querySelector
(
'#polygon-list'
).
appendChild
(
clone
);
}
else
{
}
else
{
data
.
polygonList
.
forEach
(
function
(
polygon
)
{
data
.
polygonList
.
forEach
(
function
(
polygon
)
{
var
temp
=
document
.
querySelector
(
'#city_list_template'
);
var
temp
=
document
.
querySelector
(
'#city_list_template'
);
// filling template
// filling template
temp
.
content
.
querySelector
(
'li'
).
id
=
polygon
.
id
;
temp
.
content
.
querySelector
(
'li'
).
id
=
polygon
.
id
;
temp
.
content
.
querySelectorAll
(
'span'
)[
0
].
textContent
=
polygon
.
city
+
", "
+
polygon
.
state
;
temp
.
content
.
querySelectorAll
(
'span'
)[
0
].
textContent
=
polygon
.
city
+
", "
+
polygon
.
state
;
temp
.
content
.
querySelectorAll
(
'span'
)[
1
].
textContent
=
polygon
.
description
;
temp
.
content
.
querySelectorAll
(
'span'
)[
1
].
textContent
=
polygon
.
description
;
temp
.
content
.
querySelectorAll
(
'div'
)[
3
].
textContent
=
"Fuente: "
+
polygon
.
source
;
temp
.
content
.
querySelectorAll
(
'div'
)[
3
].
textContent
=
"Fuente: "
+
polygon
.
source
;
var
clone
=
document
.
importNode
(
temp
.
content
,
true
);
var
clone
=
document
.
importNode
(
temp
.
content
,
true
);
document
.
querySelector
(
'#polygon-list'
).
appendChild
(
clone
);
document
.
querySelector
(
'#polygon-list'
).
appendChild
(
clone
);
});
});
...
@@ -84,16 +84,16 @@ function drawPolygon(element) {
...
@@ -84,16 +84,16 @@ function drawPolygon(element) {
osmap
.
removePolygon
();
osmap
.
removePolygon
();
// draw wkt polygon
// draw wkt polygon
//
osmap.addWKTPolygon(polygon.wkt_polygon);
osmap
.
addWKTPolygon
(
polygon
.
wkt_polygon
);
// format coords to draw
// format coords to draw
var
coords
=
osmap
.
formatCoords
(
polygon
.
geojson
.
geometry
.
coordinates
);
//
var coords = osmap.formatCoords(polygon.geojson.geometry.coordinates);
// get the biggest area
// get the biggest area
var
biggest
=
osmap
.
getBiggestPolygon
(
coords
);
//
var biggest = osmap.getBiggestPolygon(coords);
// draw coordsR
// draw coordsR
osmap
.
addPolygon
(
biggest
);
//
osmap.addPolygon(biggest);
}
}
})
})
}
}
...
@@ -164,7 +164,7 @@ function drawApiResponse(element) {
...
@@ -164,7 +164,7 @@ function drawApiResponse(element) {
function
createProductContainer
()
{
function
createProductContainer
()
{
var
temp_1
=
document
.
querySelector
(
'#product_cart_1'
);
var
temp_1
=
document
.
querySelector
(
'#product_cart_1'
);
// filling template
// filling template
temp_1
.
content
.
querySelector
(
'span'
).
textContent
=
"Product"
;
temp_1
.
content
.
querySelector
(
'span'
).
textContent
=
"Product"
;
...
@@ -180,7 +180,7 @@ $('#ajax-input').focus(function () {
...
@@ -180,7 +180,7 @@ $('#ajax-input').focus(function () {
$
(
'#option-list'
).
show
();
$
(
'#option-list'
).
show
();
OPT_LIST_IS_HIDDEN
=
false
;
OPT_LIST_IS_HIDDEN
=
false
;
}
}
}).
blur
(
function
()
{
}).
blur
(
function
(
event
)
{
INPUT_ON_FOCUS
=
false
;
INPUT_ON_FOCUS
=
false
;
if
(
!
OPT_LIST_IS_HIDDEN
&&
$
(
this
).
val
()
&&
$
(
event
.
target
).
closest
(
'#option-list'
).
length
)
{
if
(
!
OPT_LIST_IS_HIDDEN
&&
$
(
this
).
val
()
&&
$
(
event
.
target
).
closest
(
'#option-list'
).
length
)
{
$
(
'#option-list'
).
hide
();
$
(
'#option-list'
).
hide
();
...
@@ -245,13 +245,13 @@ $(document).ready(function () {
...
@@ -245,13 +245,13 @@ $(document).ready(function () {
typingTimer
=
setTimeout
(
makeRequest
.
bind
(
null
,
value
),
typingInterval
);
typingTimer
=
setTimeout
(
makeRequest
.
bind
(
null
,
value
),
typingInterval
);
}
else
{
}
else
{
$
(
'#option-list'
).
hide
();
$
(
'#option-list'
).
hide
();
while
(
pol_element
.
firstChild
)
{
while
(
pol_element
.
firstChild
)
{
pol_element
.
removeChild
(
pol_element
.
firstChild
);
pol_element
.
removeChild
(
pol_element
.
firstChild
);
}
}
OPT_LIST_IS_HIDDEN
=
true
;
OPT_LIST_IS_HIDDEN
=
true
;
return
return
}
}
});
});
...
@@ -306,7 +306,7 @@ $(document).ready(function () {
...
@@ -306,7 +306,7 @@ $(document).ready(function () {
temp
.
content
.
querySelectorAll
(
'span'
)[
1
].
textContent
=
data
.
product
.
identifier
;
temp
.
content
.
querySelectorAll
(
'span'
)[
1
].
textContent
=
data
.
product
.
identifier
;
temp
.
content
.
querySelectorAll
(
'span'
)[
2
].
textContent
=
data
.
product
.
size
;
temp
.
content
.
querySelectorAll
(
'span'
)[
2
].
textContent
=
data
.
product
.
size
;
temp
.
content
.
querySelectorAll
(
'span'
)[
3
].
textContent
=
data
.
product
.
instrumentname
;
temp
.
content
.
querySelectorAll
(
'span'
)[
3
].
textContent
=
data
.
product
.
instrumentname
;
var
clone
=
document
.
importNode
(
temp
.
content
,
true
);
var
clone
=
document
.
importNode
(
temp
.
content
,
true
);
document
.
querySelector
(
'#product-list-globe'
).
appendChild
(
clone
);
document
.
querySelector
(
'#product-list-globe'
).
appendChild
(
clone
);
}
}
...
@@ -399,7 +399,7 @@ $(document).ready(function () {
...
@@ -399,7 +399,7 @@ $(document).ready(function () {
productsToObtain
=
[];
productsToObtain
=
[];
data
.
product_list
.
forEach
(
function
(
product
)
{
data
.
product_list
.
forEach
(
function
(
product
)
{
var
temp_2
=
document
.
querySelector
(
'#product_cart_2'
);
var
temp_2
=
document
.
querySelector
(
'#product_cart_2'
);
// filling template
// filling template
temp_2
.
content
.
querySelector
(
'li'
).
id
=
product
.
uuid
;
temp_2
.
content
.
querySelector
(
'li'
).
id
=
product
.
uuid
;
temp_2
.
content
.
querySelector
(
'h4'
).
id
=
product
.
uuid
+
"-h4"
;
temp_2
.
content
.
querySelector
(
'h4'
).
id
=
product
.
uuid
+
"-h4"
;
...
@@ -426,7 +426,7 @@ $(document).ready(function () {
...
@@ -426,7 +426,7 @@ $(document).ready(function () {
}
}
});
});
// purchasing products in cart
// purchasing products in cart
$
(
'#purchased-product-form'
).
submit
(
function
(
event
)
{
$
(
'#purchased-product-form'
).
submit
(
function
(
event
)
{
event
.
preventDefault
();
event
.
preventDefault
();
...
...
db.sqlite3
View file @
d4bb14e5
No preview for this file type
geosentinel
View file @
d4bb14e5
/home/geointdev/sidt-env/GeoSentinel/geosentinel/
/home/emmanuelhp/Documentos/GeoSentinel/geosentinel
\ No newline at end of file
\ No newline at end of file
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