Permalink
Browse files

Only show multiple header rows for columnLabel fields if more than on…

…e summary field is selected.
  • Loading branch information...
1 parent c109bd7 commit bd1d9f660c5ec9e323255250e873355f65fd8422 Robert Jackson committed Apr 14, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 jquery_pivot.js
View
@@ -206,7 +206,7 @@ var methods = {
snip += '<table class="table table-striped table-condensed"><thead>';
// build columnLabel header row
- if (config.columnLabels.length > 0) {
+ if (config.columnLabels.length > 0 && config.summaries.length > 1) {
snip += '<tr>'
if (config.rowLabels.length > 0) {
snip += '<th colspan="' + config.rowLabels.length + '">&nbsp;</th>';
@@ -220,7 +220,7 @@ var methods = {
snip += '<tr>'
$.each(columns, function(index, column){
- if (column.type !== 'column') {
+ if (column.type !== 'column' || config.summaries.length <= 1) {
snip += '<th>' + column.fieldName + '</th>';
} else {
$.each(config.summaries, function(index, fieldName){

0 comments on commit bd1d9f6

Please sign in to comment.