aboutsummaryrefslogtreecommitdiffstats
path: root/web
Commit message (Collapse)AuthorAgeLines
* Make sure pin ID is an integer.Matthew Somerville2017-09-07-2/+3
| | | | | | | | | | 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
* Merge branch '866-alerts-ux-simpler'Matthew Somerville2017-09-06-1/+35
|\
| * Simpler alerts signup page.Zarino Zappia2017-09-06-1/+35
| | | | | | | | | | | | Alert options on the /alert/list page are now in an order that is easier to parse, with a slightly clearer message for users in two-tier locations, and a more prominent email subscription CTA.
* | [Borsetshire] Redirect users variously on login.Matthew Somerville2017-09-06-1/+18
|/
* Fix redisplay of uploaded photo thumbnails.Matthew Somerville2017-08-23-2/+6
| | | | | Dropzone version 5 changed how createThumbnailFromUrl was called, so the upgrade in 30dd9d8 broke this.
* [Zurich] Upgrade OpenLayers to master, matching others.Matthew Somerville2017-08-18-1376/+621
|
* Make sure /around permalink/redirect have js paramMatthew Somerville2017-08-18-0/+5
| | | | | The change in 17e38922 would not deal with the URL construted by the map permalink code, or the redirect after inspection.
* Merge branch 'js-you-only-load-once'Matthew Somerville2017-08-17-13/+13
|\
| * Do not fetch pins server side if JS enabled.Matthew Somerville2017-08-17-0/+7
| | | | | | | | | | | | The page currently fetches the pins again client-side (as we don't know the extent of the map at the server point). I realise this isn't ideal, but should speed up the normal case quite a bit.
| * Fix replaced sidebar losing hover behaviour.Matthew Somerville2017-08-17-2/+2
| | | | | | | | | | If the list was replaced by JavaScript, the event handlers were being dropped. Switch the handlers to the parent that remains present.
| * Refactor /around list code to share with others.Matthew Somerville2017-08-17-11/+4
| | | | | | | | | | Both /reports and /my share an ID and a /reports/ajax function, use these also on /around (and share ajax/non-ajax code).
* | [fixmystreet.com] Donation link on success pagesZarino Zappia2017-08-17-0/+1
|/ | | | Part of #1384.
* Add site-wide extra fields for reports, and admin UI to manageDave Arter2017-08-17-1/+122
| | | | | | | - Also provides an editor for the extra Open311 fields on contacts. - Adds .btn--small class for small buttons Fixes #1743.
* enable body users to report problems anonymouslyStruan Donald2017-08-16-0/+13
| | | | | | uses the body user but flags the report as anonymous Fixes #fixmystreetforcouncils/207
* Fix CSS bug on inspect form duplicate loaderZarino Zappia2017-08-15-1/+1
|
* Clearer highlight for selected duplicate on inspect formZarino Zappia2017-08-15-0/+15
| | | | Fixes mysociety/fixmystreetforcouncils#211.
* [Zurich] Fix map on /reportsDave Arter2017-08-14-1/+4
| | | | | | | | | | | | | | | | | | 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.
* [Borsetshire] Custom Google Map stylesZarino Zappia2017-08-09-0/+1
| | | | Fixes #1792.
* [Borsetshire] Demo behaviour and help.Matthew Somerville2017-08-08-0/+9
| | | | | The front page redirects to report area, ignoring whatever is entered, and the sign in page includes details of the demo accounts.
* Update map size if an extra column has appeared.Matthew Somerville2017-08-05-1/+1
| | | | | | Pulling in a report via JavaScript that has two columns (e.g. the inspect form) changes the size of the map, so updateSize needs to be called.
* Stop update form toggle causing report submission.Matthew Somerville2017-08-05-1/+2
| | | | | | If the report is loaded with JavaScript, the outer form (for a new report) is present and would otherwise take this click and start a broken new report submission.
* Set up action scheduled field when report loaded.Matthew Somerville2017-08-05-0/+1
| | | | | This meant if a report was loaded via JavaScript, the action scheduled buttons were not being shown at the appropriate point.
* [fixmystreet.com] More realistic asphalt tile imageZarino Zappia2017-08-04-4/+33
| | | | | | | | | | The black and yellow background image tiles now look more like asphalt and less like leather. Also, high-dpi screens now get a double resolution tile, which avoids noticeable jpeg artifacting on the yellow #front-main in particular. Fixes #1715.
* Use standard JS translation for show/hide pins.Matthew Somerville2017-08-03-35/+17
|
* [fixmystreet.com] Remove __MACOSX resources from schools & clubs zip archiveZarino Zappia2017-08-02-0/+0
|
* [fixmystreet.com] Update "How to embed" guide in Goodies packsZarino Zappia2017-08-01-0/+0
| | | | Fixes #1776.
* [fixmystreet.com] FMS Pro demo access request formZarino Zappia2017-07-28-2/+78
|
* Merge branch 'version-2.1'Matthew Somerville2017-07-18-9/+6
|\
| * Use CSS class for mobile map not overlapping form.Matthew Somerville2017-07-18-9/+6
| | | | | | | | This fixes an issue with the footer navigation display.
* | [East Herts] Update template design.Matthew Somerville2017-07-18-205/+224
|/
* New version of /reports main page.Matthew Somerville2017-07-14-3/+2
| | | | | | | | | | | 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.
* [FixaMinGata] Consolidate with upstream.Jon Kristensen2017-07-07-2/+89
| | | | | Add hook for post-title field content in report form. Update translations.
* [fixmystreet.com] Improve Pro link on non-front.Matthew Somerville2017-07-07-12/+8
| | | | Give it the same sort of look as currently on the front page.
* Merge branch 'issues/forcouncils/195-overloaded-action-scheduled'Matthew Somerville2017-07-07-1/+13
|\
| * [Oxfordshire] Separate defect creation from state.Matthew Somerville2017-07-07-0/+12
| | | | | | | | | | | | | | Revert the behaviour from 36baff2d, so that everyone can use the 'action scheduled' state, and instead if someone with report_instruct permission has the state set to 'action scheduled', add an extra mandatory question asking whether they want to raise a defect or not.
| * Make sure segmented control input not offscreen.Matthew Somerville2017-07-07-1/+1
| | | | | | | | | | The input is used by e.g. Chrome/Safari to position the "required" error message, so needs to be on screen.
* | Merge branch 'issues/commercial/864-update-contact-form'Matthew Somerville2017-07-07-0/+18
|\ \
| * | Add an optional phone field to the contact form.Martin Wright2017-07-07-0/+15
| | |
| * | [fixmystreet.com] Optional phone on council form.Martin Wright2017-07-07-0/+3
| |/
* | [fixmystreet.com] New version of /reports page.Zarino Zappia2017-07-06-0/+590
| | | | | | | | | | | | | | | | | | | | | | This is a much broader summary page, plus a body name autocomplete. This uses a cut down version of chart.js. [1] [1] The full version was 149Kb (41Kb gzipped) plus you needed moment (50Kb/17Kb), for a total of 199Kb/58Kb. By stripping out unused graphs and code and config options, and switching to category axis rather than time, it is now a total of 39Kb/13Kb.
* | Better handling of JS geolocation.Matthew Somerville2017-07-06-5/+5
| | | | | | | | Puts it back on alert page, lost in July 2016.
* | Better clearfix for .form-txt-submit-boxZarino Zappia2017-07-06-1/+1
|/
* Don't preselect inspector template on page load.Matthew Somerville2017-07-06-6/+10
|
* Fix clickable spaces on inspect form/ward page.Matthew Somerville2017-06-30-6/+7
| | | | | Make the relevant labels inline-block so that their click area is not wider than their content; move the body name outside of the heading.
* Merge branch 'issues/forcouncils/193-state-of-the-template'Matthew Somerville2017-06-30-26/+48
|\
| * Update templates when category/state changed.Matthew Somerville2017-06-30-10/+33
| | | | | | | | | | | | When the category or state changes, the list of available templates updates (previously it was frozen at what the category was on page load, and didn't care about the state).
| * Fix bug when switching state to duplicate and backMatthew Somerville2017-06-30-6/+2
| | | | | | | | | | It would match the wrong submit button (because switching to duplicate introduced new submit buttons).
| * Factor out $inspect_form in JavaScript.Matthew Somerville2017-06-30-11/+14
| |
* | Resize photos client-side before uploadingDave Arter2017-06-30-89/+46
|/ | | | | | | | | | | | | | | | 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.
* Move `toggle_shortlist` to `utils`pezholio2017-06-20-14/+13
|