Browse Source

Improve the toolbar extesnion

Dennis Hernández 10 years ago
parent
commit
7be4391c5e

+ 12 - 0
src/extensions/toolbar/README.md

@@ -34,6 +34,18 @@ Use Plugin: [bootstrap-table-toolbar](https://github.com/wenzhixin/bootstrap-tab
 * description: Set the id of the table to create the pop-up form.
 * default: ``
 
+## Locales
+
+### formatAdvancedSearch
+
+* description: Title of the advanced search modal
+* default: `Advanced search`
+
+### formatAdvancedCloseButton
+
+* description: Text of the close button
+* default: `Close`
+
 ## Events
 
 ### onColumnAdvancedSearch(column-advanced-search.bs.table)

+ 2 - 3
src/extensions/toolbar/bootstrap-table-toolbar.js

@@ -9,7 +9,6 @@
     'use strict';
 
     var firstLoad = false;
-    var firstBody = false;
 
     var sprintf = function(str) {
         var args = arguments,
@@ -139,7 +138,7 @@
         formatAdvancedSearch: function() {
             return 'Advanced search';
         },
-        formatAdvancedSearchButton: function() {
+        formatAdvancedCloseButton: function() {
             return "Close";
         }
     });
@@ -174,7 +173,7 @@
 
         that.$toolbar.find('button[name="advancedSearch"]')
             .off('click').on('click', function() {
-                showAvdSearch(that.options.columns, that.options.formatAdvancedSearch(), that.options.formatAdvancedSearchButton(), that);
+                showAvdSearch(that.options.columns, that.options.formatAdvancedSearch(), that.options.formatAdvancedCloseButton(), that);
             });
     };