metrics: don't resize collapsible column in datatable widget

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2015-09-23 15:36:44 +05:30
parent 7f790af2c2
commit fa32e60c0a
1 changed files with 10 additions and 2 deletions

View File

@ -186,6 +186,10 @@
var $ths = $thead.find('th');
var $tds = $tbody.find('tr:first td');
if ($table.hasClass('no-split')) {
$tbody.width($thead.width());
}
if ($ths.size() > $tds.size()) {
$ths.width(
$table.width() / $ths.size()
@ -196,6 +200,10 @@
$ths.each(function() {
var $th = $(this);
if ($th.hasClass('collapsible-column')) {
return true;
}
var $td = $tds.filter(function() {
return $(this).index() == $th.index();
});
@ -240,8 +248,8 @@
$table.find('tbody').closest('table').addClass('body');
}
$table.find('th:not(:has(input))').bind('mousemove mouseout', hoverResizableEvent);
$table.find('th:not(:has(input))').bind('mousedown mousemove mouseup mouseout', resizeDragEvent);
$table.find('th:not(:has(input)):not(.collapsible-column)').bind('mousemove mouseout', hoverResizableEvent);
$table.find('th:not(:has(input)):not(.collapsible-column)').bind('mousedown mousemove mouseup mouseout', resizeDragEvent);
$table.find('th:not(:has(input)):not(.collapsible-column)').bind('click', function(event) {
if ($(this).hasClass('resizable')) {
return false;