ソースを参照

Fix #188: Export Button is not shown only use showExport=true

zhixin 11 年 前
コミット
4116af7b0d
2 ファイル変更4 行追加1 行削除
  1. 2 1
      src/bootstrap-table.js
  2. 2 0
      src/extensions/export/bootstrap-table-export.js

+ 2 - 1
src/bootstrap-table.js

@@ -606,7 +606,8 @@
 
 
         html.push('</div>');
         html.push('</div>');
 
 
-        if (html.length > 2) {
+        // Fix #188: this.showToolbar is for extentions
+        if (this.showToolbar || html.length > 2) {
             this.$toolbar.append(html.join(''));
             this.$toolbar.append(html.join(''));
         }
         }
 
 

+ 2 - 0
src/extensions/export/bootstrap-table-export.js

@@ -29,6 +29,8 @@
         _initToolbar = BootstrapTable.prototype.initToolbar;
         _initToolbar = BootstrapTable.prototype.initToolbar;
 
 
     BootstrapTable.prototype.initToolbar = function () {
     BootstrapTable.prototype.initToolbar = function () {
+        this.showToolbar = true;
+
         _initToolbar.apply(this, Array.prototype.slice.apply(arguments));
         _initToolbar.apply(this, Array.prototype.slice.apply(arguments));
 
 
         if (this.options.showExport) {
         if (this.options.showExport) {