| Commit message (Collapse) | Author | Age | Lines |
| |
|
| |
|
|
|
|
| |
An experiment towards fixing #525.
|
|
|
|
|
|
| |
The location disambiguation page uses the frontpage JavaScript and has
lots of links pointing to /around, so the code should make sure those
links include the `js` parameter.
|
|
|
|
|
|
|
| |
Modern browsers disable geolocation on non-HTTPS pages, but
sadly still report it as available with the `navigator.geolocation`
object. This commit adds a check for HTTPS and hides the link
if it won’t work.
|
|
|
|
|
| |
The multi-select plugin is a separate project, and should be treated as
a vendor file.
|
|
|
|
|
|
|
| |
In particular, this lets us ensure only one multiselect can be open at
a time – for example in the "Show [X] reports about [Y]" list filters.
Fixes mysociety/fixmystreetforcouncils#247.
|
|\
| |
| |
| | |
Updated geolocation.js with concurrent changes.
|
| |
| |
| |
| |
| |
| | |
By creating a small file with only what is needed (focus, js flagging),
we can drop loading jQuery and all the application JavaScript on the
front page, prefetching them instead.
|
|/ |
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| | |
/around will now show all reports all the time, but we are about to
introduce pagination to stop that.
|
| |
| |
| |
| |
| | |
Both /reports and /my work by using the same URL with ajax=1. We should
use the same on /around for consistency.
|
|/ |
|
|
|
|
|
|
|
|
|
| |
The upgrade to OpenLayers in 31b8337e3 was not accompanied by fixing
the tileOrigin manually tweaked as an old workaround. This moved the
map c. 100m out of alignment.
Bristol fixed this in a7f60abb by adding topLeftCorners, but this is
better done by fixing origin_x/y.
|
|
|
|
|
|
|
|
|
|
| |
The JavaScript assumes it is, but due to a string comparison in
DBIx::Class [1] when a has_many prefetch is in use (as it is on
a /reports page when a shortlist-using staff user is logged in)
all IDs bar the first were being given an internal string value
and JSON encoding was outputting them as a string.
[1] https://github.com/dbsrgits/dbix-class/blob/v0.08209/lib/DBIx/Class/ResultSet.pm#L1331
|
| |
|
|
|
|
|
| |
The change in 17e38922 would not deal with the URL construted by the
map permalink code, or the redirect after inspection.
|
|
|
|
|
| |
If the list was replaced by JavaScript, the event handlers were being
dropped. Switch the handlers to the parent that remains present.
|
|
|
|
|
| |
Both /reports and /my share an ID and a /reports/ajax function, use
these also on /around (and share ajax/non-ajax code).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A seemingly unrelated change in ef6ffbdb was causing JS errors
on the /reports page which meant the map loading spinner
was permanently present. This commit fixes that, and also fixes
another bug which was uncovered where the ?ajax=1 param was
being ignored by the Zürich /reports page, leading to HTML
being returned and another JS error.
The call to `new OpenLayers.Bounds` in
OpenLayers.Strategy.FixMyStreet.getMapBounds was causing
three of the 4 bounds params to be lost when run on OpenLayers
2.11, as this version doesn’t accept an array to the Bounds
constructor. This in turn was using an invalid `bbox` parameter
(only the west value was present) in the AJAX call to /reports
which returned a 500 error. This then crashed the JS and caused
the loading spinner to get stuck.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is a much broader summary page, plus a body name autocomplete.
This was originally implemented for fixmystreet.com in 8a6a4ccb7.
It also adds '(no longer exists)' in the autocomplete next to
bodies not covering any areas.
You can supply the `--table` argument to `update-all-reports` to
generate the old-style data.
|
|
|
|
|
| |
Add hook for post-title field content in report form.
Update translations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The newest version of Dropzone has added support for client-side resizing of
images, so this commit upgrades to version 5.1.1 and takes advantage of that in
order to reduce the disc space consumed by uploaded images.
The target size & JPEG quality is quite aggressive, resulting in files in the
region of 200-300KB instead of several MB. I've tried to pick a value which
doesn't impact the usefulness of the photos in identifying problems.
Handily the new version also correctly rotates images according to the EXIF tag
so our patch has be reduced dramatically to deal with the sync nature of the
mini EXIF library in use.
Related to the disc space part of #1411, though EXIF metadata isn't stripped.
|
|
|
|
|
|
| |
Previously, a green marker would be used for reports as they were being
created. Now, cobrands can override `pin_new_report_colour` to show a
different pin image when users are creating a new report.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This makes the git hook that lints our own JavaScript easier,
and keeps things more cleanly separated.
We also remove unused third party libraries (select2 and
jquery.placeholder).
|
|
|
|
| |
If zoom level is >= 14, then inspectors can click a button that marks all reports in the map view as shortlisted
|
|
|
|
|
|
|
|
|
| |
Update the reports with a bounding box, similar to on around pages.
This is made slightly trickier because we don't want to do anything
on page load (we already have the pins), we need to reload when the
zoom changes, and we don't want the strategy to get confused by its
first redraw, e.g. on pin hover, We also need to turn off the zoom-
to-bounds if we've got a bounding box in the URL.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The RDI file format encapsulates information about inspections that have taken
place, and can be uploaded into Exor to create defects in bulk.
This commit adds a page to the Oxfordshire cobrand's admin allowing RDI files
to be generated and downloaded from FMS.
For mysociety/fixmystreetforcouncils#127
|
|
|
|
|
|
|
|
| |
- Use Problem->pin_data for single report page
- Promote markers_highlight to fixmystreet.maps API
We want to highlight map pins on the duplicate report selection UI, so let's use
what's already there instead of writing something new.
- Make sure duplicate report pins aren’t draggable
|
|
|
|
|
| |
This lets us version and cache-bust it as necessary, plus let
browser decide how to load it, we're always going to need it.
|
|
|
|
|
|
| |
Thanks to Dave Tapuska and Chrome team:
https://bugs.chromium.org/p/chromium/issues/detail?id=670942
https://github.com/openlayers/ol2/issues/1510
|
|
|
|
|
| |
The change to remove inline JavaScript stopped the Bromley-specific
tiles from working. Put them back with an extra JavaScript file.
|
|
|
|
| |
Including WFS for forthcoming assets layers.
|
|
|
|
|
|
|
|
| |
Includes newest, oldest, least/most recently updated, and most comments.
The default remains the same, which is last updated on /reports, and
newest on /my and /around (the latter plus not-in-view
sorted-by-distance ones).
|
|
|
|
|
| |
- A user can be assigned to any number of its body's categories
- The category ids are stored as a list in the user's extra field
|
| |
|
|\ |
|
| |
| |
| |
| |
| | |
This makes it easier to use the map, as the land outside the area is
shaded, rather than the area itself.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
If you were on a body page, selected a report, then another report, the
"Back to all reports" link then had an incorrect URL. Also, going "Back
to all reports" after one report would fetch an incorrect Ajax query of
reports to show (as the URL had not yet been updated).
Both of these are fixed by storing the URL on page load, and using that
for the "Back to all reports" link and the URL used by the Ajax call.
There is still an issue with the URL shown if you filter, then select a
report, then click "Back to all reports", but the contents are okay.
|
|
|
|
|
|
| |
It turns out that whilst IE9+ defines MouseEvent, it's not in the
form that can be used as a constructor until Edge. To fix this we
check that MouseEvent is a function before using it as one.
|