Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…e summary field is selected.
  • Loading branch information...
commit bd1d9f660c5ec9e323255250e873355f65fd8422 1 parent c109bd7
Robert Jackson authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 jquery_pivot.js
View
4 jquery_pivot.js
@@ -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){
Please sign in to comment.
Something went wrong with that request. Please try again.