Browse Source

Update docs.

zhixin 11 years ago
parent
commit
d5c942ada6
1 changed files with 77 additions and 0 deletions
  1. 77 0
      docs/documentation.html

+ 77 - 0
docs/documentation.html

@@ -67,6 +67,7 @@
                     <li><a href="#events">Events</a></li>
                     <li><a href="#events">Events</a></li>
                     <li><a href="#methods">Methods</a></li>
                     <li><a href="#methods">Methods</a></li>
                     <li><a href="#localizations">Localizations</a></li>
                     <li><a href="#localizations">Localizations</a></li>
+                    <li><a href="#the-defaults">The Defaults</a></li>
                 </ul>
                 </ul>
             </div>
             </div>
         </div>
         </div>
@@ -105,6 +106,82 @@
                 </div>
                 </div>
                 <table id="localization"></table>
                 <table id="localization"></table>
             </div>
             </div>
+            <div>
+                <div class="page-header">
+                    <h1 id="the-defaults">The Defaults:</h1>
+                </div>
+                <div>
+<pre><code>&lt;script&gt;
+    $.fn.bootstrapTable.defaults = {
+        classes: 'table table-hover',
+        height: undefined,
+        undefinedText: '-',
+        sortName: undefined,
+        sortOrder: 'asc',
+        striped: false,
+        columns: [],
+        data: [],
+        method: 'get',
+        url: undefined,
+        queryParams: {},
+        pagination: false,
+        sidePagination: 'client', // client or server
+        totalRows: 0, // server side need to set
+        pageNumber: 1,
+        pageSize: 10,
+        pageList: [10, 25, 50, 100],
+        search: false,
+        selectItemName: 'btSelectItem',
+        showHeader: true,
+        showColumns: false,
+        idField: undefined,
+        cardView: false,
+        clickToSelect: false,
+
+        formatLoadingMessage: function() {
+            return 'Loading, please wait…';
+        },
+        formatRecordsPerPage: function(pageNumber) {
+            return sprintf('%s records per page', pageNumber);
+        },
+        formatShowingRows: function(pageFrom, pageTo, totalRows) {
+            return sprintf('Showing %s to %s of %s rows', pageFrom, pageTo, totalRows);
+        },
+        formatSearch: function() {
+            return 'Search';
+        },
+        formatNoMatches: function() {
+            return 'No matching records found';
+        },
+
+        onClickRow: function(item) {return false;},
+        onSort: function(name, order) {return false;},
+        onCheck: function(row) {return false;},
+        onUncheck: function(row) {return false;},
+        onCheckAll: function() {return false;},
+        onUncheckAll: function() {return false;},
+        onLoadSuccess: function(data) {return false;},
+        onLoadError: function(status) {return false;}
+    };
+
+    $.fn.bootstrapTable.columnDefaults = {
+        radio: false,
+        checkbox: false,
+        field: undefined,
+        title: undefined,
+        align: undefined, // left, right, center
+        valign: undefined, // top, middle, bottom
+        width: undefined,
+        sortable: false,
+        order: 'asc', // asc, desc
+        visible: true,
+        formatter: undefined,
+        sorter: undefined
+    };
+&lt;/script&gt;
+</code></pre>
+                </div>
+            </div>
         </div>
         </div>
     </div>
     </div>
 </div>
 </div>