-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate to Bootstrap 5, implement light/dark mode
The main reason to upgrade was to allow dark mode, which is something various nighttime Operators have been requesting for a while. This upgrade forced various other smaller changes too. The pages all look a bit different, but hopefully mostly for the better. I had to upgrade DataTables to get to a Bootstrap 5-compatible version. One other tweak in this PR is that the instructions on the Field Report page are turned into an accordion (a Bootstrap 5 thing), so that they can be hidden by default.
- Loading branch information
Showing
30 changed files
with
1,040 additions
and
825 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,56 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1" t:render="root"> | ||
|
||
<head t:render="head" imports="ims,adminEvents" /> | ||
|
||
<body> | ||
<div t:render="container"> | ||
|
||
<div class="row" id="event_access_container"> | ||
|
||
<div class="col-sm-12 event_access"> | ||
<label>Access for <span class="event_name" /> (<span class="access_mode" />):</label> | ||
<div class="well well-sm"> | ||
<ul class="list-group list-group-small"> | ||
<li class="list-group-item"> | ||
<span class="badge remove-badge" onclick="removeAccess(this)"> | ||
<span class="glyphicon glyphicon-remove" /> | ||
</span> | ||
</li> | ||
</ul> | ||
<div> | ||
<label>Add:</label> | ||
<input | ||
id="access_add" | ||
class="form-control input-sm auto-width" | ||
type="text" inputmode="verbatim" | ||
placeholder="person:Tool" | ||
onchange="addAccess(this)" | ||
/> | ||
</div> | ||
<head t:render="head" imports="ims,adminEvents"/> | ||
|
||
<body> | ||
<div t:render="container"> | ||
<div class="row" id="event_access_container"> | ||
<div class="col-sm-12 py-1 event_access"> | ||
<div class="card"> | ||
<label class="card-header">Access for <span class="event_name"/> (<span class="access_mode"/>):</label> | ||
<div class="card-body"> | ||
<ul class="list-group list-group-small list-group-flush"> | ||
<li class="list-group-item"> | ||
<button class="badge btn btn-danger remove-badge float-end" onclick="removeAccess(this)"> | ||
X | ||
</button> | ||
</li> | ||
</ul> | ||
<div class="card-footer"> | ||
<label for="access_add">Add:</label> | ||
<input | ||
id="access_add" | ||
class="form-control input-sm auto-width" | ||
type="text" inputmode="verbatim" | ||
placeholder="person:Tool" | ||
onchange="addAccess(this)" | ||
/> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
<div class="row" id="event_new_container"> | ||
<div class="col-sm-12 event_access"> | ||
<label>Create New Event:</label> | ||
<input | ||
id="event_add" | ||
class="form-control input-sm auto-width" | ||
type="text" inputmode="verbatim" | ||
placeholder="Burn-A-Matic 3000" | ||
onchange="addEvent(this)" | ||
/> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</body> | ||
</div> | ||
<div class="row" id="event_new_container"> | ||
<div class="col-sm-12 event_access"> | ||
<label>Create New Event:</label> | ||
<input | ||
id="event_add" | ||
class="form-control input-sm auto-width" | ||
type="text" inputmode="verbatim" | ||
placeholder="Burn-A-Matic 3000" | ||
onchange="addEvent(this)" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
<script> | ||
var events = <json t:render="events_list" />; | ||
<script> | ||
var events = <json t:render="events_list"/>; | ||
|
||
initPage(); | ||
</script> | ||
applyTheme(); | ||
</script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,33 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1" t:render="root"> | ||
|
||
<head t:render="head" imports="ims,admin" /> | ||
<head t:render="head" imports="ims,admin"/> | ||
|
||
<body> | ||
<div t:render="container"> | ||
<ul> | ||
<li> | ||
<a t:render="url" url="adminIncidentTypes"> | ||
Incident Types | ||
</a> | ||
</li> | ||
<li> | ||
<a t:render="url" url="adminEvents"> | ||
Events | ||
</a> | ||
</li> | ||
<li> | ||
<a t:render="url" url="adminStreets"> | ||
Event Concentric Streets | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</body> | ||
<body> | ||
<div t:render="container"> | ||
<ul> | ||
<li> | ||
<a t:render="url" url="adminIncidentTypes"> | ||
Incident Types | ||
</a> | ||
</li> | ||
<li> | ||
<a t:render="url" url="adminEvents"> | ||
Events | ||
</a> | ||
</li> | ||
<li> | ||
<a t:render="url" url="adminStreets"> | ||
Event Concentric Streets | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</body> | ||
|
||
<script> | ||
<script> | ||
initPage(); | ||
</script> | ||
applyTheme(); | ||
</script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,32 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1" t:render="root"> | ||
|
||
<head t:render="head" imports="ims,adminStreets" /> | ||
<head t:render="head" imports="ims,adminStreets"/> | ||
|
||
<body> | ||
<div t:render="container"> | ||
<div class="row" id="event_streets_container"> | ||
<body> | ||
<div t:render="container"> | ||
<div class="row" id="event_streets_container"> | ||
|
||
<div class="col-sm-12 event_streets"> | ||
<label>Concentric streets for <span class="event_name" />:</label> | ||
<div class="well well-sm"> | ||
<ul class="list-group list-group-small"> | ||
<li class="list-group-item"> | ||
<span class="badge remove-badge" onclick="removeStreet(this)"> | ||
<span class="glyphicon glyphicon-remove" /> | ||
</span> | ||
</li> | ||
</ul> | ||
<!-- | ||
<div> | ||
<label>Add:</label> | ||
<input | ||
id="access_add" | ||
class="form-control input-sm auto-width" | ||
type="text" inputmode="verbatim" | ||
placeholder="??????" | ||
onchange="addStreet(this)" | ||
/> | ||
</div> | ||
--> | ||
</div> | ||
<div class="col-sm-12 event_streets"> | ||
<div class="card"> | ||
<label class="card-header">Concentric streets for <span class="event_name"/>:</label> | ||
<div class="card-body"> | ||
<ul class="list-group list-group-small"> | ||
<li class="list-group-item"> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</body> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
<script> | ||
var events = <json t:render="events_list" />; | ||
<script> | ||
var events = <json t:render="events_list"/>; | ||
|
||
initPage(); | ||
</script> | ||
applyTheme(); | ||
</script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,49 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1" t:render="root"> | ||
|
||
<head t:render="head" imports="ims,adminIncidentTypes" /> | ||
<head t:render="head" imports="ims,adminIncidentTypes"/> | ||
|
||
<body> | ||
<div t:render="container"> | ||
<div class="row" id="incident_types_container"> | ||
<body> | ||
<div t:render="container"> | ||
<div class="row" id="incident_types_container"> | ||
|
||
<div id="incident_types" class="col-sm-12 incident_types"> | ||
<label>Incident types:</label> | ||
<div class="well well-sm"> | ||
<ul class="list-group list-group-small"> | ||
<li class="list-group-item"> | ||
<span class="badge badge-visible" onclick="hideIncidentType(this)"> | ||
<span class="glyphicon glyphicon-eye-open" /> | ||
</span> | ||
<span class="badge badge-hidden" onclick="showIncidentType(this)"> | ||
<span class="glyphicon glyphicon-eye-close" /> | ||
</span> | ||
</li> | ||
</ul> | ||
<div> | ||
<label>Add:</label> | ||
<input | ||
class="form-control input-sm auto-width" | ||
type="text" inputmode="verbatim" | ||
placeholder="Chooch" | ||
onchange="addIncidentType(this)" | ||
/> | ||
</div> | ||
<div id="incident_types" class="col-sm-12 incident_types"> | ||
<div class="card"> | ||
<label class="card-header">Incident types</label> | ||
<div class="card-body"> | ||
<ul class="list-group list-group-small"> | ||
<li class="list-group-item"> | ||
<button class="badge btn btn-primary float-end badge-visible" | ||
onclick="hideIncidentType(this)"> | ||
Active | ||
</button> | ||
<button class="badge btn btn-warning float-end badge-hidden" | ||
onclick="showIncidentType(this)"> | ||
Hidden | ||
</button> | ||
</li> | ||
</ul> | ||
<div class="card-footer"> | ||
<label>Add:</label> | ||
<input | ||
class="form-control input-sm auto-width" | ||
type="text" inputmode="verbatim" | ||
placeholder="Chooch" | ||
onchange="addIncidentType(this)" | ||
/> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</body> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
<script> | ||
var events = <json t:render="events_list" />; | ||
<script> | ||
var events = <json t:render="events_list"/>; | ||
|
||
initPage(); | ||
</script> | ||
applyTheme(); | ||
</script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1" t:render="root"> | ||
|
||
<head t:render="head" imports="lscache,ims,viewIncident" | ||
/> | ||
<head t:render="head" imports="lscache,ims,viewIncident"/> | ||
|
||
<body /> | ||
<body/> | ||
|
||
<script> | ||
<!-- FIXME: figure out how to move this to / include from incident.js --> | ||
var editingAllowed = <json t:render="editing_allowed" />; | ||
var eventID = <json t:render="event_id" />; | ||
var incidentNumber = <json t:render="incident_number" />; | ||
<script> | ||
<!-- FIXME: figure out how to move this to / include from incident.js --> | ||
var editingAllowed = <json t:render="editing_allowed"/>; | ||
var eventID = <json t:render="event_id"/>; | ||
var incidentNumber = <json t:render="incident_number"/>; | ||
|
||
var pageTemplateURL = url_viewIncidentTemplate; | ||
var incidentsURL = urlReplace(url_incidents); | ||
var viewIncidentsURL = urlReplace(url_viewIncidents); | ||
var pageTemplateURL = url_viewIncidentTemplate; | ||
var incidentsURL = urlReplace(url_incidents); | ||
var viewIncidentsURL = urlReplace(url_viewIncidents); | ||
|
||
var concentricStreetNameByID = <json t:render="concentric_street_name_by_id" />; | ||
var concentricStreetNameByID = <json t:render="concentric_street_name_by_id"/>; | ||
|
||
initIncidentPage(); | ||
</script> | ||
initIncidentPage(); | ||
</script> | ||
|
||
</html> |
Oops, something went wrong.