f042040b88072670085fb660082e3d2ca3f448ca kate Wed Feb 3 09:52:23 2016 -0800 Add apply button to UI popup dialog diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index 48e8b32..91f5b5b 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -3465,35 +3465,43 @@ $('#hgTrackUiDialog').dialog({ ajaxOptions: { // This doesn't work cache: true }, resizable: true, // Let description scroll vertically height: (popUp.trackDescriptionOnly ? popMaxHeight : 'auto'), width: popWidth, minHeight: 200, minWidth: 400, maxHeight: popMaxHeight, maxWidth: popMaxWidth, modal: true, closeOnEscape: true, autoOpen: false, - buttons: { "OK": function() { + + buttons: { + 'Apply': function () { + popUp.uiDialogOk($('#pop'), popUp.trackName); + // thanks to JAT for this cleverness to keep button functioning + //popUp.saveAllVars = getAllVars( $('#hgTrackUiDialog'), popUp.trackName); + }, + 'OK': function() { if ( ! popUp.trackDescriptionOnly ) popUp.uiDialogOk($('#pop'), popUp.trackName); $(this).dialog("close"); - }}, + } + }, // popup.ready() doesn't seem to work in open. open: function () { if ( ! popUp.trackDescriptionOnly ) { $('#hgTrackUiDialog').find('.filterBy,.filterComp').each( function(i) { if ($(this).hasClass('filterComp')) ddcl.setup(this); else ddcl.setup(this, 'noneIsAll'); } ); } }, close: function() {