diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/sass/_base.scss | 6 | ||||
-rw-r--r-- | web/js/duplicates.js | 28 |
2 files changed, 25 insertions, 9 deletions
diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss index a9e0da128..bdd292e06 100644 --- a/web/cobrands/sass/_base.scss +++ b/web/cobrands/sass/_base.scss @@ -1489,6 +1489,12 @@ input.final-submit { } } +.item-list__item .duplicate-map { + padding: 1em; + clear: both; + text-align: center; +} + .problem-header .update-img, .item-list .update-img { float: $right; diff --git a/web/js/duplicates.js b/web/js/duplicates.js index ede22dc18..4f1574c0f 100644 --- a/web/js/duplicates.js +++ b/web/js/duplicates.js @@ -42,6 +42,10 @@ url_params.pin_size = 'normal'; } + if ($('html').hasClass('mobile')) { + url_params.inline_maps = 1; + } + if (category && params && params.check_duplicates_dismissal ) { dismissed = category === dismissed_category; dismissed_category = category; @@ -89,15 +93,21 @@ $('.js-hide-if-invalid-category_extras').slideUp(); } - // Highlight map pin when hovering associated list item. - var timeout; - $reports.on('mouseenter', function(){ - var id = parseInt( $(this).data('reportId'), 10 ); - clearTimeout( timeout ); - fixmystreet.maps.markers_highlight( id ); - }).on('mouseleave', function(){ - timeout = setTimeout( fixmystreet.maps.markers_highlight, 50 ); - }); + if (!fixmystreet.map.events.extensions.buttonclick.isDeviceTouchCapable) { + // Highlight map pin when hovering associated list item. + // (not on touchscreens though because a) the 'mouseenter' handler means + // two taps are required on the 'read more' button - one to highlight + // the list item and another to activate the button- and b) the pins + // might be scrolled off the top of the screen anyway e.g. on phones) + var timeout; + $reports.on('mouseenter', function(){ + var id = parseInt( $(this).data('reportId'), 10 ); + clearTimeout( timeout ); + fixmystreet.maps.markers_highlight( id ); + }).on('mouseleave', function(){ + timeout = setTimeout( fixmystreet.maps.markers_highlight, 50 ); + }); + } // Add a "select this report" button, when on the report inspect form. if ( $('#report_inspect_form').length ) { |