ソースを参照

Update to checkboxHeader option.

zhixin 11 年 前
コミット
18296d277c
2 ファイル変更10 行追加2 行削除
  1. 8 0
      docs/docs.js
  2. 2 2
      src/bootstrap-table.js

+ 8 - 0
docs/docs.js

@@ -270,6 +270,14 @@ $(function () {
                     example: 'transform-table'
                     example: 'transform-table'
                 },
                 },
                 {
                 {
+                    name: 'checkboxHeader',
+                    attribute: 'data-checkbox-header',
+                    type: 'Boolean',
+                    description: 'False to hide check-all checkbox in header row.',
+                    'default': 'true',
+                    example: '-'
+                },
+                {
                     name: 'rowStyle',
                     name: 'rowStyle',
                     attribute: 'data-row-style',
                     attribute: 'data-row-style',
                     type: 'Function',
                     type: 'Function',

+ 2 - 2
src/bootstrap-table.js

@@ -85,7 +85,7 @@
         clickToSelect: false,
         clickToSelect: false,
         singleSelect: false,
         singleSelect: false,
         toolbar: undefined,
         toolbar: undefined,
-        checkBoxHeader: false,  //True will display check-all checkbox in header row vs. text
+        checkboxHeader: true,
 
 
         rowStyle: function (row, index) {return {};},
         rowStyle: function (row, index) {return {};},
 
 
@@ -250,7 +250,7 @@
             }
             }
 
 
             if (column.checkbox) {
             if (column.checkbox) {
-                if (!that.options.singleSelect && that.options.checkBoxHeader) {
+                if (!that.options.singleSelect && that.options.checkboxHeader) {
                     text = '<input name="btSelectAll" type="checkbox" />';
                     text = '<input name="btSelectAll" type="checkbox" />';
                 }
                 }
                 that.header.stateField = column.field;
                 that.header.stateField = column.field;