Skip to content

Commit

Permalink
v1.2.0 shapes bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
answerquest committed Apr 14, 2018
1 parent c065fd7 commit 370794a
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# static-GTFS-manager
A browser-based user interface for creating, editing, exporting of static GTFS (General Transit Feed Specification Reference) feeds for a public transit authority.

**Development Status** : V 1.1.0 is ready, open for Beta Testing.
**Development Status** : V 1.2.0 is ready, open for Beta Testing.

This project is the result of a collaboration between WRI ([World Resources Institute](http://wri-india.org/)) and KMRL ([Kochi Metro Rail Limited](http://kochimetro.org)).

Expand Down
60 changes: 59 additions & 1 deletion js/commonstyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,62 @@ a.btn:hover {
text-decoration: none;
cursor: pointer;
}
/* ####################################*/
/* ####################################*/

/* https://www.bootply.com/112999 custom colors to add to bootstrap options */
/* apple colors */
[class*='-dark'] {
background-color:#02243C;
color:#f0f0f0;
}
/*
[class*='-light'] {
background-color:#f9f9f9;
color:#999;
}
*/
[class*='-blue'] {
background-color:#5195ce;
color:#fff;
}
[class*='-apple'] {
background-color:#005DB3;
color:#f8f8f8;
}
[class*='-gray'] {
background-color:#e6e6e6;
color:#666;
}
[class*='-green'] {
background-color:#5BC236;
color:#fff;
}

/* hover and active */
[class*='-dark']:hover,[class*='-dark']:focus {
background-color:#12254d;
color:#fff;
}
/*
was interfering with well divs on main page.
[class*='-light']:hover,[class*='-light']:active {
background-color:#eeeeee;
color:#fff;
}
*/
[class*='-blue']:hover,[class*='-blue']:active {
background-color:#62a6df;
color:#fff;
}
[class*='-apple']:hover,[class*='-apple']:active {
background-color:#116ec4;
color:#fff;
}
[class*='-gray']:hover,[class*='-gray']:active {
background-color:#d5d5d5;
color:#fff;
}
[class*='-green']:hover,[class*='-green']:active {
background-color:#6cd347;
color:#fff;
}
6 changes: 4 additions & 2 deletions web_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,9 +895,11 @@ def get(self):

shapeArray = readTableDB(dbfile, 'shapes', key='shape_id', value=shape_id)

returnJson = shapeArray
# need to sort this array before returning it. See https://github.com/WRI-Cities/static-GTFS-manager/issues/22
sortedShapeArray = sorted(shapeArray, key=lambda k: k['shape_pt_sequence'])
# from https://stackoverflow.com/a/73050/4355695

self.write(json.dumps(returnJson))
self.write(json.dumps(sortedShapeArray))
# time check, from https://stackoverflow.com/a/24878413/4355695
end = time.time()
print("shape GET call took {} seconds.".format(round(end-start,2)))
Expand Down

0 comments on commit 370794a

Please sign in to comment.