show/hide "show in editor" link

This commit is contained in:
Laura Klünder 2017-11-28 21:25:43 +01:00
parent eeae2d019b
commit 4195a1325c

View file

@ -197,7 +197,12 @@ c3nav = {
}
}
$location_details.find('.details-body').html('').append(elem);
$location_details.removeClass('loading').find('.editor').toggle(data.editor_url).attr('href', data.editor_url);
var $editor = $location_details.removeClass('loading').find('.editor');
if (data.editor_url) {
$editor.attr('href', data.editor_url).show();
} else {
$editor.hide();
}
},
load_route: function (origin, destination, nofly) {
var $route = $('#route-summary');