aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
Commit message (Collapse)AuthorAgeLines
* On /reports maps, only include reports in view.Matthew Somerville2017-04-13-2/+36
| | | | | | | | | 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 lat/lon on inspection form if local coordinates aren’t availableDave Arter2017-03-30-0/+2
|
* Add ability to override Google Maps road style.Dave Arter2017-03-30-1/+17
|
* Show loading indicator when loading pinspezholio2017-03-17-11/+6
|
* Move staff-only JavaScript to separate file.Matthew Somerville2017-03-10-125/+0
|
* [Oxfordshire] Add Exor RDI file download featureDave Arter2017-02-15-2/+16
| | | | | | | | | | The RDI file format encapsulates information about inspections that have taken place, and can be uploaded into Exor to create defects in bulk. This commit adds a page to the Oxfordshire cobrand's admin allowing RDI files to be generated and downloaded from FMS. For mysociety/fixmystreetforcouncils#127
* Display nearby candidate reports when marking as duplicateDave Arter2016-12-13-36/+53
| | | | | | | | - 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
* Load OpenLayers stylesheet directly, not via JS.Matthew Somerville2016-12-09-0/+1
| | | | | 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.
* Manual OpenLayers patch for pointer event draggingMatthew Somerville2016-12-09-3/+4
| | | | | | Thanks to Dave Tapuska and Chrome team: https://bugs.chromium.org/p/chromium/issues/detail?id=670942 https://github.com/openlayers/ol2/issues/1510
* [Bromley] Fix map tiles.Matthew Somerville2016-11-18-3/+0
| | | | | The change to remove inline JavaScript stopped the Bromley-specific tiles from working. Put them back with an extra JavaScript file.
* [Bristol] Upgrade to OpenLayers master (with WFS).Matthew Somerville2016-11-11-4/+882
| | | | Including WFS for forthcoming assets layers.
* Add sort order options to list pages.Matthew Somerville2016-11-04-13/+17
| | | | | | | | 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).
* Add UI for assigning categories to a user in adminDave Arter2016-10-28-1/+2
| | | | | - A user can be assigned to any number of its body's categories - The category ids are stored as a list in the user's extra field
* Add simple way to return to "everything" in list filtersZarino Zappia2016-10-25-51/+131
|
* Merge branch 'reports-area-as-a-hole'Matthew Somerville2016-10-24-8/+51
|\
| * Invert display of areas on body pages.Matthew Somerville2016-10-21-8/+51
| | | | | | | | | | This makes it easier to use the map, as the land outside the area is shaded, rather than the area itself.
* | Store and use initial URL to fix JavaScript bugs.Matthew Somerville2016-10-21-1/+1
|/ | | | | | | | | | | | | 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.
* Fix map pin clicking in IE11.Matthew Somerville2016-10-21-3/+3
| | | | | | 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.
* Merge branch '1543-reports-page-fixes'Matthew Somerville2016-10-21-1/+40
|\
| * Update pagination when status/categories changed.Matthew Somerville2016-10-18-0/+4
| |
| * Add ajax pin fetching to reports/my pages.Matthew Somerville2016-10-14-0/+25
| | | | | | | | | | This matches the behaviour on /around, and prevents a refresh when changing the state or category filters.
| * Improve history API URL when query string empty.Matthew Somerville2016-10-14-1/+11
| |
* | Refactor template/priority category checkboxes into own templateDave Arter2016-10-19-0/+7
| | | | | | | | | | - Also adds add select all/none UI - Adds admin hint for empty category list behaviour
* | Factor Open311 fields into own template for devolved contactsDave Arter2016-10-19-7/+10
| |
* | Extract category edit form into its own templateDave Arter2016-10-19-0/+7
|/ | | | | | | | | | * The same template is now used for creating new contacts as well as editing existing ones. * Zurich template for editing contacts has been left unchanged for now * Reputation threshold is included on form * Fields are in a more intuitive order * Required fields are marked as such in DOM for client-side validation * Rename ‘notes’ field to make its meaning clearer
* Allow multiple selections in report list filter.Zarino Zappia2016-10-13-9/+291
| | | | | | 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.
* [UK] A few small JavaScript fixes.Matthew Somerville2016-09-23-0/+4
| | | | Cope better if things aren't defined.
* Add UI for managing category reputation thresholdDave Arter2016-09-23-0/+10
|
* Fetch MapQuest images via HTTPS rather than HTTPJon Kristensen2016-09-07-4/+4
|
* Add inspector report detail viewDave Arter2016-09-06-29/+60
| | | | | | | | | | | | | 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
* Fix photo preview display after submission.Matthew Somerville2016-09-05-23/+36
| | | | | | If the form is submitted and reshown, due to an error or logging in, the image preview is loaded from the server, rather than the client. We need to get the image source data to get the Exif data out of it.
* Make sure moderation works on AJAX-loaded report.Dave Arter2016-08-26-51/+0
| | | | | | | | This refactors the moderation JS into a fixmystreet.set_up function, and ensures the button handlers are attached when a new report is loaded over AJAX. A side effect of bringing it into fixmystreet.js instead of its own moderate.js file is the few extra kb each user will have to download, but hopefully gzip and caching will help ameliorate this.
* Allow user to have an area assigned in adminDave Arter2016-08-22-0/+6
|
* Fix broken permalink link.Matthew Somerville2016-08-19-7/+5
| | | | | | The map JavaScript assumes that the permalink div already exists. [Bristol] Make sure the control is added.
* Make sure PanZoom works in older OpenLayers.Matthew Somerville2016-08-19-34/+8
| | | | | 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.
* Move non-JavaScript pan/zoom to same as with JS.Matthew Somerville2016-08-17-7/+18
| | | | | No need to use old OpenLayers PanZoom defaults, or load images we don't want to use.
* Remove use of new window.Function for CSP.Matthew Somerville2016-08-17-1/+1
| | | | Even though it is empty.
* Factor out most inline JavaScript.Matthew Somerville2016-08-16-10/+0
| | | | | No need for a special no-map case in the filters case, as all pages now have fixmystreet.page set if needed.
* Do HTML class and JS variable setting ASAP.Matthew Somerville2016-08-16-1/+1
|
* Split up modernizr/html5shiv/yepnope.Matthew Somerville2016-08-16-2/+8
| | | | | We only need html5shiv for <IE9, and we only use yepnope on the front page.
* Work correctly for alt-click/cmd-click etc.Matthew Somerville2016-07-14-3/+30
|
* Fix a few JavaScript issues with reports pages.Matthew Somerville2016-07-12-1/+6
| | | | | | | 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.
* Tweak WMTS JavaScript to match merged branch.Matthew Somerville2016-07-11-16/+13
| | | | Use $.each rather than .forEach.
* Merge branch '1351-report-list-ajax'Matthew Somerville2016-07-11-1106/+810
|\
| * Merge two fixmystreet.js file.Matthew Somerville2016-07-11-208/+0
| |
| * Add history polyfill for <=IE9.Matthew Somerville2016-07-11-0/+35
| |
| * Move to using pushState for new report.Zarino Zappia2016-07-11-63/+57
| | | | | | | | | | Update the URL whenever location of pin is updated (first time, drag, or reclick), make sure it works when clicking back.
| * Load in report details on around page via ajax.Zarino Zappia2016-07-11-8/+45
| | | | | | | | | | | | | | | | | | | | | | 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".
| * Simplify "rap-notes" visibility togglingZarino Zappia2016-07-11-10/+0
| | | | | | | | | | On mobile, the notes in `#report-a-problem-sidebar` are hidden by default, and can be toggled using the `.rap-notes-trigger`.
| * Only match the actual ID, not same-ending others.Matthew Somerville2016-07-11-2/+2
| |