aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
Commit message (Collapse)AuthorAgeLines
* [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
| |
| * Increase opacity a bit on non-hovered pins.Matthew Somerville2016-07-11-1/+1
| |
| * Tidy up JavaScript functions.Matthew Somerville2016-07-11-901/+763
| | | | | | | | Split big functions into smaller more descriptive ones.
| * Move most JavaScript mobile map changes to CSS.Zarino Zappia2016-07-01-6/+0
| |
* | [Zurich] Use new LV95/CH1903+ geocoder and base map tilesDave Arter2016-07-07-255/+203
| | | | | | | | | | | | | | | | | | | | | | - Use new `getLocation95` method for geocoding addresses - Replace Coordinates::CH1903 with Coordinates::CH1903Plus - Refactor Map::Zurich to use WMTSBase instead of duplicating code - Slightly refactor map templates to make using custom WMTS tiles easier - Use correct sizes for marker pins on maps Closes mysociety/FixMyStreet-Commercial#769. Closes mysociety/FixMyStreet-Commercial#768.
* | Remove need to customise OpenLayers built script.Matthew Somerville2016-07-04-366/+451
| | | | | | | | | | This also allows the map to work in a proxied admin. Upgrade Angus OL to master branch code.
* | Use static files for validation_rules.js.Matthew Somerville2016-07-04-0/+5
|/ | | | | No need for this to be generated via a template, it only differs occasionally by cobrand.
* Patch Dropzone to correctly orient preview images.Matthew Somerville2016-06-20-2/+190
| | | | | | Include a patch file, applied to Dropzone as of version e524e03c, that also includes our previous Opera patch from 445e9a3d. The new minified file is our cut-down exif.js plus the patched dropzone.js.
* [Bristol] Use BCC's base map tilesDave Arter2016-06-17-0/+176
| | | | | | | | | This refactors the Map::Zurich module into something that makes it easier to use custom map tiles for a cobrand. This also includes some refactoring of the JS & map templates to make it easier to use a custom WMTS base map in future cobrands.
* Merge branch 'drop-ie6-fix-ie7'Matthew Somerville2016-06-17-11/+0
|\
| * Remove all IE6 special cases.Matthew Somerville2016-06-15-11/+0
| |
* | Don't update the map pins if a new report started.Matthew Somerville2016-06-17-0/+11
|/
* Update copyright year shown on OS & Bing mapsDave Arter2016-06-07-2/+2
|
* Absolutely position map pages.Zarino Zappia2016-06-03-41/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies the page layout and code. We add a new #map_sidebar for sidebar positioning, and a $mappage-header-height (defaulting to 4em) variable. We no longer need: * position_map_box; * map_fix; * special visual centre calculation; or * custom pan zoom positioning. As the sidebar now scrolls by itself and nothing can extend outside: * The big-green-banner is set to 100% width (with negative margins no longer required); * For cobrands that have an overhanging sidebar (e.g. Zurich), we add a .with-notes variant that adds a second column to the sidebar, perfect for containing secondary notes about the form. The resizing of the banner also required some tweaking to the size of the chevron-white SVG images. Update the $.fn.drawer() method for the new layout. Works well in IE7+8, and degrades gracefully in IE6. For IE7, we remove the existing z-index hacks, and put a new, simpler, one in, and fix a CSS bug that was hiding the map. Various cobrands are updated to adapt to the changes.
* Centre map on pin location when creating a report.Zarino Zappia2016-06-01-29/+19
| | | | | | | Always centre the map on the new point when creating a new report. This will be helpful when the map element can change width to accommodate the .with-notes variant, is easier than the previous method, and feels very natural.
* Allow scroll wheel to zoom map.Zarino Zappia2016-06-01-17/+2
|
* Stop PanZoom giving controls hard-coded positions.Zarino Zappia2016-06-01-0/+16
| | | | | We previously used !important to override them in the CSS, but better to prevent them being set in the JavaScript in the first place.
* Update OpenLayers 2 to master branch.Matthew Somerville2016-05-27-294/+382
| | | | Specifically to get the https://github.com/openlayers/ol2/pull/1418 fix.
* Improve in-place moderation UIZarino Zappia2016-05-18-2/+11
| | | | | | | | | | | This rearranges the moderation UI into logical chunks, and improves the 'revert to original' checkboxes by: - hiding them unless there's some original text to revert to - displaying the text that will be reverted to in the appropriate input fields when checked. Part of mysociety/FixMyStreet-Commercial#731
* Increase pixel tolerance of map click handler.Matthew Somerville2016-05-17-1/+1
|
* Update OpenLayers to fix Google Maps layer.Matthew Somerville2016-05-17-279/+364
| | | | This uses the master branch of OpenLayers 2.
* Merge branch '1383-remove-dead-projects'Matthew Somerville2016-04-22-40/+1
|\
| * Remove final web/fixmystreet templates.Matthew Somerville2016-04-20-39/+0
| | | | | | | | And associated, e.g. nothing references fixmystreet-old-box.js any more.
| * Remove some unused cobrands.Matthew Somerville2016-04-20-1/+1
| |
* | Add Twitter social login.Matthew Somerville2016-04-08-1/+1
|/
* [Zurich] Use protocol relative map tiles.Matthew Somerville2016-03-30-2/+2
|
* Switch list item heading from h4 to h3.Matthew Somerville2016-03-30-6/+6
| | | | This stops the front page header nesting skipping a level.