Skip to content

Commit

Permalink
Merge branch 'develop' into timeout-per-column
Browse files Browse the repository at this point in the history
  • Loading branch information
wenzhixin authored Dec 14, 2017
2 parents a4a681f + 7eb44ab commit 41432f9
Show file tree
Hide file tree
Showing 38 changed files with 820 additions and 487 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@ language: node_js

node_js:
- "0.10"

before_install:
- npm install grunt-cli -g
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
[![Build Status](https://travis-ci.org/wenzhixin/bootstrap-table.svg)](https://travis-ci.org/wenzhixin/bootstrap-table)
[![GitHub version](https://badge.fury.io/gh/wenzhixin%2Fbootstrap-table.svg)](http://badge.fury.io/gh/wenzhixin%2Fbootstrap-table)
[![Bower version](https://badge.fury.io/bo/bootstrap-table.svg)](http://badge.fury.io/bo/bootstrap-table)
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/bootstrap-table/badge?style=rounded)](https://www.jsdelivr.com/package/npm/bootstrap-table)
[![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)

[![](https://graphs.waffle.io/wenzhixin/bootstrap-table/throughput.svg)](https://graphs.waffle.io/wenzhixin/bootstrap-table/throughput.svg)

An extended Bootstrap table with radio, checkbox, sort, pagination, extensions and other added features.

To get started, check out:
Expand Down Expand Up @@ -97,7 +100,7 @@ Look at the [Change Log](https://github.com/wenzhixin/bootstrap-table/blob/maste
To build bootstrap-table locally please run:

```
grunt build
npm run grunt
```

Result will appear in `dist` directory.
19 changes: 16 additions & 3 deletions docs/_i18n/en/documentation/column-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,18 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
The cell formatter function, take three parameters: <br>
value: the field value. <br>
row: the row record data.<br>
index: the row index.</td>
index: the row index.<br>
field: the row field.<br>
Example usage:<br>
<pre>
function formatter(value, row, index, field) {
if (value === 'foo') {
return '<strong>' + value + '</strong>';
}
return value;
}
</pre>
</td>
</tr>
<tr>
<td>footerFormatter</td>
Expand Down Expand Up @@ -201,7 +212,9 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
<td>
The custom field sort function that used to do local sorting, take two parameters: <br>
a: the first field value.<br>
b: the second field value.
b: the second field value.<br>
rowA: the first row.<br>
rowB: the second row.
</td>
</tr>
<tr>
Expand Down Expand Up @@ -251,7 +264,7 @@ function cellStyle(value, row, index, field) {
<td>Boolean</td>
<td>true</td>
<td>
True to search use formated data.
True to search use formatted data.
</td>
</tr>
<tr>
Expand Down
6 changes: 6 additions & 0 deletions docs/_i18n/en/documentation/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,5 +245,11 @@ $('#table').on('event-name.bs.table', function (e, arg1, arg2, ...) {
<td>params</td>
<td>Fires after the click the refresh button.</td>
</tr>
<tr>
<td>onScrollBody</td>
<td>scroll-body.bs.table</td>
<td></td>
<td>Fires when table body scroll.</td>
</tr>
</tbody>
</table>
12 changes: 11 additions & 1 deletion docs/_i18n/en/documentation/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter);`.
uniqueId: the value of the uniqueId for that row.</td>
</tr>
<tr>
<td>getRowsHidden</td>
<td>getHiddenRows</td>
<td>boolean</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>
Expand Down Expand Up @@ -344,5 +344,15 @@ The calling method syntax: `$('#table').bootstrapTable('method', parameter);`.
<td>is subtable</td>
<td>Collapse all rows if the detail view option is set to True.</td>
</tr>
<tr>
<td>updateCellById</td>
<td>params</td>
<td>
update the cell specified by the id, each param contains following properties: <br>
id: row id where the id should be the uniqueid field assigned to the table. <br>
field: field name of the cell to be updated.<br>
value: new value of the cell.
</td>
</tr>
</tbody>
</table>
13 changes: 12 additions & 1 deletion docs/_i18n/en/documentation/table-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
<td>data-page-list</td>
<td>Array</td>
<td>[10, 25, 50, 100]</td>
<td>When set pagination property, initialize the page size selecting list. If you include the 'All' option, all the records will be shown in your table.</td>
<td>When set pagination property, initialize the page size selecting list. If you include the 'All' or 'Unlimited' option, all the records will be shown in your table.</td>
</tr>
<tr>
<td>selectItemName</td>
Expand Down Expand Up @@ -524,6 +524,17 @@ The table options are defined in `jQuery.fn.bootstrapTable.defaults`.
<td>false</td>
<td>True to select checkbox or radiobox when clicking rows.</td>
</tr>
<tr>
<td>ignoreClickToSelectOn</td>
<td>data-ignore-click-to-select-on</td>
<td>Function</td>
<td><code>{ return $.inArray(element.tagName, ['A', 'BUTTON']); }</code></td>
<td>
Takes one parameters:<br>
element: the element clicked on.<br>
Return true if the click should be ignored, false if the click should cause the row to be selected. This option is only relevant if clickToSelect is true.
</td>
</tr>
<tr>
<td>singleSelect</td>
<td>data-single-select</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/_i18n/en/faq/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ onClickRow: function (row, $element) {

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>
I'm also grateful for your donations: <a href="/donate">{% t pages.donate.title %}</a>
17 changes: 4 additions & 13 deletions docs/_i18n/en/getting-started/grunt.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,20 @@ To install Grunt, you must **first** [download and install node.js](http://nodej

Then, from the command line:

1. Install `grunt-cli` globally with `npm install -g grunt-cli`.
2. Navigate to the root `/bootstrap-table/` directory, then run `npm install`. npm will look at the `package.json` file and automatically install the necessary local dependencies listed there.
1. Navigate to the root `/bootstrap-table/` directory, then run `npm install`. npm will look at the `package.json` file and automatically install the necessary local dependencies listed there.

When completed, you'll be able to run the various Grunt commands provided from the command line.

## Available Grunt commands

### `grunt dist` (Just compile CSS and JavaScript)

Regenerates the `/dist/` directory with compiled and minified CSS and JavaScript files. As a Bootstrap user, this is normally the command you want.

### `grunt test` (Run tests)

Runs [JSHint](http://jshint.com/) to test our code.

### `grunt docs` (Build & test the docs assets)
### `npm run grunt docs` (Build & test the docs assets)

Builds and tests CSS, JavaScript, and other assets which are used when running the documentation locally via `jekyll serve`.

### `grunt` (Build absolutely everything and run tests)
### `npm run grunt` (Build absolutely everything and run tests)

Compiles and minifies CSS and JavaScript, builds the documentation website, runs the HTML5 validator against the docs, regenerates the Customizer assets, and more. Requires [Jekyll](http://jekyllrb.com/docs/installation/).

## Troubleshooting

Should you encounter problems with installing dependencies or running Grunt commands, first delete the `/node_modules/` directory generated by npm. Then, rerun `npm install`.
Should you encounter problems with installing dependencies or running Grunt commands, first delete the `/node_modules/` directory generated by npm. Then, rerun `npm install`.
13 changes: 13 additions & 0 deletions docs/_i18n/en/getting-started/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ We can also use remote url data by setting `data-url="data1.json"` on a normal t
</thead>
</table>
```
You can also add `pagination`, `search`, and `sorting` to a table like the following table.

```html
<table data-pagination="true" data-search="true" data-toggle="table" data-url="data1.json">
<thead>
<tr>
<th data-sortable="true" data-field="id">Item ID</th>
<th data-field="name">Item Name</th>
<th data-field="price">Item Price</th>
</tr>
</thead>
</table>
```

## Via JavaScript

Expand Down
5 changes: 4 additions & 1 deletion docs/_i18n/es/documentation/column-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@ Las propiedades de la columna están definidas en `jQuery.fn.bootstrapTable.colu
<td>
La función sort es usada para hacer el ordenamiendo customizable, toma dos parámetros: <br>
a: el primer valor del campo.<br>
b: el segundo valor del campo.</td>
b: el segundo valor del campo.<br>
rowA: la primera fila.<br>
rowB: la segunda fila.
</td>
</tr>
<tr>
<td>sortName</td>
Expand Down
6 changes: 6 additions & 0 deletions docs/_i18n/es/documentation/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,5 +212,11 @@
<td>params</td>
<td>Se ejecuta cuando se cliquea el botón de refresh.</td>
</tr>
<tr>
<td>onScrollBody</td>
<td>scroll-body.bs.table</td>
<td></td>
<td>Incendios cuando desplazamiento del cuerpo de la tabla.</td>
</tr>
</tbody>
</table>
2 changes: 1 addition & 1 deletion docs/_i18n/es/documentation/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Sintaxis para llamar a un método: `$('#table').bootstrapTable('method', paramet
isIdField: Boolean que indica si el index es idField o la posición de la fila.</td>
</tr>
<tr>
<td>getRowsHidden</td>
<td>getHiddenRows</td>
<td>boolean</td>
<td>Obitnene todas las filas ocultas si se pasa el parámetro show en true las filas serán mostradas, sino, el método solo
devolvera las filas ocultas.</td>
Expand Down
11 changes: 11 additions & 0 deletions docs/_i18n/es/documentation/table-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,17 @@ Las opciones de la tabla están definidas en `jQuery.fn.bootstrapTable.defaults`
<td>false</td>
<td>True para seleccionar el checkbox o el radiobox cuando se da click sobre las filas.</td>
</tr>
<tr>
<td>ignoreClickToSelectOn</td>
<td>data-ignore-click-to-select-on</td>
<td>Function</td>
<td><code>{ return $.inArray(element.tagName, ['A', 'BUTTON']); }</code></td>
<td>
Takes one parameters:<br>
element: the element clicked on.<br>
Return true if the click should be ignored, false if the click should cause the row to be selected. This option is only relevant if clickToSelect is true.
</td>
</tr>
<tr>
<td>singleSelect</td>
<td>data-single-select</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/_i18n/es/faq/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ onClickRow: function (row, $element) {

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>
I'm also grateful for your donations: <a href="/donate">{% t pages.donate.title %}</a>
17 changes: 4 additions & 13 deletions docs/_i18n/es/getting-started/grunt.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,20 @@ Para instalar Grunt, se debe **primero** [descargar e instalar node.js](http://n

Entonces, en la linea de comandos:

1. Instalar `grunt-cli` globalmente con `npm install -g grunt-cli`.
2. Navegue hasta la ruta del folder `/bootstrap-table/`, entonces ejecute `npm install`. npm buscará el archivo `package.json` y automaticamente instalará las dependencias locales necesarias listadas aquí.
1. Navegue hasta la ruta del folder `/bootstrap-table/`, entonces ejecute `npm install`. npm buscará el archivo `package.json` y automaticamente instalará las dependencias locales necesarias listadas aquí.

Cuando esté completo, ya se podrá ejecutar varios comandos de Grunt en la linea de comandos.

## Available Grunt commands

### `grunt dist` (Just compile CSS and JavaScript)

Regenerando el folder `/dist/` con el CSS y JavaScript compilado. Como un usuario de Bootstrap, este es el comando.

### `grunt test` (Run tests)

Ejecute [JSHint](http://jshint.com/) para probar nuestras pruebas.

### `grunt docs` (Compila y prueba la documentación)
### `npm run grunt docs` (Compila y prueba la documentación)

Compila y purueba el CSS, JavaScript, y otros artchivos cuando se esta ejecutando la documentación localmente con `jekyll serve`.

### `grunt` (Compila absolutamente todo y ejecuta pruebas)
### `npm run grunt` (Compila absolutamente todo y ejecuta pruebas)

Compila y minifica el CSS y JavaScript, compila la documentación, ejecuta el validador de HTML5 contra la documentación, regenera los archivos customizables, y más. Se requiere [Jekyll](http://jekyllrb.com/docs/installation/).

## Troubleshooting

Si se encuentran problemas instalando las dependencias o ejecutando los comandos de Grunt, primero elimine el folder `/node_modules/` generado por npm. Entonces, vuelva a ejecutar `npm install`.
Si se encuentran problemas instalando las dependencias o ejecutando los comandos de Grunt, primero elimine el folder `/node_modules/` generado por npm. Entonces, vuelva a ejecutar `npm install`.
4 changes: 3 additions & 1 deletion docs/_i18n/zh-cn/documentation/column-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`.
<td>
The custom field sort function that used to do local sorting, take two parameters: <br>
a: the first field value.<br>
b: the second field value.
b: the second field value.<br>
rowA: the first row.<br>
rowB: the second row.
</td>
</tr>
<tr>
Expand Down
20 changes: 13 additions & 7 deletions docs/_i18n/zh-cn/documentation/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,19 @@
<td>sort.bs.table</td>
<td>name, order</td>
<td>
Fires when user sort a column, the parameters contains: <br>
name: the sort column field name<br>
order: the sort column order.
当用户对某列进行排序时触发,参数包括:<br>
name:排序列的 filed 名称,<br>
order:排序顺序。
</td>
</tr>
<tr>
<td>onCheck</td>
<td>check.bs.table</td>
<td>row</td>
<td>
Fires when user check a row, the parameters contains: <br>
row: the record corresponding to the clicked row.
$element: the DOM element checked.
当用户选择某一行时触发,参数包含:<br>
        row:与点击行对应的记录,<br>
        $element:选择的DOM元素。
</td>
</tr>
<tr>
Expand Down Expand Up @@ -223,7 +223,13 @@
<td>onRefresh</td>
<td>refresh.bs.table</td>
<td>params</td>
<td>Fires after the click the refresh button.</td>
<td>点击刷新按钮后触发。</td>
</tr>
<tr>
<td>onScrollBody</td>
<td>scroll-body.bs.table</td>
<td></td>
<td>表格 body 滚动时触发。</td>
</tr>
</tbody>
</table>
2 changes: 1 addition & 1 deletion docs/_i18n/zh-cn/documentation/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
<td>showRow-hideRow</td>
</tr>
<tr>
<td>getRowsHidden</td>
<td>getHiddenRows</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>
Expand Down
Loading

0 comments on commit 41432f9

Please sign in to comment.