aboutsummaryrefslogtreecommitdiffstats
path: root/web
Commit message (Collapse)AuthorAgeLines
* [UK] Correctly show and hide experimental .big-green-bannerZarino Zappia2018-03-20-0/+3
|
*-. Merge branches '2016-uk-green-banner-click-starts-report', ↵Zarino Zappia2018-03-20-6/+111
|\ \ | | | | | | | | | '2016-uk-green-banner-position-test' and '2021-uk-homepage-intent-experiment'
| | * [UK] Dual submit buttons on homepage postcode formZarino Zappia2018-03-20-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Present "report" vs "browse" choice at time of postcode entry, so we can track intent, as part of a temporary experiment into what people expect to see on the fixmystreet.com/around page. Google Analytics will be able detect which button was pressed by looking for the `intent=report` or `intent=report` query string param in the resulting pageview location. We supply a *third* submit button, immediately before the other two, and hidden from visual users and assistive devices, to prevent either of the "intent" submit values being sent when the user submits the form via the Return/Enter key. Part of #2021.
| | * [UK] Refactor $body-font variable in FMS.com layout.scssZarino Zappia2018-03-20-6/+8
| | |
| * | [UK] Move big green button over map for GA Content ExperimentZarino Zappia2018-03-19-0/+24
| | | | | | | | | | | | Part of #2016.
* | | Clicking "big green banner" on /around begins a reportZarino Zappia2018-03-20-0/+8
| |/ |/| | | | | | | | | | | | | | | | | | | | | Data collected by #2001 has shown that some people are clicking the big green "Click map to report a problem" banner on fixmystreet.com/around. We assume the same is true for other cobrands. As suggested in #2016, this commit adds a click handler to that banner element, which will begin a new report at the centre of the screen. It might not be the exact right location, but the pin can be repositioned from the /report/new form, and beginning a report is better than just soaking up the click and doing nothing.
* | Fix check for visible sub map links.Matthew Somerville2018-03-19-5/+5
| | | | | | | | | | | | | | | | I don't think this check could ever have worked, because items are invisible if their parent is set to `display: none`, so it would hide the links bar if it was already hidden, and show it if it was already shown. Use a js- class for the movement of the feed item into the sub map links.
* | Fix disappearing large-width visited navigation.Matthew Somerville2018-03-19-0/+3
|/ | | | The change to base in fc172603 affected the layout display.
* [Rutland] cobrand files for RutlandStruan Donald2018-03-15-0/+65
| | | | | Web and email template changes, CSS plus cobrand file with open311 config
* Prevent override of mobile nav visited links.Matthew Somerville2018-03-14-0/+3
|
* Fix broken map when logging to /report/new with active asset layersDave Arter2018-03-14-36/+44
| | | | | | | | | | | | | The event handlers for category changing were being added too early, before fixmystreet.map had been created. For cobrands with category grouping enabled this was causing a crash in the JS because the grouping code emits a category change event during its setup (which runs between fixmystreet.assets.add and .assets.init). This commit adds the event handlers for each layer during fixmystreet.assets.init - at point at which fixmystreet.map has been set up. Also extracts the code for initing each layer into its own function for clarity.
* Preserve category extra values when form fields are reloadedDave Arter2018-03-14-0/+4
| | | | | This commit re-sets the values of any form inputs when the category extra elements are reloaded, e.g. when the category is changed.
* Merge branch 'issues/commercial/987-zurich-csv-updates'Matthew Somerville2018-03-14-8/+8
|\
| * [Zurich] Switch to more modern database states.Matthew Somerville2018-03-07-1/+1
| | | | | | | | | | | | | | The Zurich code was written a long time ago, and used overriding so that e.g. the hard-coded 'investigating' state referred to Wunsch (wish). Now that states are stored in the database, we can create ones specially for Zurich and use them instead. Hooray!
| * [Zurich] Fix display of deleted categories in admin.Matthew Somerville2018-03-07-3/+3
| |
| * [Zurich] Admin stats/CSV per category.Matthew Somerville2018-03-06-4/+4
| | | | | | | | Adapt look of default dashboard filtering.
* | Update some tight JS coupling to use events.Matthew Somerville2018-03-13-72/+72
| | | | | | | | Remove 'hooks' functions, and Split out USRN handling to its own object.
* | Minor refactor of assets object.Matthew Somerville2018-03-13-7/+8
|/
* [Zurich] Fix admin nav display on map pages.Matthew Somerville2018-03-02-21/+1
| | | | Plus remove some now-unneeded CSS.
* [Zurich] Remove unneeded 'deleted' body indicator.Matthew Somerville2018-03-02-0/+4
|
* [UK] Properly align Dashboard bar chart value labelsZarino Zappia2018-03-01-2/+3
|
* [UK] Linebreak long Y-axis labels on Dashboard bar chartZarino Zappia2018-03-01-5/+24
| | | | | | | | | Y-axis labels in the Dashboard ranking tables now break onto multiple lines if they are more than 4 words long. /web/vendor/chart.min.js showing as modified because we updated it to include a recent fix to label alignment on vertical scales: https://github.com/mysociety/Chart.js/commit/4130c31
* Increase size of sub map linksZarino Zappia2018-03-01-10/+10
| | | | | | | | The tiny buttons could prove hard to trigger, especially on touchscreen devices, and with large screens now more commonplace, there’s no reason not to give them a few more pixels. One of a number of enhancements suggested in #1462.
* Preserve category selection when using group UIDave Arter2018-02-22-3/+6
| | | | | | | | | | | | | When using grouped categories on the new report form, the selected category was being lost when dragging the pin or clicking elsewhere on the map. This was causing the asset layers to be hidden as well as the report extra input to be lost. I'd assumed that cloning an <option> element that was selected and adding it to the parent <select> would set the value of that <select> correctly, but that doesn't seem to be the case. Instead, this commit explicitly sets the <select>'s value after appending a selected <option> element.
* 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
|