7f929d20e51082fbefad6f1a482d600f3ec68ce7 braney Mon Nov 13 10:14:36 2017 -0800 replace en-dash and em-dash with hyphen in hgGateway and hgTracks diff --git src/hg/js/hgGateway.js src/hg/js/hgGateway.js index 8c3aa9b..fae0cdb 100644 --- src/hg/js/hgGateway.js +++ src/hg/js/hgGateway.js @@ -1584,31 +1584,34 @@ function onClickCopyPosition() { // Copy the displayed position into the position input: var posDisplay = $('#positionDisplay').text(); $('#positionInput').val(posDisplay).focus(); } function goToHgTracks() { // Create and submit a form for hgTracks with hidden inputs for org, db and position. var position = $('#positionInput').val(); var posDisplay = $('#positionDisplay').text(); var pix = uiState.pix || calculateHgTracksWidth(); var $form; if (! position || position === '' || position === positionWatermark || position === selectedGene) { position = posDisplay; + } else { + position = position.replace(/\u2013|\u2014/g, "-"); // replace en-dash and em-dash with hyphen } + // Show a spinner -- sometimes it takes a while for hgTracks to start displaying. $('.jwGoIcon').removeClass('fa-play').addClass('fa-spinner fa-spin'); // Make a form and submit it. In order for this to work in IE, the form // must be appended to the body. $form = $('
'); $('body').append($form); $form.submit(); }