浏览代码

Update docs.

zhixin 10 年之前
父节点
当前提交
ffd3cc19a1

+ 7 - 4
CHANGELOG.md

@@ -6,18 +6,18 @@
 - [enh] Use options for detailView's open/close icons.
 - [enh] Added `refreshOptions` and `gtHiddenColumns` method.
 - [enh] Added `datepicker` option to Filter Control.
-- [bug] Fix #936 Sort carets shouldn't be inline-styled by JS.
+- [bug] Fix #936 Sort carets should not be inline-styled by JS.
 - [bug] Fix table header width bug when setting table to no bordered.
 - [bug] Fix #938, fix #940: Multiple Sort and Hide/Show column.
-- [bug] Fix #970: click and dblclick bug on no-rows table.
+- [bug] Fix #970: `click`and `dblclick` bug on no-rows table.
 - [bug] Fix #967: unselected column while column sorted display error.
 - [enh] Support title feature in cells.
 - [enh] Improved cookie, mobile extension.
-- [enh] Added groupby, angular extension.
+- [enh] Added group-by, angular extension.
 - [enh] Added option for setting locale.
 - [enh] Added `exportDataType` option for export extension.
 - [enh] Add fa-IR, ca-ES, es-ES, et-EE and af-ZA locales.
-- [enh] Supported complex header with rowspans and colspans.
+- [enh] Supported complex header with `rowspans` and `colspans`.
 - [enh] Added `searchFomatter` column option.
 - [bug] Fixed ResetRow function and undefined column search bug.
 - [bug] Fixed #639: footer resizing problem.
@@ -28,6 +28,9 @@
 - [enh] Added fixed-columns extension.
 - [enh] Added `$.fn.bootstrapTable.utils` tools.
 - [enh] Added `expandRow` and `collapseRow` methods.
+- [enh] Updated `showRow`, `hideRow` and `updateCell` methods.
+- [bug] Fix #1390: radio maintainSelected bug.
+- [bug] Fix #1421: checkBy filter enabled.
 
 ### 1.8.1
 

+ 14 - 1
docs/_i18n/en.yml

@@ -1,4 +1,11 @@
 pages:
+  home:
+    title: "Bootstrap Table"
+    lead: "An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features."
+    sub_title: "Designed for Twitter Bootstrap"
+    sub_lead: "Bootstrap table has been designed to reduce development time and to require no specific knowledge from developers. It is both featherweight and feature-rich."
+    download: "Download"
+    current_version: "Current version:"
   getting_started:
     title: "Getting started"
     lead: "An overview of Bootstrap Table, how to download and use, basic templates, and more."
@@ -13,4 +20,10 @@ pages:
     lead: "The extensions of bootstrap table."
   faq:
     title: "FAQ"
-    lead: "Frequently Asked Questions."
+    lead: "Frequently Asked Questions."
+  donate:
+    title: "Donate"
+    lead: "If you like Bootstrap Table, if your project uses Bootstrap Table, if you want Bootstrap Table do better..."
+common:
+  social_tip: "If you like bootstrap table: "
+  qq_group: "QQ group: "

+ 28 - 31
docs/_i18n/en/documentation/methods.md

@@ -22,36 +22,51 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter);`.
         <td>getOptions</td>
         <td>none</td>
         <td>Return the options object.</td>
+        <td>getOptions</td>
     </tr>
     <tr>
         <td>getSelections</td>
         <td>none</td>
         <td>Return selected rows, when no record selected, am empty array will return.</td>
+        <td>getSelections</td>
     </tr>
     <tr>
         <td>getAllSelections</td>
         <td>none</td>
-        <td>Return selected rows in all pages, when no record selected, am empty array will return.</td>
+        <td>Return all selected rows contain search or filter, when no record selected, am empty array will return.</td>
+        <td>getAllSelections</td>
     </tr>
     <tr>
         <td>getData</td>
         <td>useCurrentPage</td>
-        <td>Get the loaded data of table at the moment that this method is called. If you set the useCurrentPage to true the method will return the data in the current page</td>
+        <td>Get the loaded data of table at the moment that this method is called. If you set the useCurrentPage to true the method will return the data in the current page.</td>
+        <td>getData</td>
+    </tr>
+    <tr>
+        <td>getRowByUniqueId</td>
+        <td>id</td>
+        <td>
+        Get data from table, the row that contains the id passed by parameter.
+        </td>
+        <td>getRowByUniqueId</td>
     </tr>
     <tr>
         <td>load</td>
         <td>data</td>
         <td>Load the data to table, the old rows will be removed.</td>
+        <td>load</td>
     </tr>
     <tr>
         <td>append</td>
         <td>data</td>
         <td>Append the data to table.</td>
+        <td>append</td>
     </tr>
     <tr>
         <td>prepend</td>
         <td>data</td>
         <td>Prepend the data to table.</td>
+        <td>prepend</td>
     </tr>
     <tr>
         <td>remove</td>
@@ -59,33 +74,25 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter);`.
         <td>
         Remove data from table, the params contains two properties: <br>
         field: the field name of remove rows. <br>
-        values: the array of values for rows which should be removed. <br>
-        Example: $('#myTable').bootstrapTable('remove', {field: 'id', values: ["73", "74"]})
+        values: the array of values for rows which should be removed.
+        <td>remove</td>
         </td>
     </tr>
     <tr>
         <td>removeAll</td>
         <td>-</td>
         <td>
-        Remove all data from table<br>
-        Example: $('#myTable').bootstrapTable('removeAll')
+        Remove all data from table.
         </td>
