Skip to content

Commit

Permalink
Fixing the way tables overflow in dashboard view (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Apr 11, 2016
1 parent 807d686 commit f32ebee
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
2 changes: 2 additions & 0 deletions caravel/assets/javascripts/modules/caravel.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ var px = (function () {
token.find("img.loading").show();
container.hide();
container.html('');
container.css('height', slice.height());
dttm = 0;
timer = setInterval(stopwatch, 10);
$('#timer').removeClass('btn-danger btn-success');
Expand All @@ -324,6 +325,7 @@ var px = (function () {
resize: function () {
token.find("img.loading").show();
container.hide();
container.css('height', slice.height());
container.html('');
this.viz.render();
this.viz.resize();
Expand Down
10 changes: 7 additions & 3 deletions caravel/assets/visualizations/pivot_table.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
.gridster .widget.pivot_table {
.gridster .widget.pivot_table .slice_container {
overflow: auto !important;
}

.table tr>th {
.widget.pivot_table table {
margin: 0px !important;
}

.widget.pivot_table tr>th {
padding: 1px 5px !important;
font-size: small !important;
}

.table tr>td {
.widget.pivot_table tr>td {
padding: 1px 5px !important;
font-size: small !important;
}
3 changes: 2 additions & 1 deletion caravel/assets/visualizations/pivot_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ module.exports = function (slice) {
if (form_data.groupby.length === 1) {
var table = container.find('table').DataTable({
paging: false,
searching: false
searching: false,
bInfo: false
});
table.column('-1').order('desc').draw();
}
Expand Down
10 changes: 7 additions & 3 deletions caravel/assets/visualizations/table.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
.gridster .widget.table {
.gridster .widget.table .slice_container {
overflow: auto !important;
}

.widget.table table {
margin: 0px !important;
}

.widget.table td.filtered {
background-color: #005a63;
color: white;
}

.table tr>th {
.widget.table tr>th {
padding: 1px 5px !important;
font-size: small !important;
}

.table tr>td {
.widget.table tr>td {
padding: 1px 5px !important;
font-size: small !important;
}
3 changes: 2 additions & 1 deletion caravel/assets/visualizations/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ function tableVis(slice) {
});
var datatable = slice.container.find('.dataTable').DataTable({
paging: false,
searching: form_data.include_search
searching: form_data.include_search,
bInfo: false
});
// Sorting table by main column
if (form_data.metrics.length > 0) {
Expand Down

0 comments on commit f32ebee

Please sign in to comment.