| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
| |
Sometimes this can be a long way down,
if e.g. extra Open311 questions above.
|
|
|
|
|
| |
Add a WMTS config to use Buckinghamshire's own map tiles to display
house numbers.
|
|
|
|
|
|
| |
Run immediately, not onready, so the category change listener is in
place; listen to a better event, removing need for a debouncer; don't
look up if empty category.
|
|
|
|
|
|
| |
The form may be brought in via JS, so we have to add an event to
something that will always be there (or alternatively set up when
pulled in, which was the old pre-duplicates.js behaviour).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previously staff-only fixmystreet.set_up.manage_duplicates() has
been promoted from staff.js to its own file so that we can use it to
display the duplicate suggestions on the `/report/new` form.
render_duplicate_list (the old refresh_duplicate_list) no longer filters
or slices the reports_list returned by the ajax call, since it turns out
the server handles all of that (`sub _nearby_json` in `Report.pm` and
`sub nearby` in `Nearby.pm`).
Since the expandable list items include the "fancybox" image previews,
the fancybox CSS now has to be included in the `/report/new` page head,
hence the addition of "photo-js.html" in `fill_in_details.html`.
The “Get updates” flow reuses the same JavaScript that handles the
submission of the "Get updates" drawer at the bottom of around pages.
|
|
|
|
|
| |
The behaviour should be the same whether “Show older” or “Show older
reports” is clicked, but only the latter was updating the URL.
|
| |
|
|
|
|
|
|
| |
Remove the server-side zoom-in-url fix, instead use an ArgParser
subclass to default to the provided data if nothing in URL. Then
we can switch to using short lat/lon in geocoder URLs.
|
|
|
|
|
|
| |
Fixes #2242.
Co-authored-by: Matthew Somerville <matthew@mysociety.org>
|
|
|
|
| |
So it can run even when fixmystreet.js is not loaded.
|
| |
|
|
|
|
| |
The core validation_rules.js is not included on e.g. the front page.
|
| |
|
|
|
|
| |
Fixes #1649.
|
|
|
|
|
|
|
|
|
| |
use the bodies array of reporting_data to check if there is council
specific javascript validation and, if so, load that into the JS
validation rules.
This does mean we reset the validation rules each time you select a
category.
|
|
|
|
| |
Fixes #2294
|
|
|
|
|
|
|
| |
Includes an option to send to the council instead for e.g. reports on
underpasses or bridges.
Fixes #736
|
|
|
|
|
| |
Cobrands might include the fields elsewhere, e.g. in moderation.
Also only use 6 decimal places.
|
|
|
|
|
|
| |
replace_query_parameter() was stringifying select multiples, meaning
they were incorrectly recorded by the pushState and thus breaking on
navigation.
|
|
|
|
|
|
|
| |
Works for both the "Report" button shown in the mobile header,
and the "Report a problem" span on the desktop site.
Thanks to Louise for suggesting this in mysociety/collideoscope#42!
|
|
|
|
|
|
|
|
| |
Some cobrands (like Collideoscope) don’t have a .report-a-problem-btn
in their mobile nav menu, so .querySelector() would raise an exception
when we tried to attach an event listener to it.
Now we check that the element exists before attaching the listener.
|
| |
|
|
|
|
|
|
| |
We needed this for Collideoscope, where we’re displaying small bar
charts on the Statistics page, and the default bar height of 30px
was much too small when the chart was reduced in size.
|
|
|
|
|
| |
Collideoscope doesn't have fixed reports so only add a line for fixed
reports if there is data.
|
|
|
|
|
| |
Avoid a JS error if a line graph has no points. This is mostly useful
for collideoscope where we only want to show one line.
|
| |
|
|
|
|
| |
Bing no longer shows it at zoom level 11.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes #2016.
When you load a page that includes either a problem report, or is
centered on a location, the "Report a problem" button in the nav bar
(that normally takes you to the homepage) becomes a "Report a(nother)
problem here" button, that leads directly to the new report form
for the location in question.
On full map pages (/around and any /report/<id> pages loaded via it)
the reporting form will be rendered client-side, avoiding a full page
reload.
On pages lacking the full map (eg: missing fixmystreet.bbox_strategy),
namely /reports/<area> and any /report/<id> page that hasn’t been
client-side loaded via /around, we fall back to a server-side page load.
Finally, as you’d expect, the text and URL for the button dynamically
update as you move around the map, or switch between the different
client-side states of the reporting flow.
We also hide the button entirely when you’re reporting a problem,
which was something suggested a long time ago.
|
|/
|
|
|
|
|
|
| |
If an inspector clicks on a report from an around page the code to setup
the pin dragging needs to be called. This adds a method to the map to
allow the setup code to be called on report load.
Fixes #2073
|
|
|
|
|
|
|
| |
Also add body name to layer defaults, so they are only used where appropriate.
Switch mapit area javascript calls to GeoJSON, so we can drop KML support in
OpenLayers.wfs.js which saves a small amount of bandwidth.
|
|
|
|
|
|
|
|
|
|
|
| |
Return a list of associated bodies on around/new pages and in category ajax
calls, and use that when deciding whether to show/hide layers. If the layer
has no body information, then we show it as before, maybe based on category
selected; if it does, it is only shown if the layer body matches the bodies
for the point.
As part of this create a new VectorAsset class to handle all the visibility
changes for asset layers as it makes it a bit tidier.
|
|
|
|
| |
[fixmystreet.com] Update to use OS OpenMap Local tiles.
|
|
|
|
|
|
|
| |
Add a checkbox to show older reports, plus if we get to the end of the new
reports then instead of a Next button show a "show older" button that will
reload the current page but with older reports also loaded. Wire it all up
into the pushState code as well.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using `$('.pagination')` everywhere in javascript was causing issues
because that returns two elements. This was especially true when
triggering events as it was triggering two events so the data was being
loaded twice. This was also resulting in resetting the page to the
initial page so clicking the back button would always return to the
first page of results.
This also sets `use_page` when clicking the back button otherwise it
also loads the initial page.
|
|
|
|
|
| |
Categories could contain commas, so splitting on comma is not good enough.
Let’s escape the fields as if it’s a line in CSV. Fixes #2166.
|
|
|
|
|
| |
The fix in de36c49d1 broke pin clicking on other
map list pages, such as /my and /reports.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On a mobile device that implements pointer events, there are two events that
can happen on an /around page – touching the map starts a new report (or goes
back to the map if already on a report page); touching a pin pulls in that
report’s page. The map touch, which uses an OpenLayers.Handler.Click, operates
on click, whereas the pin touch, which uses an OpenLayers.Handler.Feature,
operates on touchstart. Neither event cancels the other, which means you can
end up either starting a new report, and then it tries to pull in an undefined
pin ID report and errors, or the pin report loads and then you instantly go
back to the map page.
In order to work around this, we disable the map click control when the feature
control event starts, and reactivate once the report data has been loaded.
|
|
|
|
|
|
|
|
|
| |
Going back to /around from /report/new can trigger loadend (and the
spinner hiding function) twice (if the strategy activation starts a
read), with triggerRead aborting that read and triggering the event
itself. This means the spinner is not displayed, as the count falls
below 0. We could pin the count above 0, but instead let’s log each
layer ID while ‘active’ and switch off when they’re all gone.
|
| |
|
| |
|
| |
|
|
|
|
| |
This is already defined in fixmystreet.utils further up.
|
|
|
|
|
| |
If a layer has an attribution option then add it to the attribution
control when the layer becomes visible.
|
|
|
|
|
| |
Fixes positioning bugs in all versions of IE due
to calculating the wrong horizontal position.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The "coerce pin ID to integer" behaviour to fix a previous issue was
coercing undefined to NaN, which then caused other problems with the
new report pin, such as fading out when hovered, and being the wrong
size.
Also improve the cursor handling, showing the grab/ grabbing cursors
where available.
|
|
|
|
|
|
| |
If you started a new report by clicking the map before the
server had responded with the map list pins, when they did
arrive they would replace the new report pin.
|
|
|
|
| |
Remove 'hooks' functions, and Split out USRN handling to its own object.
|