+        <td>removeAll</td>
     </tr>
     <tr>
         <td>removeByUniqueId</td>
         <td>id</td>
         <td>
-        Remove data from table, the row that contains the id passed by parameter<br>
-        Example: $('#myTable').bootstrapTable('removeByUniqueId', "122")
-        </td>
-    </tr>
-    <tr>
-        <td>getRowByUniqueId</td>
-        <td>id</td>
-        <td>
-        Get data from table, the row that contains the id passed by parameter<br>
-        Example: $('#myTable').bootstrapTable('getRowByUniqueId', "122")
+        Remove data from table, the row that contains the id passed by parameter.
         </td>
+        <td>removeByUniqueId</td>
     </tr>
     <tr>
         <td>insertRow</td>
@@ -141,9 +148,9 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter);`.
         <td>params</td>
         <td>
         Update one cell, the params contains following properties: <br>
-        rowIndex: the row index. <br>
-        fieldName: the field name.<br>
-        fieldValue: the new field value. <br>
+        index: the row index. <br>
+        field: the field name.<br>
+        value: the new field value.
         </td>
     </tr>
     <tr>
@@ -241,12 +248,12 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter);`.
     <tr>
         <td>scrollTo</td>
         <td>value</td>
-        <td>Scroll to the number value position, set 'bottom' means scroll to the bottom.</td>
+        <td>Scroll to the number value position, the unit is 'px', set 'bottom' means scroll to the bottom.</td>
     </tr>
     <tr>
         <td>getScrollPosition</td>
         <td>none</td>
-        <td>Get the current scroll position.</td>
+        <td>Get the current scroll position, the unit is 'px'.</td>
     </tr>
     <tr>
         <td>filterBy</td>
@@ -278,16 +285,6 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter);`.
         <td>none</td>
         <td>Toggle the card/table view.</td>
     </tr>
-	<tr>
-        <td>expandRow</td>
-        <td>index</td>
-        <td>Expand a row, the row index start with 0.</td>
-    </tr>
-	<tr>
-        <td>collapseRow</td>
-        <td>index</td>
-        <td>Collapse a row, the row index start with 0.</td>
-    </tr>
     <tr>
         <td>expandRow</td>
         <td>index</td>

+ 5 - 0
docs/_i18n/en/donate.md

@@ -0,0 +1,5 @@
+Bootstrap Table is a free plug-in which be made in my spare time.
+
+If your project get the help from Bootstrap Table, you can donate to Bootstrap Table.
+
+With your help, I believe that I will continue to strive to let Bootstrap Table be better.

+ 6 - 2
docs/_i18n/en/faq/faq.md

@@ -28,6 +28,10 @@ $table.on('load-success.bs.table column-switch.bs.table page-change.bs.table sea
 });
 ```
 
-### Export extension does not support unicode characters?
+---
+
+### How can I support development of bootstrap-table?
+
+All your ideas and feedback are very appreciated! Please feel free to open issues on GitHub or send me email.
 
