From 1e13d4e87498177080abaa24532db634cdc26ce0 Mon Sep 17 00:00:00 2001
From: Piero Toffanin
Date: Wed, 9 Nov 2016 08:52:50 -0500
Subject: [PATCH] Fixed CSS for firefox, JS error
---
app/models.py | 7 ++++++-
app/static/app/css/main.scss | 10 ++++++++++
app/static/app/css/sb-admin-2.css | 2 +-
app/static/app/js/components/TaskListItem.jsx | 4 ++--
app/templates/app/base.html | 4 ++--
5 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/app/models.py b/app/models.py
index 50e6cd54..a94a65e6 100644
--- a/app/models.py
+++ b/app/models.py
@@ -276,7 +276,12 @@ class Task(models.Model):
# Add to database another copy
self.orthophoto = GDALRaster(orthophoto_path, write=True)
- # TODO: Create tiles
+ # TODO:
+ # 1. Download tiles
+ # 2. Extract from zip
+ # 3. Add onDelete method to cleanup stuff
+ # 4. Add tile map API
+ # 5. Create map view
self.save()
except ProcessingException as e:
diff --git a/app/static/app/css/main.scss b/app/static/app/css/main.scss
index 7e329b0c..6a829686 100644
--- a/app/static/app/css/main.scss
+++ b/app/static/app/css/main.scss
@@ -3,6 +3,10 @@
min-height: 50px;
background-color: #18bc9c;
+ .navbar-header{
+ width: 100%;
+ }
+
.navbar-brand{
height: auto;
padding: 8px;
@@ -18,6 +22,7 @@
}
.navbar-top-links{
+ clear: both;
a.dropdown-toggle{
color: white;
}
@@ -65,6 +70,7 @@ ul#side-menu.nav{
clear: both;
h1,h2,h3,h4,h5{
padding-top: 4px;
+ margin-top: 0;
}
}
@@ -89,3 +95,7 @@ table.table-first-col-bold{
button i.glyphicon{
margin-right: 4px;
}
+
+.btn.btn-secondary{
+ background-color: #dddddd;
+}
diff --git a/app/static/app/css/sb-admin-2.css b/app/static/app/css/sb-admin-2.css
index 91a7320b..a1f83bd7 100644
--- a/app/static/app/css/sb-admin-2.css
+++ b/app/static/app/css/sb-admin-2.css
@@ -127,7 +127,7 @@ body {
z-index: 1;
position: absolute;
width: 250px;
- margin-top: 51px;
+ top: 51px;
}
.navbar-top-links .dropdown-messages,
diff --git a/app/static/app/js/components/TaskListItem.jsx b/app/static/app/js/components/TaskListItem.jsx
index 8fe8b6fc..97701135 100644
--- a/app/static/app/js/components/TaskListItem.jsx
+++ b/app/static/app/js/components/TaskListItem.jsx
@@ -65,7 +65,7 @@ class TaskListItem extends React.Component {
// Update timer if we switched to running
if (oldStatus !== this.state.task.status){
if (this.state.task.status === statusCodes.RUNNING){
- this.console.clear();
+ if (this.console) this.console.clear();
this.loadTimer(this.state.task.processing_time);
}else{
this.setState({time: this.state.task.processing_time});
@@ -195,7 +195,7 @@ class TaskListItem extends React.Component {
this.state.task.processing_node){
addActionButton("Restart", "btn-primary", "glyphicon glyphicon-remove-circle", this.genActionApiCall("restart", {
success: () => {
- this.console.clear();
+ if (this.console) this.console.clear();
this.setState({time: -1});
}
}
diff --git a/app/templates/app/base.html b/app/templates/app/base.html
index eb6d7602..6a4680f1 100644
--- a/app/templates/app/base.html
+++ b/app/templates/app/base.html
@@ -57,11 +57,11 @@
+ {% block navbar-top-links %}{% endblock %}
- OpenDroneMap
+ OpenDroneMap
- {% block navbar-top-links %}{% endblock %}
{% block navbar-sidebar %}{% endblock %}