Skip to content

Commit

Permalink
Fix for selecting columns and floating table header
Browse files Browse the repository at this point in the history
Turn off floating table header on popup showing, turn it on (if it was
off) again when it is closed.
This has a negative side-effect of header disappearing behind the
content pane popup, but that is barely noticeable.
  • Loading branch information
cheshire committed Sep 1, 2015
1 parent 96d9747 commit 575b9d9
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions benchexec/tablegenerator/template.html
Expand Up @@ -322,6 +322,12 @@
$('#contentPaneBackground').hide();
$('#contentPane').hide().empty();
}

// On closing the dialog, turn on the scrollable header, if it's not on
// already.
if ($('#floatThead-container').size() == 0) {
useFloatThead();
}
}

function escKeyPressed(event) {
Expand Down Expand Up @@ -351,15 +357,19 @@
+ (runSet.benchmarkname ? '.' + runSet.benchmarkname : '');
}

$(document).ready(function() {
$('body').keydown(hideContentPane);
function useFloatThead() {
$("#dataTable").floatThead({

// Offset after the floating header.
scrollingTop:$("#header").outerHeight(true),
useAbsolutePositioning:false,
zIndex:3
});
}

$(document).ready(function() {
$('body').keydown(hideContentPane);
useFloatThead();
});

</script>
Expand Down Expand Up @@ -530,6 +540,8 @@


function createColumnToggleView() {
// Turn the float-thead on and off.
$("#dataTable").floatThead('destroy');

// collect all columns
var columnTitles = [];
Expand Down

0 comments on commit 575b9d9

Please sign in to comment.