506e8bf6896f98d5277abce5498d728f211508f0 tdreszer Thu Feb 6 17:08:26 2014 -0800 Fixed bug that only shows up on Mac-Safari combination, where disabling the highlight dialog doesn't actually disable it. Redmine #12645. diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index 5a1ee60..9c6ae91 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -624,39 +624,41 @@ "(Re-enable highlight via the 'configure' menu at any time.)</p>"); dragSelectDialog = $("#dragSelectDialog")[0]; } $(dragSelectDialog).dialog({ modal: true, title: "Drag-and-select", closeOnEscape: true, resizable: false, autoOpen: false, revertToOriginalPos: true, minWidth: 400, buttons: { "Zoom In": function() { // Zoom to selection $(this).dialog("option", "revertToOriginalPos", false); + if ($("#disableDragHighlight").attr('checked')) + hgTracks.enableHighlightingDialog = false; if (imageV2.inPlaceUpdate) { var params = "position=" + newPosition; - if ($("#disableDragHighlight").attr('checked')) { - hgTracks.enableHighlightingDialog = false; + if (!hgTracks.enableHighlightingDialog) params += "&enableHighlightingDialog=0" - } imageV2.navigateInPlace(params, null, true); } else { $('body').css('cursor', 'wait'); + if (!hgTracks.enableHighlightingDialog) + setCartVars(['enableHighlightingDialog'],[0]); document.TrackHeaderForm.submit(); } $(this).dialog("close"); }, "Highlight": function() { // Highlight selection $(imageV2.imgTbl).imgAreaSelect({hide:true}); if ($("#disableDragHighlight").attr('checked')) hgTracks.enableHighlightingDialog = false; dragSelect.highlightThisRegion(newPosition); $(this).dialog("close"); }, "Cancel": function() { $(this).dialog("close"); }