Add title to table-spacer, so we know what column we're expanding

This commit is contained in:
2016-09-28 17:03:04 +02:00
parent 968399ba7a
commit ba2f7d25b6

View File

@@ -79,14 +79,15 @@ script.
var same_cells;
$('.table-head .table-cell span').on('click', function(e){
/* Collapse columns by clicking on the title */
$('.table-head .table-cell span.collapser').on('click', function(e){
e.stopPropagation();
/* We need to find every cell matching the same classes */
same_cells = '.' + $(this).parent().attr('class').split(' ').join('.');
$(same_cells).hide();
/* Add the spacer which we later click to expand */
$('<div class="table-cell-spacer"></div>').insertAfter(same_cells);
$('<div class="table-cell-spacer" title="Expand ' + $(this).text() + '"></div>').insertAfter(same_cells);
});
$('body').on('click', '.table-cell-spacer', function(){