4c963765bb369185078f1b175c7063cadc354dac kate Thu Feb 4 14:55:25 2016 -0800 Restore extTools default popup width. Tweak others a little. diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index 753d565..0d7e3f9 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -3128,31 +3128,31 @@ htmlLines.push('
  • '+shortLabel+": "+longLabel+note); } } htmlLines.push(""); content = htmlLines.join(""); var title = hgTracks.chromName + ":" + (hgTracks.winStart+1) + "-" + hgTracks.winEnd; if (hgTracks.nonVirtPosition) title = hgTracks.nonVirtPosition; title += " on another website"; $("body").append("

    " + content + "

    "); // copied from the hgTrackUi function below var popMaxHeight = ($(window).height() - 40); var popMaxWidth = ($(window).width() - 40); - var popWidth = 740; + var popWidth = 600; if (popWidth > popMaxWidth) popWidth = popMaxWidth; // also copied from the hgTrackUi code below $('#extToolDialog').dialog({ resizable: true, // Let description scroll vertically height: popMaxHeight, width: popWidth, minHeight: 200, minWidth: 600, maxHeight: popMaxHeight, maxWidth: popMaxWidth, modal: true, closeOnEscape: true, autoOpen: false, @@ -3233,44 +3233,44 @@ // - jsFiles and CSS should not be included in html. Here they are shluped out. // - The resulting files ought to be loadable dynamically (with getScript()), // but this was not working nicely with the modal dialog // Therefore include files must be included with hgTracks CGI ! // - embedded js should not be in the popup box. // - Somethings should be in a popup.ready() function, and this is emulated below, // as soon as the cleanHtml is added // Since there are many possible popup cfg dialogs, the ready should be all inclusive. // -- popup.ready() -- Here is the place to do things that might otherwise go // into a $('#pop').ready() routine! // Searching for some semblance of size suitability var popMaxHeight = ($(window).height() - 40); var popMaxWidth = ($(window).width() - 40); - var popWidth = 740; + var popWidth = 700; if (popWidth > popMaxWidth) popWidth = popMaxWidth; $('#hgTracksDialog').dialog({ ajaxOptions: { // This doesn't work cache: true }, resizable: true, // Let scroll vertically height: 'auto', width: popWidth, minHeight: 200, - minWidth: 700, + minWidth: 400, maxHeight: popMaxHeight, maxWidth: popMaxWidth, modal: true, closeOnEscape: true, autoOpen: false, buttons: { /* NOT NOW "OK": function() { popUpHgt.uiDialogOk($('#pop')); $(this).dialog("close"); } */ }, // popup.ready() doesn't seem to work in open.