aboutsummaryrefslogtreecommitdiffstats
path: root/web
Commit message (Collapse)AuthorAgeLines
* Allow invalid MapServer6 GML to be parsedDave Arter2018-02-22-0/+21
|
* Populate `usrn` field with USRN of clicked asset, if availableDave Arter2018-02-22-16/+105
| | | | | | | | | | | | | | | | | | | | | | | | Some cobrands require reports to include the USRN of the clicked road. This commit allows an asset layer to be added and designated as a 'USRN provider' by setting its `usrn_field` property when calling fixmystreet.assets.add. Initially this feature used OpenLayers' getFeatureFromEvent method, however that doesn't work if the layer isn't topmost. This is because it uses the clicked element in the DOM to determine which feature was clicked. This doesn't work if the layer you're trying to get the feature from wasn't actually the DOM element that was clicked. Instead, we add a new method, OpenLayers.Layer.Vector.getFeatureAtPoint method which takes a Point object and iterates through the features' geometries to find the matching point. To make things a little more user-friendly, if an asset isn't clicked directly we find the closest to the clicked point and use that for the USRN. To accomplish this, this commit factors out the ‘select nearest asset’ code into a new method OpenLayers.Layer.Vector.getNearestFeature, which takes a Point and a distance threshold and finds the nearest feature.
* Set asset layers’ z-indexes appropriately so they don’t cover the marker ↵Dave Arter2018-02-22-12/+17
| | | | layer
* [UK] Track clicks on ".big-green-button"Zarino Zappia2018-02-21-0/+6
| | | | | | | | | We’re interested in seeing whether people are mistakenly clicking the (inert) "Click map to report a problem" banner on the `/around` page. This will record a Google Analytics event if and when they do. Fixes mysociety/fixmystreet-commercial#963.
* Fix duplicate report selectionDave Arter2018-02-20-1/+0
| | | | | | | | The underlying DOM structure returned from /report/xx/nearby.json had changed, meaning the "Which report is it a duplicate of?" list on the inspector form wasn't displaying any reports. This commit introduces a template specifically for the nearby URL instead of overloading the on_map_list_items template.
* [UK Councils] Improve prefilled report text.Matthew Somerville2018-02-15-2/+2
|
* Refactor asset loading code to be more idiomaticDave Arter2018-02-13-81/+87
| | | | | | | This simplifies the asset layer loading code to allow multiple layers to be created and added to the map at the correct time. This also means always_visible layers are, in fact, always visible, and not hidden when the map is clicked or a category-specific asset layer is shown.
* WFS asset layers can set their name attributeDave Arter2018-02-13-4/+6
|
* Improvements to asset layer user interactionDave Arter2018-02-13-33/+60
| | | | | | | | | | | | | | | | | | This commit allows asset layers to be added to the map that have more complex behaviours than simply 'click a marker'. - Layers can be non-interactive and/or always visible Previously an asset layer would only be shown when its associated category was chosen from the dropdown. You can now add layers which are always visible, as well as ignoring user input. Useful for, e.g. showing an LLPG overlay on the map. - Stylemaps can be provided for individual layers This means you can, for example, have custom rules for styling features based on their attributes or other complex rules. - Functions can be used for the feature/report field mapping Instead of a one-to-one mapping between feature attributes and fields on the new report form, you can provide a callback function which can provide a calculated value to the report form.
* Make asset layer WFS configuration more customisableDave Arter2018-02-13-14/+36
| | | | | | | | | | | | | | | | | | | | | | This commit makes it easier to customise the way asset layers are loaded over WFS, including: - Adds support for WFS layers via GET method The standard HTTP method for WFS GetFeature requests is POST, but some WFS services only support GET. OpenLayers.Protocol.WFS is hardcoded to use POST, but we can use OpenLayers.Protocol.HTTP instead to use GET. The options passed to fixmystreet.add_assets should include a 'http_options' object which configures the HTTP protocol. - Allows HTTP asset layers to provide their own format This makes it simpler to use GeoJSON, for example, instead of the default of GML. - Asset layers can provide their own loading strategy The default strategy can be overridden if, for example, you want to use a BBOX strategy with a smaller ratio in order to load fewer features at a time.
* Fix OpenLayers.Projection.OS transformsDave Arter2018-02-13-2/+10
| | | | | | | | | | | | | It seems that the projectInverse/projectForward methods in OpenLayers.Layer.SphericalMercator have been renamed which was causing problems. Additionally this gem was buried in the OpenLayers.Projection.transform docs: Returns point - [...] The original point is modified. The previous code didn't seem to modify the original point which was confusing OpenLayers.
* Show loading spinner on map for assets as well as markersDave Arter2018-02-08-2/+9
|
* Factor map loading spinner code out so multiple things can load at onceDave Arter2018-02-08-6/+28
|
* Allow ‘report as another user’ to only provide a phone numberDave Arter2018-02-07-0/+5
|
* Add length/common password checking.Matthew Somerville2018-02-06-1/+10
|
* Merge branch '1942-admin-anonymize'Matthew Somerville2018-01-31-0/+4
|\
| * Admin ability to make user anonymous.Matthew Somerville2018-01-31-0/+4
| |
* | [Borsetshire] Add Pro banner at top.Matthew Somerville2018-01-29-1/+65
| |
* | Top banner should be in all stylesheets.Matthew Somerville2018-01-23-3/+1
| | | | | | | | | | A top banner (for e.g. offline, or just custom display) could be used by any cobrand, so remove the need to add an extra line of CSS.
* | Fix possible offline form issue & message spacing.Matthew Somerville2018-01-21-3/+7
| |
* | [Borsetshire] Add top banner CSS.Matthew Somerville2018-01-21-0/+1
| |
* | [Zurich] Add filters to /reports, fix photo bug.Matthew Somerville2018-01-18-1/+1
| | | | | | | | The photo JavaScript needs including in case a report is pulled in.
* | [Warwickshire] Update some links to https.Matthew Somerville2018-01-18-12/+12
| |
* | Zoom out as much as necessary, even on mobile.Matthew Somerville2018-01-15-3/+0
|/ | | | | This also fixes an inconsistency between what you can see on the map and the list of reports underneath.
* Only work out bounds/resolution on BBOX strategiesMatthew Somerville2018-01-10-4/+7
| | | | The /my page uses a Fixed strategy which cannot do this.
* Add JSHint configuration, tidy up any warnings.Matthew Somerville2018-01-10-27/+35
|
* Switch on monotone cubic interpolation.Matthew Somerville2018-01-09-2/+7
| | | | This prevents e.g. the all reports graph dipping down.
* Merge branch '1907-stop-tile-load-on-mappage'Matthew Somerville2018-01-05-24/+64
|\
| * [UK] SVG app store badges on homepageZarino Zappia2018-01-05-8/+4
| |
| * [fixmystreet.com] Lazy load images in the footer.Matthew Somerville2018-01-05-7/+56
| | | | | | | | | | This uses an IntersectionObserver, which currently works in Chrome, Edge, and Firefox.
| * [fixmystreet.com] Remove 2x PNGs from footer.Matthew Somerville2018-01-03-15/+1
| |
| * [UK,FixaMinGata] Do not load tile.jpg on map page.Matthew Somerville2018-01-03-0/+7
| | | | | | | | It is never visible, being behind header/ map/ sidebar.
* | Fix bug with multiple select-multiples on a page.Matthew Somerville2018-01-04-2/+4
|/ | | | | They would all use the settings of the first, leading to e.g. potentially incorrect all/none messages.
* Fix colour wrapping bug, where it only added red.Matthew Somerville2017-12-19-2/+2
| | | | | As colours.length increased as colours were added, it would always return the first entry.
* Force dashboard filters onto a single lineZarino Zappia2017-12-19-0/+5
| | | | Fixes part of mysociety/fixmystreet-commercial#965.
* Make sure bar chart is given enough colours.Matthew Somerville2017-12-18-0/+4
|
* [Oxfordshire] Use input type=date on Exor RDI pageMatthew Somerville2017-12-15-43/+4
| | | | | No need for any jQuery UI any longer (only base use was already gone when admin stats was moved to dashboard).
* Add bar chart functionality, for area summary pageZarino Zappia2017-12-15-144/+179
|
* Improve data filter/"Group by" UI on /dashboard.Zarino Zappia2017-12-14-32/+114
| | | | This will also be used by /reports/[body]/summary in a bit.
* Merge branch 'jquery-needed-some-places-it-is-not'Matthew Somerville2017-12-13-6/+8
|\
| * [UK] Make sure jQuery is loaded where it is neededMatthew Somerville2017-12-12-6/+8
| | | | | | | | | | | | | | Bromley uses jQuery for its A-Z on all pages; only load Bristol map JavaScript on map pages (same as Angus); drop Oxfordshire JS use of jQuery; fix Zurich load order; and improve jQuery checking in other JavaScript.
* | [Borsetshire] Add Pro box to bottom of homepage.Matthew Somerville2017-12-07-0/+43
| |
* | [Borsetshire] Amend sign in instruction text.Matthew Somerville2017-12-07-2/+59
|/
* Use JS to split category UI into category/subcategoryDave Arter2017-12-05-0/+70
| | | | | | | | | This commit splits the category dropdown into two fields: a top-level "category" field populated with the category groups, and a "subcategory" field for the options in each <optgroup> in the original HTML. It does some short-circuiting, e.g. for optgroups that only have a single option the subcategory field won't be shown.
* Consolidate summary statistics pages.Matthew Somerville2017-11-29-4/+1
|
* Nicer multi-select elements in Admin pagesZarino Zappia2017-11-29-33/+49
| | | | Fixes #1589.
* Merge remote-tracking branch ↵Matthew Somerville2017-11-28-2/+7
|\ | | | | | | 'origin/1920-back-once-again-for-the-renegade-master'
| * Fix back bug, from report after using list filtersMatthew Somerville2017-11-28-2/+7
| | | | | | | | | | | | | | | | | | The popstate event for a filter change assumed that the list was already being displayed, but it was not if you were going back from a report. The reports_list function to display the list page is idempotent (though this commit makes it more so), so can happily be called whether the list page is currently displayed or not.
* | display council contacts on council dashboardStruan Donald2017-11-28-5/+17
|/ | | | | | | | Display a list of the email addresses used to contact the council on the council dashboard. Does not display emails if the council has an integration, rejects FMS reports or is currently turned off. Fixes mysociety/fixmystreetforcouncils#941
* Second, more prominent Hide Pins linkZarino Zappia2017-11-27-7/+61
| | | | An experiment towards fixing #525.