| Commit message (Collapse) | Author | Age | Lines |
|
|
|
| |
An experiment towards fixing #525.
|
| |
|
|
|
|
|
| |
/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 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.
|
| |
|
|
|
|
|
| |
Add hook for post-title field content in report form.
Update translations.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
| |
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).
|
|\ |
|
| |
| |
| |
| |
| | |
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.
|
| |
|
|
|
|
|
| |
This matches the behaviour on /around, and prevents a refresh when
changing the state or category filters.
|
| |
|
|
|
|
|
|
| |
This lets people filter by multiple categories or states. It uses our
jQuery multi-select plugin to turn the <select multiple>s into little
overlay lists of checkboxes. HTML5 history is also supported.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Users with the `report_inspect` permission can click a new 'inspect' button on a
report page to input more detailed problem information into a new form that
appears in a column alongside the report detail.
- Inspector data is stored in problem's 'extra' field
- Report category/state can be edited
- Location can be changed by dragging the pin or HTML5 geolocation
(Factored out Zurich admin pin drag into own function)
For mysociety/fixmystreetforcouncils#22
|
|
|
|
|
| |
Remove unused code that is same as upstream (it was added when the map
middle didn't match the visible middle), and the world button.
|
|
|
|
|
| |
No need to use old OpenLayers PanZoom defaults, or load images we don't
want to use.
|
|
|
|
|
| |
No need for a special no-map case in the filters case, as all pages now
have fixmystreet.page set if needed.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Don't stringify pin problem ID, as get_marker_by_id assumes it will be
an integer; only activate the bounding box strategy if it exists; make
sure a refresh of the markers happens when going back to the list; set
the Back link on a pulled-in report to the current URL.
|
|
|
|
|
| |
Update the URL whenever location of pin is updated (first time, drag, or
reclick), make sure it works when clicking back.
|
|
|
|
|
|
|
|
|
|
|
| |
Include URL changing, using history.pushState.
Show a larger marker icon for the selected report.
Make sure title is updated, and correct sub_map_links are shown.
The /report/new template is now wrapped in a <div id="side-form">
rather than <div id="side"> for consistency with the /around page,
which keeps display_all_reports_in_area() simpler, because it can
always assume "#side" means "list of reports".
|
|
|
|
|
| |
On mobile, the notes in `#report-a-problem-sidebar` are hidden by
default, and can be toggled using the `.rap-notes-trigger`.
|
| |
|
| |
|
|
|
|
| |
Split big functions into smaller more descriptive ones.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This simplifies the page layout and code. We add a new #map_sidebar for
sidebar positioning, and a $mappage-header-height (defaulting to 4em)
variable. We no longer need:
* position_map_box;
* map_fix;
* special visual centre calculation; or
* custom pan zoom positioning.
As the sidebar now scrolls by itself and nothing can extend outside:
* The big-green-banner is set to 100% width (with negative margins no
longer required);
* For cobrands that have an overhanging sidebar (e.g. Zurich), we add
a .with-notes variant that adds a second column to the sidebar,
perfect for containing secondary notes about the form.
The resizing of the banner also required some tweaking to the size of
the chevron-white SVG images.
Update the $.fn.drawer() method for the new layout. Works well in IE7+8,
and degrades gracefully in IE6.
For IE7, we remove the existing z-index hacks, and put a new, simpler,
one in, and fix a CSS bug that was hiding the map.
Various cobrands are updated to adapt to the changes.
|
|
|
|
|
|
|
| |
Always centre the map on the new point when creating a new report. This
will be helpful when the map element can change width to accommodate the
.with-notes variant, is easier than the previous method, and feels very
natural.
|
| |
|
|
|
|
|
| |
We previously used !important to override them in the CSS, but better to
prevent them being set in the JavaScript in the first place.
|
| |
|
|
|
|
|
|
|
| |
Because the list of categories is reloaded when changing the location of an
in-progress report, it was possible for the category the user had selected
to be un-selected. This improves the situation by re-selecting that category
if it appears in the new list.
|