|
|
@@ -82,6 +82,7 @@
|
|
|
idField: undefined,
|
|
|
cardView: false,
|
|
|
clickToSelect: false,
|
|
|
+ toolbar: undefined,
|
|
|
|
|
|
rowStyle: function(row, index) {return {};},
|
|
|
|
|
|
@@ -320,6 +321,12 @@
|
|
|
|
|
|
this.$toolbar = this.$container.find('.fixed-table-toolbar');
|
|
|
|
|
|
+ if (typeof this.options.toolbar === 'string') {
|
|
|
+ $('<div class="bars pull-left"></div>')
|
|
|
+ .appendTo(this.$toolbar)
|
|
|
+ .append($(this.options.toolbar));
|
|
|
+ }
|
|
|
+
|
|
|
if (this.options.showColumns) {
|
|
|
html = [];
|
|
|
html.push('<div class="columns pull-right keep-open">',
|
|
|
@@ -844,8 +851,11 @@
|
|
|
};
|
|
|
|
|
|
BootstrapTable.prototype.destroy = function() {
|
|
|
+ var $toolbar = $(this.options.toolbar).clone(true, true);
|
|
|
+
|
|
|
this.$container.next().remove();
|
|
|
this.$container.replaceWith(this.$el_);
|
|
|
+ $toolbar.insertBefore(this.$el_);
|
|
|
return this.$el_;
|
|
|
};
|
|
|
|