-The extension is using the Plugin: [tableExport.jquery.plugin](https://github.com/kayalshri/tableExport.jquery.plugin), because this plugin has [this same problem](https://github.com/carlo/jquery-base64/issues/1), so it doesn't belong to the category of the bootstrap-table, but I think we can try to use this: [jquery.base64.js](https://gist.github.com/wenzhixin/09e218c884f4f380b68a) to replace the base64 plugin.
+I'm also grateful for your donations: <a href="donate">{% t pages.donate.title %}</a>

+ 26 - 0
docs/_i18n/en/footer.html

@@ -0,0 +1,26 @@
+<footer class="bs-docs-footer" role="contentinfo">
+  <div class="container">
+    {% include social-buttons.html %}
+
+    <p>Designed and built with all the love in the world by <a href="https://github.com/wenzhixin" target="_blank">@wenzhixin</a>.</p>
+    <p>Maintained by <a href="https://github.com/wenzhixin" target="_blank">@wenzhixin</a> with the help of <a href="https://github.com/wenzhixin/bootstrap-table/graphs/contributors" target="_blank">our contributors</a>.</p>
+    <p>Code licensed under <a href="https://github.com/wenzhixin/bootstrap-table/blob/master/LICENSE" target="_blank">MIT</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
+    <ul class="bs-docs-footer-links muted">
+      <li>Currently v{{ site.current_version }}</li>
+      <li>&middot;</li>
+      <li><a href="{{ site.repo }}">GitHub</a></li>
+      <li>&middot;</li>
+      <li><a href="{{ site.website }}">My website</a></li>
+      <li>&middot;</li>
+      <li><a href="{{ site.repos }}">My repos</a></li>
+      <li>&middot;</li>
+      <li><a href="http://stackoverflow.com/questions/tagged/bootstrap-table">Questions / Helps</a></li>
+      <li>&middot;</li>
+      <li><a href="{{ site.repo }}/issues">Issues</a></li>
+      <li>&middot;</li>
+      <li><a href="{{ site.repo }}/releases">Releases</a></li>
+      <li>&middot;</li>
+      <li><a href="mailto:{{ site.email }}">Email</a></li>
+    </ul>
+  </div>
+</footer>

docs/_includes/feature.md → docs/_i18n/en/home/feature.md


+ 14 - 1
docs/_i18n/es.yml

@@ -1,4 +1,11 @@
 pages:
+  home:
+    title: "Bootstrap Table"
+    lead: "An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features."
+    sub_title: "Designed for Twitter Bootstrap"
+    sub_lead: "Bootstrap table has been designed to reduce development time and to require no specific knowledge from developers. It is both featherweight and feature-rich."
+    download: "Download"
+    current_version: "Current version:"
   getting_started:
     title: "Iniciar con Bootstrap-table"
     lead: "Una visión de Bootstrap Table, cómo descargarlo, usarlo, templates básicos, y más."
@@ -13,4 +20,10 @@ pages:
     lead: "Extensiones de bootstrap table."
   faq:
     title: "FAQ"
-    lead: "Preguntas frecuentes."
+    lead: "Preguntas frecuentes."
+  donate:
+    title: "Donate"
+    lead: "If you like Bootstrap Table, if your project uses Bootstrap Table, if you want Bootstrap Table do better..."
+common:
+  social_tip: "If you like bootstrap table: "
+  qq_group: "QQ group: "

+ 9 - 20
docs/_i18n/es/documentation/methods.md

@@ -31,8 +31,15 @@ Sintaxis para llamar a un método: `$('#table').bootstrapTable('method', paramet
     <tr>
         <td>getData</td>
         <td>useCurrentPage</td>
-        <td>Retorna los datos cargados en la tabla en el momento que se llama este método. Si se setea useCurrentPage a true se devolverá los datos mostrados en la página
-        actual</td>
+        <td>Retorna los datos cargados en la tabla en el momento que se llama este método. Si se setea useCurrentPage a true se devolverá los datos mostrados en la página actual.</td>
+    </tr>
+    <tr>
+        <td>getRowByUniqueId</td>
+        <td>id</td>
+        <td>
+        Se obtiene el dato de la tabla que contiene el id pasado por parámetro<br>
+        Ejemplo: $('#myTable').bootstrapTable('getRowByUniqueId', "122")
+        </td>
     </tr>
     <tr>
         <td>load</td>
@@ -76,14 +83,6 @@ Sintaxis para llamar a un método: `$('#table').bootstrapTable('method', paramet
         </td>
     </tr>
     <tr>
-        <td>getRowByUniqueId</td>
-        <td>id</td>
-        <td>
-        Se obtiene el dato de la tabla que contiene el id pasado por parámetro<br>
-        Ejemplo: $('#myTable').bootstrapTable('getRowByUniqueId', "122")
-        </td>
-    </tr>
-    <tr>
         <td>insertRow</td>
         <td>params</td>
         <td>
@@ -269,16 +268,6 @@ Sintaxis para llamar a un método: `$('#table').bootstrapTable('method', paramet
         <td>none</td>
         <td>Alterna la vista entre tabla y tarjeta.</td>
     </tr>
-	<tr>
-        <td>expandRow</td>
-        <td>index</td>
-        <td>Expand a row, the row index start with 0.</td>
-    </tr>
-	<tr>
-        <td>collapseRow</td>
-        <td>index</td>
-        <td>Collapse a row, the row index start with 0.</td>
-    </tr>
     <tr>
         <td>expandRow</td>
         <td>index</td>

+ 5 - 0
docs/_i18n/es/donate.md

@@ -0,0 +1,5 @@
+Bootstrap Table is a free plug-in which be made in my spare time.
+
+If your project get the help from Bootstrap Table, you can donate to Bootstrap Table.
+
+With your help, I believe that I will continue to strive to let Bootstrap Table be better.

+ 9 - 1
docs/_i18n/es/faq/faq.md

@@ -26,4 +26,12 @@ Para unir celdas, cuando se haga el refresh, se pase a la siguiente página o se
 $table.on('load-success.bs.table column-switch.bs.table page-change.bs.table search.bs.table', function () {
     $table.bootstrapTable('mergeCells', {...});
 });
-```
+```
+
+---
+
+### How can I support development of bootstrap-table?
+
+All your ideas and feedback are very appreciated! Please feel free to open issues on GitHub or send me email.
+
+I'm also grateful for your donations: <a href="donate">{% t pages.donate.title %}</a>

+ 26 - 0
docs/_i18n/es/footer.html

@@ -0,0 +1,26 @@
+<footer class="bs-docs-footer" role="contentinfo">
+  <div class="container">
+    {% include social-buttons.html %}
+
+    <p>Designed and built with all the love in the world by <a href="https://github.com/wenzhixin" target="_blank">@wenzhixin</a>.</p>
+    <p>Maintained by <a href="https://github.com/wenzhixin" target="_blank">@wenzhixin</a> with the help of <a href="https://github.com/wenzhixin/bootstrap-table/graphs/contributors" target="_blank">our contributors</a>.</p>
+    <p>Code licensed under <a href="https://github.com/wenzhixin/bootstrap-table/blob/master/LICENSE" target="_blank">MIT</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
+    <ul class="bs-docs-footer-links muted">
+      <li>Currently v{{ site.current_version }}</li>
+      <li>&middot;</li>
+      <li><a href="{{ site.repo }}">GitHub</a></li>
+      <li>&middot;</li>
+      <li><a href="{{ site.website }}">My website</a></li>
+      <li>&middot;</li>
+      <li><a href="{{ site.repos }}">My repos</a></li>
+      <li>&middot;</li>
+      <li><a href="http://stackoverflow.com/questions/tagged/bootstrap-table">Questions / Helps</a></li>
+      <li>&middot;</li>
+      <li><a href="{{ site.repo }}/issues">Issues</a></li>
+      <li>&middot;</li>
+      <li><a href="{{ site.repo }}/releases">Releases</a></li>
+      <li>&middot;</li>
+      <li><a href="mailto:{{ site.email }}">Email</a></li>
+    </ul>
+  </div>
+</footer>

+ 17 - 0
docs/_i18n/es/home/feature.md

@@ -0,0 +1,17 @@
+### Features
+
+* Created for Bootstrap 3 (Bootstrap 2 supported)
+* Responsive web design
+* Scrollable Table with fixed headers
+* Fully configurable
+* Via data attributes
+* Show/Hide columns
+* Show/Hide headers
+* Get data in JSON format using AJAX
+* Simple column sorting with a click
+* Format column
+* Single or multiple row selection
+* Powerful pagination
+* Card view
+* Localization
+* Extensions

+ 13 - 0
docs/_i18n/zh-cn.yml

@@ -1,4 +1,11 @@
 pages:
+  home:
+    title: "Bootstrap Table"
+    lead: "基于 Bootstrap 的 jQuery 表格插件,通过简单的设置,就可以拥有强大的单选、多选、排序、分页,以及编辑、导出、过滤(扩展)等等的功能。"
+    sub_title: "专为 Twitter Bootstrap 设计"
+    sub_lead: "Bootstrap table 通过简单的设置,就可以拥有强大的功能,大大提高工作效率,减少开发时间。"
+    download: "下载"
+    current_version: "当前版本:"
   getting_started:
     title: "开始使用"
     lead: "Bootstrap Table的简单介绍,例如如何下载和使用,基本的模板等等。"
@@ -14,3 +21,9 @@ pages:
   faq:
     title: "常见问题"
     lead: "常见问题。"
+  donate:
+    title: "捐助"
+    lead: "假如你喜欢 Bootstrap Table,假如你的项目使用到 Bootstrap Table,假如你想让 Bootstrap Table 更好……"
+common:
+  social_tip: "假如您喜欢 Bootstrap Table:"
+  qq_group: "QQ群:"

+ 1 - 1
docs/_i18n/zh-cn/documentation/column-options.md

@@ -1,4 +1,4 @@
-# Column options []({{ site.repo }}/blob/master/docs/_i18n/{{ site.lang }}/documentation/column-options.md)
+# 列参数 []({{ site.repo }}/blob/master/docs/_i18n/{{ site.lang }}/documentation/column-options.md)
 
 ---
 

+ 1 - 1
docs/_i18n/zh-cn/documentation/events.md

@@ -1,4 +1,4 @@
-# Events []({{ site.repo }}/blob/master/docs/_i18n/{{ site.lang }}/documentation/events.md)
+# 事件 []({{ site.repo }}/blob/master/docs/_i18n/{{ site.lang }}/documentation/events.md)
 
 ---
 

+ 1 - 1
docs/_i18n/zh-cn/documentation/localizations.md

@@ -1,4 +1,4 @@
-# Localizations []({{ site.repo }}/blob/master/docs/_i18n/{{ site.lang }}/documentation/localizations.md)
+# 多语言 []({{ site.repo }}/blob/master/docs/_i18n/{{ site.lang }}/documentation/localizations.md)
 
 ---
 

+ 69 - 61
docs/_i18n/zh-cn/documentation/methods.md

@@ -1,8 +1,8 @@
-# Methods []({{ site.repo }}/blob/master/docs/_i18n/{{ site.lang }}/documentation/methods.md)
+# 方法 []({{ site.repo }}/blob/master/docs/_i18n/{{ site.lang }}/documentation/methods.md)
 
 ---
 
-The calling method syntax: `$('#table').bootstrapTable('method', parameter);`.
+使用方法的语法:`$('#table').bootstrapTable('method', parameter);`。
 
 <table class="table"
        id="m"
@@ -12,111 +12,124 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter);`.
        data-mobile-responsive="true">
     <thead>
     <tr>
-        <th>Name</th>
-        <th>Parameter</th>
-        <th>Description</th>
+        <th>名称</th>
+        <th>参数</th>
+        <th>描述</th>
+        <th data-formatter="methodFormatter"
+            data-align="center"
+            data-valign="middle">例子</th>
     </tr>
     </thead>
     <tbody>
     <tr>
         <td>getOptions</td>
         <td>none</td>
-        <td>Return the options object.</td>
+        <td>返回表格的 Options。</td>
+        <td>getOptions</td>
     </tr>
     <tr>
         <td>getSelections</td>
         <td>none</td>
-        <td>Return all selected rows, when no record selected, am empty array will return.</td>
+        <td>返回所选的行,当没有选择任何行的时候返回一个空数组。</td>
+        <td>getSelections</td>
+    </tr>
+    <tr>
+        <td>getAllSelections</td>
+        <td>none</td>
+        <td>返回所有选择的行,包括搜索过滤前的,当没有选择任何行的时候返回一个空数组。</td>
+        <td>getAllSelections</td>
     </tr>
     <tr>
         <td>getData</td>
         <td>useCurrentPage</td>
-        <td>Get the loaded data of table. If you set the useCurrentPage to true the method will return the data in the current page</td>
+        <td>或者当前加载的数据。假如设置 useCurrentPage 为 true,则返回当前页的数据。</td>
+        <td>getData</td>
+    </tr>
+    <tr>
+        <td>getRowByUniqueId</td>
+        <td>id</td>
+        <td>根据 uniqueId 获取行数据。</td>
+        <td>getRowByUniqueId</td>
     </tr>
     <tr>
         <td>load</td>
         <td>data</td>
-        <td>Load the data to table, the old rows will be removed.</td>
+        <td>加载数据到表格中,旧数据会被替换。</td>
+        <td>load</td>
     </tr>
     <tr>
         <td>append</td>
         <td>data</td>
-        <td>Append the data to table.</td>
+        <td>添加数据到表格在现有数据之后。</td>
+        <td>append</td>
     </tr>
     <tr>
         <td>prepend</td>
         <td>data</td>
-        <td>Prepend the data to table.</td>
+        <td>插入数据到表格在现有数据之前。</td>
+        <td>prepend</td>
     </tr>
     <tr>
         <td>remove</td>
         <td>params</td>
         <td>
-        Remove data from table, the params contains two properties: <br>
-        field: the field name of remove rows. <br>
-        values: the array of values for rows which should be removed. <br>
-        Example: $('#myTable').bootstrapTable('remove', {field: 'id', values: ["73", "74"]})
+        从表格中删除数据,包括两个参数:
+        field: 需要删除的行的 field 名称。<br>
+        values: 需要删除的行的值,类型为数组。<br>
         </td>
+        <td>remove</td>
     </tr>
     <tr>
         <td>removeAll</td>
         <td>-</td>
-        <td>
-        Remove all data from table<br>
-        Example: $('#myTable').bootstrapTable('removeAll')
-        </td>
+        <td>删除表格所有数据。</td>
+        <td>removeAll</td>
     </tr>
     <tr>
         <td>removeByUniqueId</td>
         <td>id</td>
-        <td>
-        Remove data from table, the row that contains the id passed by parameter<br>
-        Example: $('#myTable').bootstrapTable('removeByUniqueId', "122")
-        </td>
-    </tr>
-    <tr>
-        <td>getRowByUniqueId</td>
-        <td>id</td>
-        <td>
-        Get data from table, the row that contains the id passed by parameter<br>
-        Example: $('#myTable').bootstrapTable('getRowByUniqueId', "122")
-        </td>
+        <td>根据 uniqueId 删除指定的行。</td>
+        <td>removeByUniqueId</td>
     </tr>
     <tr>
         <td>insertRow</td>
         <td>params</td>
         <td>
-        Insert a new row, the param contains following properties:<br>
-        index: the row index to insert into.<br>
-        row: the row data.
+        插入新行,参数包括:<br>
+        index: 要插入的行的 index。<br>
+        row: 行的数据,Object 对象。
         </td>
+        <td>insertRow</td>
     </tr>
     <tr>
         <td>updateRow</td>
         <td>params</td>
         <td>
-        Update the specified row, the param contains following properties: <br>
-        index: the row index to be updated. <br>
-        row: the new row data.
+        更新指定的行,参数包括:<br>
+        index: 要更新的行的 index。<br>
+        row: 行的数据,Object 对象。
         </td>
+        <td>updateRow</td>
     </tr>
 	<tr>
         <td>showRow</td>
         <td>params</td>
-        <td>Show the specified row. the param contains following properties:
-        index: the row idenx or the idField.
-        isIdField: Boolean to indicates if index is the idField od the row or not.</td>
+        <td>显示指定的行,参数包括:<br>
+        index: 要更新的行的 index 或者 uniqueId。<br>
+        isIdField: 指定 index 是否为 uniqueid。</td>
+        <td>showRow-hideRow</td>
     </tr>
     <tr>
         <td>hideRow</td>
         <td>params</td>
-        <td>Hide the specified row. the param contains following properties:
-        index: the row idenx or the idField.
-        isIdField: Boolean to indicates if index is the idField od the row or not.</td>
+        <td>显示指定的行,参数包括:<br>
+        index: 要更新的行的 index。<br>
+        uniqueId: 或者要更新的行的 uniqueid。
+        <td>showRow-hideRow</td>
     </tr>
     <tr>
         <td>getRowsHidden</td>
-        <td>boolean</td>
+        <td>show</td>
         <td>Get all rows hidden and if you pass the show parameter true the rows will be shown again, otherwise, the method
         only will return the rows hidden.</td>
     </tr>
@@ -136,9 +149,9 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter);`.
         <td>params</td>
         <td>
         Update one cell, the params contains following properties: <br>
-        rowIndex: the row index. <br>
-        fieldName: the field name.<br>
-        fieldValue: the new field value. <br>
+        index: the row index. <br>
+        field: the field name.<br>
+        value: the new field value.
         </td>
     </tr>
     <tr>
@@ -231,52 +244,47 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter);`.
     <tr>
         <td>getHiddenColumns</td>
         <td>-</td>
-        <td>Get hidden columns.</td>
+        <td>获取隐藏的列。</td>
     </tr>
     <tr>
         <td>scrollTo</td>
         <td>value</td>
-        <td>Scroll to the number value position, set 'bottom' means scroll to the bottom.</td>
+        <td>滚动到指定位置,单位为 px,设置 'bottom' 表示跳到最后。</td>
     </tr>
     <tr>
         <td>getScrollPosition</td>
         <td>none</td>
-        <td>Get the current scroll position.</td>
+        <td>获取当前滚动条的位置,单位为 px。</td>
     </tr>
     <tr>
         <td>filterBy</td>
         <td>params</td>
-        <td>(Can use only in client-side)Filter data in table, eg. you can filter <code>{age: 10}</code> to show the data only age is equal to 10.</td>
+        <td>(只能用于 client 端)过滤表格数据, 你可以通过过滤<code>{age: 10}</code>来显示 age 等于 10 的数据。</td>
     </tr>
     <tr>
         <td>selectPage</td>
         <td>page</td>
-        <td>Go to the a specified page.</td>
+        <td>跳到指定的页。</td>
     </tr>
     <tr>
         <td>prevPage</td>
         <td>none</td>
-        <td>Go to previous page.</td>
+        <td>跳到上一页。</td>
     </tr>
     <tr>
         <td>nextPage</td>
         <td>none</td>
-        <td>Go to next page.</td>
+        <td>跳到下一页。</td>
     </tr>
     <tr>
         <td>togglePagination</td>
         <td>none</td>
-        <td>Toggle the pagination option.</td>
+        <td>切换分页选项。</td>
     </tr>
     <tr>
         <td>toggleView</td>
         <td>none</td>
-        <td>Toggle the card/table view.</td>
-    </tr>
-	<tr>
-        <td>deleteCookie</td>
-        <td>cookie name</td>
-        <td>Delete a cookie created. You must use: 'sortOrder', 'sortName', 'pageNumber' or 'pageList'.</td>
+        <td>切换 card/table 视图</td>
     </tr>
     <tr>
         <td>expandRow</td>

+ 10 - 10
docs/_i18n/zh-cn/documentation/table-options.md

@@ -1,8 +1,8 @@
-# Table options []({{ site.repo }}/blob/master/docs/_i18n/{{ site.lang }}/documentation/table-options.md)
+# 表格参数 []({{ site.repo }}/blob/master/docs/_i18n/{{ site.lang }}/documentation/table-options.md)
 
 ---
 
-The table options is defined in `jQuery.fn.bootstrapTable.defaults`.
+表格的参数定义在 `jQuery.fn.bootstrapTable.defaults`。
 
 <table class="table"
        id="t"
@@ -12,11 +12,11 @@ The table options is defined in `jQuery.fn.bootstrapTable.defaults`.
        data-mobile-responsive="true">
     <thead>
     <tr>
-        <th>Name</th>
-        <th>Attribute</th>
-        <th>Type</th>
-        <th>Default</th>
-        <th>Description</th>
+        <th>名称</th>
+        <th>标签</th>
+        <th>类型</th>
+        <th>默认</th>
+        <th>描述</th>
     </tr>
     </thead>
     <tbody>
@@ -25,21 +25,21 @@ The table options is defined in `jQuery.fn.bootstrapTable.defaults`.
         <td>data-toggle</td>
         <td>String</td>
         <td>'table'</td>
-        <td>Activate bootstrap table without writing JavaScript.</td>
+        <td>不用写 JavaScript 直接启用表格。</td>
     </tr>
     <tr>
         <td>classes</td>
         <td>data-classes</td>
         <td>String</td>
         <td>'table table-hover'</td>
-        <td>The class name of table. By default, the table is bordered, you can add 'table-no-bordered' to remove table-bordered style.</td>
+        <td>表格的类名称。默认情况下,表格是有边框的,你可以添加 'table-no-bordered' 来删除表格的边框样式。</td>
     </tr>
     <tr>
         <td>height</td>
         <td>data-height</td>
         <td>Number</td>
         <td>undefined</td>
-        <td>The height of table.</td>
+        <td>定义表格的高度。</td>
     </tr>
     <tr>
         <td>undefinedText</td>

+ 5 - 0
docs/_i18n/zh-cn/donate.md

@@ -0,0 +1,5 @@
+Bootstrap Table 是我个人利用业余时间制作的免费插件。
+
+如果在你的项目中 Bootstrap Table 帮助到了你,可以对 Bootstrap Table 进行捐助。
+
+相信有了你的帮助,Bootstrap Table 一定会继续努力做得更好。

+ 14 - 6
docs/_i18n/zh-cn/faq/faq.md

@@ -1,10 +1,10 @@
-# FAQ []({{ site.repo }}/blob/master/docs/_i18n/{{ site.lang }}/faq/faq.md)
+# 常见问题 []({{ site.repo }}/blob/master/docs/_i18n/{{ site.lang }}/faq/faq.md)
 
 ---
 
-### When resize the window, the table header does not adjust automatically, how to solve it?
+### 当浏览器窗口变化是,表头与表格不对齐,应该怎么办?
 
-When you set the `height` of bootstrap table, the `fixed header` feature is automatically enabled, that is what cause the problem, you need to listen the `resize` event of window and use the `resetView` method to solve this problem, code example:
+当你使用 `height` 参数的时候,会启用 `固定表头` 的功能,这个功能会导致不对齐的问题,你可以通过监听 `resize` 事件来解决问题,代码如下:
 
 ```js
 $(function () {
@@ -18,12 +18,20 @@ $(function () {
 
 ---
 
-### How to better merge cells?
+### 如何更好的合并表格列?
 
-For merged cells, when you do refresh, next page or switch columns to show, the merge cells will be unmerged. We can listen the events(on load success, on column switch, on page change and on search) to solve this problem, code example:
+对于合并的表格,当你使用刷新,点击下一页或者切换列的显示,合并的表格会变回去,我们可以监听一下的事件来解决这个问题,代码如下:
 
 ```js
 $table.on('load-success.bs.table column-switch.bs.table page-change.bs.table search.bs.table', function () {
     $table.bootstrapTable('mergeCells', {...});
 });
-```
+```
+
+---
+
+### 我要如何支持 Bootstrap Table 的开发?
+
+非常感谢你的想法和建议,你可以到 GitHub 上提 issue 或者发邮件给我。
+
+当然,假如你也可以 <a href="donate">{% t pages.donate.title %}</a> 我们的项目。

+ 26 - 0
docs/_i18n/zh-cn/footer.html

@@ -0,0 +1,26 @@
+<footer class="bs-docs-footer" role="contentinfo">
+  <div class="container">
+    {% include social-buttons.html %}
+
+    <p>该文档由 <a href="https://github.com/wenzhixin" target="_blank">@wenzhixin</a> 设计和建设。</p>
+    <p>由 <a href="https://github.com/wenzhixin" target="_blank">@wenzhixin</a> 开发维护,以及其他 <a href="https://github.com/wenzhixin/bootstrap-table/graphs/contributors" target="_blank">贡献者</a>帮忙维护。</p>
+    <p>代码许可:<a href="https://github.com/wenzhixin/bootstrap-table/blob/master/LICENSE" target="_blank">MIT</a>,文档许可:<a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>。</p>
+    <ul class="bs-docs-footer-links muted">
+      <li>{% t pages.home.current_version %} v{{ site.current_version }}</li>
+      <li>&middot;</li>
+      <li><a href="{{ site.repo }}">GitHub</a></li>
+      <li>&middot;</li>
+      <li><a href="{{ site.website }}">我的网站</a></li>
+      <li>&middot;</li>
+      <li><a href="{{ site.repos }}">我的开源项目</a></li>
+      <li>&middot;</li>
+      <li><a href="http://stackoverflow.com/questions/tagged/bootstrap-table">帮助</a></li>
+      <li>&middot;</li>
+      <li><a href="{{ site.repo }}/issues">问题</a></li>
+      <li>&middot;</li>
+      <li><a href="{{ site.repo }}/releases">发布版本</a></li>
+      <li>&middot;</li>
+      <li><a href="mailto:{{ site.email }}">邮件</a></li>
+    </ul>
+  </div>
+</footer>

+ 17 - 0
docs/_i18n/zh-cn/home/feature.md

@@ -0,0 +1,17 @@
+### 主要功能
+
+* 支持 Bootstrap 3 和 Bootstrap 2
+* 自适应界面
+* 固定表头
+* 非常丰富的配置参数
+* 直接通过标签使用
+* 显示/隐藏列
+* 显示/隐藏表头
+* 通过 AJAX 获取 JSON 格式的数据
+* 支持排序
+* 格式化表格
+* 支持单选或者多选
+* 强大的分页功能
+* 支持卡片视图
+* 支持多语言
+* 支持插件

+ 1 - 26
docs/_includes/footer.html

@@ -1,31 +1,6 @@
 <!-- Footer
 ================================================== -->
-<footer class="bs-docs-footer" role="contentinfo">
-  <div class="container">
-    {% include social-buttons.html %}
-
-    <p>Designed and built with all the love in the world by <a href="https://github.com/wenzhixin" target="_blank">@wenzhixin</a>.</p>
-    <p>Maintained by <a href="https://github.com/wenzhixin" target="_blank">@wenzhixin</a> with the help of <a href="https://github.com/wenzhixin/bootstrap-table/graphs/contributors" target="_blank">our contributors</a>.</p>
-    <p>Code licensed under <a href="https://github.com/wenzhixin/bootstrap-table/blob/master/LICENSE" target="_blank">MIT</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
-    <ul class="bs-docs-footer-links muted">
-      <li>Currently v{{ site.current_version }}</li>
-      <li>&middot;</li>
-      <li><a href="{{ site.repo }}">GitHub</a></li>
-      <li>&middot;</li>
-      <li><a href="{{ site.website }}">My website</a></li>
-      <li>&middot;</li>
-      <li><a href="{{ site.repos }}">My repos</a></li>
-      <li>&middot;</li>
-      <li><a href="http://stackoverflow.com/questions/tagged/bootstrap-table">Questions / Helps</a></li>
-      <li>&middot;</li>
-      <li><a href="{{ site.repo }}/issues">Issues</a></li>
-      <li>&middot;</li>
-      <li><a href="{{ site.repo }}/releases">Releases</a></li>
-      <li>&middot;</li>
-      <li><a href="mailto:{{ site.email }}">Email</a></li>
-    </ul>
-  </div>
-</footer>
+{% tf footer.html %}
 
 <!-- Bootstrap core JavaScript
 ================================================== -->

+ 6 - 9
docs/_includes/nav/main.html

@@ -18,22 +18,19 @@
                 <li {% if page.slug == "documentation" %} class="active"{% endif %}>
                     <a href="{{ site.baseurl }}/documentation/">{% t pages.documentation.title %}</a>
                 </li>
+                <li>
+                    <a href="http://issues.wenzhixin.net.cn/bootstrap-table/" target="_blank">{% t pages.examples.title %}</a>
+                </li>
                 <li {% if page.slug == "extensions" %} class="active"{% endif %}>
                     <a href="{{ site.baseurl }}/extensions/">{% t pages.extensions.title %}</a>
                 </li>
+                <li {% if page.slug == "donate" %} class="active"{% endif %}>
+                    <a href="{{ site.baseurl }}/donate/">{% t pages.donate.title %}</a>
+                </li>
                 <li {% if page.slug == "faq" %} class="active"{% endif %}>
                     <a href="{{ site.baseurl }}/faq/">{% t pages.faq.title %}</a>
                 </li>
                 <li>
-                    <a href="http://issues.wenzhixin.net.cn/bootstrap-table/" target="_blank">Examples</a>
-                </li>
-                <li>
-                    <a href="https://github.com/wenzhixin/bootstrap-table-fixed-columns" target="_blank">
-                        Fixed Columns
-                        <span class="badge">New</span>
-                    </a>
-                </li>
-                <li>
                     <a href="{{ site.repo }}" target="_blank">GitHub</a>
                 </li>
             </ul>

+ 2 - 5
docs/_includes/social-buttons.html

@@ -1,5 +1,5 @@
 <div class="bs-docs-social">
-    if you like bootstrap table - help:
+    {% t common.social_tip %}
     <ul class="bs-docs-social-buttons">
         <li>
             <iframe class="github-btn"
@@ -19,15 +19,12 @@
             <!-- https://about.twitter.com/resources/buttons#tweet -->
             <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://wenzhixin.net.cn/p/bootstrap-table" data-via="BootstrapTable" data-related="BootstrapTable">Tweet</a>
         </li>
-        <!--<li>-->
-            <!--<a href="https://twitter.com/BootstrapTable" class="twitter-follow-button" data-show-count="false">Follow @BootstrapTable</a>-->
-        <!--</li>-->
         <li>
             <!-- 将此标记放置在你希望显示+1 按钮的位置。 -->
             <div class="g-plusone" data-annotation="inline" data-width="120"></div>
         </li>
         <li>
-            <script data-gratipay-username="wenzhixin" data-gratipay-widget="button" src="//gttp.co/v1.js"></script>
+            <div>{% t common.qq_group %} 103558783</div>
         </li>
     </ul>
 </div>

+ 1 - 1
docs/_layouts/default.html

@@ -8,7 +8,7 @@
     <a class="sr-only sr-only-focusable" href="#content">Skip to main content</a>
 
     <!-- Docs master nav -->
-    {% include nav/main.html %}
+    {% include nav.html %}
 
     <!-- Docs page layout -->
     <div class="bs-docs-header" id="content">

+ 1 - 1
docs/_layouts/home.html

@@ -8,7 +8,7 @@
     <a class="sr-only sr-only-focusable" href="#content">Skip to main content</a>
 
     <!-- Docs master nav -->
-    {% include nav/main.html %}
+    {% include nav.html %}
 
     <!-- Page content of course! -->
     {{ content }}

+ 6 - 0
docs/assets/css/style.css

@@ -17,4 +17,10 @@
     position: absolute;
     left: 20px;
     top: 20px;
+}
+.tc {
+    text-align: center;
+}
+.tc img {
+    max-width: 100%;
 }

