Browse Source

Fix #81: Allow the class to be applied to the th row even if that column is of type checkbox or radio.

zhixin 11 years ago
parent
commit
839cb3dfa8
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/bootstrap-table.js

+ 3 - 2
src/bootstrap-table.js

@@ -333,8 +333,9 @@
             style += sprintf('width: %spx; ', column.checkbox || column.radio ? 36 : column.width);
 
             html.push('<th',
-                column.checkbox || column.radio ? ' class="bs-checkbox"' :
-                class_,
+                column.checkbox || column.radio ?
+                    sprintf(' class="bs-checkbox %s"', column['class'] || '') :
+                    class_,
                 sprintf(' style="%s"', style),
                 '>');
             html.push(sprintf('<div class="th-inner %s">', that.options.sortable && column.sortable ?