二进制
docs/assets/images/alipay.jpg


二进制
docs/assets/images/alipayLogo.png


二进制
docs/assets/images/paypalLogo.png


+ 9 - 1
docs/assets/js/common.js

@@ -52,4 +52,12 @@ $(function () {
             });
         });
     }
-});
+});
+
+function methodFormatter(value) {
+    if (!value) {
+        return '';
+    }
+    var href = 'http://issues.wenzhixin.net.cn/bootstrap-table/#methods/' + value + '.html';
+    return '<a target="_blank" href="' + href + '"><i class="glyphicon glyphicon-screenshot"></i></a>';
+}

+ 29 - 0
docs/donate.md

@@ -0,0 +1,29 @@
+---
+layout: default
+title: pages.donate.title
+slug: donate
+lead: pages.donate.lead
+---
+
+{% tf donate.md %}
+
+<div class="row">
+    <div class="col-md-6">
+        <div class="tc">
+            <img src="../assets/images/alipayLogo.png">
+        </div>
+        <div class="tc">
+            <img src="../assets/images/alipay.jpg">
+        </div>
+    </div>
+    <div class="col-md-6">
+        <div class="tc">
+            <img src="../assets/images/paypalLogo.png">
+        </div>
+        <div class="tc">
+            <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZDHP676FQDUT6">
+                <img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif">
+            </a>
+        </div>
+    </div>
+</div>

+ 0 - 14
docs/faq.md

@@ -6,17 +6,3 @@ lead: pages.faq.lead
 ---
 
 {% tf faq/faq.md %}
-
----
-
-### How can I support development of bootstrap-table?
-
-All your ideas and feedback are very appreciated! Please feel free to open issues on github or send me email.
-
-I'm also grateful for your donations:
-
-<script data-gratipay-username="wenzhixin" data-gratipay-widget="button" src="//gttp.co/v1.js"></script>
-
-[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZDHP676FQDUT6)
-
-Thank you!

+ 12 - 8
docs/index.md

@@ -1,31 +1,35 @@
 ---
 layout: home
-title: Bootstrap Table &middot; An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features.
+title: pages.home.title
 ---
 
 <main class="bs-docs-masthead" id="content" role="main">
   <div class="container">
     <span class="bs-docs-booticon bs-docs-booticon-lg bs-docs-booticon-outline">BT</span>
-    <p class="lead">An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features.</p>
+    <p class="lead">{% t pages.home.lead %}</p>
     <p class="lead">
-      <a href="https://github.com/wenzhixin/bootstrap-table" class="btn btn-outline-inverse btn-lg">Download</a>
-      <a href="getting-started" class="btn btn-outline-inverse btn-lg">Getting started</a>
+      <a href="https://github.com/wenzhixin/bootstrap-table" class="btn btn-outline-inverse btn-lg">
+        {% t pages.home.download %}
+      </a>
+      <a href="getting-started" class="btn btn-outline-inverse btn-lg">
+        {% t pages.getting_started.title %}
+      </a>
     </p>
-    <p class="version">Currently v{{ site.current_version }}</p>
+    <p class="version">{% t pages.home.current_version %} v{{ site.current_version }}</p>
   </div>
 </main>
 
 <div class="bs-docs-featurette">
   <div class="container">
-    <h2 class="bs-docs-featurette-title">Designed for Twitter Bootstrap.</h2>
-    <p class="lead">Bootstrap table has been designed to reduce development time and to require no specific knowledge from developers. It is both featherweight and feature-rich.</p>
+    <h2 class="bs-docs-featurette-title">{% t pages.home.sub_title %}</h2>
+    <p class="lead">{% t pages.home.sub_lead %}</p>
 
     <hr class="half-rule">
 
     <div class="row">
       <div class="col-md-1"></div>
       <div class="col-sm-5">
-        {% markdown feature.md %}
+        {% tf home/feature.md %}
       </div>
       <div class="col-sm-5">
         {% markdown latest-release.md %}