/pack-rat/003_pack_rat/pack-rat/node_modules/bootstrap-table/docs/_i18n/en/documentation/column-options.md |
@@ -0,0 +1,267 @@ |
# Column options []({{ site.repo }}/blob/develop/docs/_i18n/{{ site.lang }}/documentation/column-options.md) |
|
--- |
|
The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`. |
|
<table class="table" |
id="c" |
data-search="true" |
data-show-toggle="true" |
data-show-columns="true" |
data-mobile-responsive="true"> |
<thead> |
<tr> |
<th>Name</th> |
<th>Attribute</th> |
<th>Type</th> |
<th>Default</th> |
<th>Description</th> |
</tr> |
</thead> |
<tbody> |
<tr> |
<td>radio</td> |
<td>data-radio</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to show a radio. The radio column has fixed width.</td> |
</tr> |
<tr> |
<td>checkbox</td> |
<td>data-checkbox</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to show a checkbox. The checkbox column has fixed width.</td> |
</tr> |
<tr> |
<td>field</td> |
<td>data-field</td> |
<td>String</td> |
<td>undefined</td> |
<td>The column field name.</td> |
</tr> |
<tr> |
<td>title</td> |
<td>data-title</td> |
<td>String</td> |
<td>undefined</td> |
<td>The column title text.</td> |
</tr> |
<tr> |
<td>titleTooltip</td> |
<td>data-title-tooltip</td> |
<td>String</td> |
<td>undefined</td> |
<td>The column title tooltip text. This option also support the title HTML attribute.</td> |
</tr> |
<tr> |
<td>class</td> |
<td>class / data-class</td> |
<td>String</td> |
<td>undefined</td> |
<td>The column class name.</td> |
</tr> |
<tr> |
<td>rowspan</td> |
<td>rowspan / data-rowspan</td> |
<td>Number</td> |
<td>undefined</td> |
<td>Indicate how many rows a cell should take up.</td> |
</tr> |
<tr> |
<td>colspan</td> |
<td>colspan / data-colspan</td> |
<td>Number</td> |
<td>undefined</td> |
<td>Indicate how many columns a cell should take up.</td> |
</tr> |
<tr> |
<td>align</td> |
<td>data-align</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indicate how to align the column data. 'left', 'right', 'center' can be used.</td> |
</tr> |
<tr> |
<td>halign</td> |
<td>data-halign</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indicate how to align the table header. 'left', 'right', 'center' can be used.</td> |
</tr> |
<tr> |
<td>falign</td> |
<td>data-falign</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indicate how to align the table footer. 'left', 'right', 'center' can be used.</td> |
</tr> |
<tr> |
<td>valign</td> |
<td>data-valign</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indicate how to align the cell data. 'top', 'middle', 'bottom' can be used.</td> |
</tr> |
<tr> |
<td>width</td> |
<td>data-width</td> |
<td>Number {Pixels or Percentage}</td> |
<td>undefined</td> |
<td>The width of column. If not defined, the width will auto expand to fit its contents. Though if the table is left responsive and sized too small this 'width' might be ignored (use min/max-width via class or such then). Also you can add '%' to your number and the bootstrapTable will use the percentage unit, otherwise, leave as number (or add 'px') to make it use pixels.</td> |
</tr> |
<tr> |
<td>sortable</td> |
<td>data-sortable</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to allow the column can be sorted. |
</td> |
</tr> |
<tr> |
<td>order</td> |
<td>data-order</td> |
<td>String</td> |
<td>'asc'</td> |
<td>The default sort order, can only be 'asc' or 'desc'.</td> |
</tr> |
<tr> |
<td>visible</td> |
<td>data-visible</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False to hide the columns item.</td> |
</tr> |
<tr> |
<td>cardVisible</td> |
<td>data-card-visible</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False to hide the columns item in card view state.</td> |
</tr> |
<tr> |
<td>switchable</td> |
<td>data-switchable</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False to disable the switchable of columns item.</td> |
</tr> |
<tr> |
<td>clickToSelect</td> |
<td>data-click-to-select</td> |
<td>Boolean</td> |
<td>true</td> |
<td>True to select checkbox or radio when the column is clicked.</td> |
</tr> |
<tr> |
<td>formatter</td> |
<td>data-formatter</td> |
<td>Function</td> |
<td>undefined</td> |
<td> |
The context (this) is the column Object. <br> |
The cell formatter function, take three parameters: <br> |
value: the field value. <br> |
row: the row record data.<br> |
index: the row index.</td> |
</tr> |
<tr> |
<td>footerFormatter</td> |
<td>data-footer-formatter</td> |
<td>Function</td> |
<td>undefined</td> |
<td> |
The context (this) is the column Object. <br> |
The function, take one parameter: <br> |
data: Array of all the data rows. <br> |
the function should return a string with the text to show in the footer cell. |
</tr> |
<tr> |
<td>events</td> |
<td>data-events</td> |
<td>Object</td> |
<td>undefined</td> |
<td> |
The cell events listener when you use formatter function, take four parameters: <br> |
event: the jQuery event. <br> |
value: the field value. <br> |
row: the row record data.<br> |
index: the row index. <br> |
Example code: |
<code><th .. data-events="operateEvent"></code> |
<code>var operateEvents = {'click .like': function (e, value, row, index) {}};</code> |
</td> |
</tr> |
<tr> |
<td>sorter</td> |
<td>data-sorter</td> |
<td>Function</td> |
<td>undefined</td> |
<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. |
</td> |
</tr> |
<tr> |
<td>sortName</td> |
<td>data-sort-name</td> |
<td>String</td> |
<td>undefined</td> |
<td>Provide a customizable sort-name, not the default sort-name in the header, or the field name |
of the column. For example, a column might display the value of fieldName of "html" such as |
"<b><span style="color:red">abc</span></b>", but a fieldName to sort is "content" with the value of "abc". |
</td> |
</tr> |
<tr> |
<td>cellStyle</td> |
<td>data-cell-style</td> |
<td>Function</td> |
<td>undefined</td> |
<td> |
The cell style formatter function, take three parameters: <br> |
value: the field value.<br> |
row: the row record data.<br> |
index: the row index.<br> |
field: the row field.<br> |
Support classes or css. Example usage:<br> |
<pre> |
function cellStyle(value, row, index, field) { |
return { |
classes: 'text-nowrap another-class', |
css: {"color": "blue", "font-size": "50px"} |
}; |
} |
</pre> |
</td> |
</tr> |
<tr> |
<td>searchable</td> |
<td>data-searchable</td> |
<td>Boolean</td> |
<td>true</td> |
<td> |
True to search data for this column. |
</td> |
</tr> |
<tr> |
<td>searchFormatter</td> |
<td>data-search-formatter</td> |
<td>Boolean</td> |
<td>true</td> |
<td> |
True to search use formated data. |
</td> |
</tr> |
<tr> |
<td>escape</td> |
<td>data-escape</td> |
<td>Boolean</td> |
<td>false</td> |
<td> |
Escapes a string for insertion into HTML, replacing &, <, >, ", `, and ' characters. |
</td> |
</tr> |
</tbody> |
</table> |
/pack-rat/003_pack_rat/pack-rat/node_modules/bootstrap-table/docs/_i18n/en/documentation/events.md |
@@ -0,0 +1,249 @@ |
# Events []({{ site.repo }}/blob/develop/docs/_i18n/{{ site.lang }}/documentation/events.md) |
|
--- |
|
To use event syntax: |
|
```js |
$('#table').bootstrapTable({ |
onEventName: function (arg1, arg2, ...) { |
// ... |
} |
}); |
|
$('#table').on('event-name.bs.table', function (e, arg1, arg2, ...) { |
// ... |
}); |
``` |
|
<table class="table" |
id="e" |
data-search="true" |
data-show-toggle="true" |
data-show-columns="true" |
data-mobile-responsive="true"> |
<thead> |
<tr> |
<th>Option Event</th> |
<th>jQuery Event</th> |
<th>Parameter</th> |
<th>Description</th> |
</tr> |
</thead> |
<tbody> |
<tr> |
<td>onAll</td> |
<td>all.bs.table</td> |
<td>name, args</td> |
<td> |
Fires when all events trigger, the parameters contain: <br> |
name: the event name, <br> |
args: the event data. |
</td> |
</tr> |
<tr> |
<td>onClickRow</td> |
<td>click-row.bs.table</td> |
<td>row, $element, field</td> |
<td> |
Fires when user click a row, the parameters contain: <br> |
row: the record corresponding to the clicked row, <br> |
$element: the tr element, <br> |
field: the field name corresponding to the clicked cell. |
</td> |
</tr> |
<tr> |
<td>onDblClickRow</td> |
<td>dbl-click-row.bs.table</td> |
<td>row, $element, field</td> |
<td> |
Fires when user double click a row, the parameters contain: <br> |
row: the record corresponding to the clicked row, <br> |
$element: the tr element, <br> |
field: the field name corresponding to the clicked cell. |
</td> |
</tr> |
<tr> |
<td>onClickCell</td> |
<td>click-cell.bs.table</td> |
<td>field, value, row, $element</td> |
<td> |
Fires when user click a cell, the parameters contain: <br> |
field: the field name corresponding to the clicked cell, <br> |
value: the data value corresponding to the clicked cell, <br> |
row: the record corresponding to the clicked row, <br> |
$element: the td element. |
</td> |
</tr> |
<tr> |
<td>onDblClickCell</td> |
<td>dbl-click-cell.bs.table</td> |
<td>field, value, row, $element</td> |
<td> |
Fires when user double click a cell, the parameters contain: <br> |
field: the field name corresponding to the clicked cell, <br> |
value: the data value corresponding to the clicked cell, <br> |
row: the record corresponding to the clicked row, <br> |
$element: the td element. |
</td> |
</tr> |
<tr> |
<td>onSort</td> |
<td>sort.bs.table</td> |
<td>name, order</td> |
<td> |
Fires when user sort a column, the parameters contain: <br> |
name: the sort column field name<br> |
order: the sort column order. |
</td> |
</tr> |
<tr> |
<td>onCheck</td> |
<td>check.bs.table</td> |
<td>row, $element</td> |
<td> |
Fires when user check a row, the parameters contain: <br> |
row: the record corresponding to the clicked row. |
$element: the DOM element checked. |
</td> |
</tr> |
<tr> |
<td>onUncheck</td> |
<td>uncheck.bs.table</td> |
<td>row, $element</td> |
<td> |
Fires when user uncheck a row, the parameters contain: <br> |
row: the record corresponding to the clicked row. |
$element: the DOM element unchecked. |
</td> |
</tr> |
<tr> |
<td>onCheckAll</td> |
<td>check-all.bs.table</td> |
<td>rows</td> |
<td> |
Fires when user check all rows, the parameters contain: <br> |
rows: array of records corresponding to newly checked rows. |
</td> |
</tr> |
<tr> |
<td>onUncheckAll</td> |
<td>uncheck-all.bs.table</td> |
<td>rows</td> |
<td> |
Fires when user uncheck all rows, the parameters contain: <br> |
rows: array of records corresponding to previously checked rows. |
</td> |
</tr> |
<tr> |
<td>onCheckSome</td> |
<td>check-some.bs.table</td> |
<td>rows</td> |
<td> |
Fires when user check some rows, the parameters contain: <br> |
rows: array of records corresponding to previously checked rows. |
</td> |
</tr> |
<tr> |
<td>onUncheckSome</td> |
<td>uncheck-some.bs.table</td> |
<td>rows</td> |
<td> |
Fires when user uncheck some rows, the parameters contain: <br> |
rows: array of records corresponding to previously checked rows. |
</td> |
</tr> |
<tr> |
<td>onLoadSuccess</td> |
<td>load-success.bs.table</td> |
<td>data</td> |
<td>Fires when remote data is loaded |
successfully. |
</td> |
</tr> |
<tr> |
<td>onLoadError</td> |
<td>load-error.bs.table</td> |
<td>status, res</td> |
<td>Fires when some errors occur to load remote data.</td> |
</tr> |
<tr> |
<td>onColumnSwitch</td> |
<td>column-switch.bs.table</td> |
<td>field, checked</td> |
<td>Fires when switch the column visible.</td> |
</tr> |
<tr> |
<td>onColumnSearch</td> |
<td>column-search.bs.table</td> |
<td>field, text</td> |
<td>Fires when search by column.</td> |
</tr> |
<tr> |
<td>onPageChange</td> |
<td>page-change.bs.table</td> |
<td>number, size</td> |
<td>Fires when change the page number or page size.</td> |
</tr> |
<tr> |
<td>onSearch</td> |
<td>search.bs.table</td> |
<td>text</td> |
<td>Fires when search the table.</td> |
</tr> |
<tr> |
<td>onToggle</td> |
<td>toggle.bs.table</td> |
<td>cardView</td> |
<td>Fires when toggle the view of table.</td> |
</tr> |
<tr> |
<td>onPreBody</td> |
<td>pre-body.bs.table</td> |
<td>data</td> |
<td>Fires before the table body is rendered</td> |
</tr> |
<tr> |
<td>onPostBody</td> |
<td>post-body.bs.table</td> |
<td>data</td> |
<td>Fires after the table body is rendered and available in the DOM</td> |
</tr> |
<tr> |
<td>onPostHeader</td> |
<td>post-header.bs.table</td> |
<td>none</td> |
<td>Fires after the table header is rendered and availble in the DOM</td> |
</tr> |
<tr> |
<td>onExpandRow</td> |
<td>expand-row.bs.table</td> |
<td>index, row, $detail</td> |
<td>Fires when click the detail icon to expand the detail view.</td> |
</tr> |
<tr> |
<td>onCollapseRow</td> |
<td>collapse-row.bs.table</td> |
<td>index, row</td> |
<td>Fires when click the detail icon to collapse the detail view.</td> |
</tr> |
<tr> |
<td>onRefreshOptions</td> |
<td>refresh-options.bs.table</td> |
<td>options</td> |
<td>Fires after refresh the options and before destroy and init the table</td> |
</tr> |
<tr> |
<td>onResetView</td> |
<td>reset-view.bs.table</td> |
<td></td> |
<td>Fires when reset view of the table.</td> |
</tr> |
<tr> |
<td>onRefresh</td> |
<td>refresh.bs.table</td> |
<td>params</td> |
<td>Fires after the click the refresh button.</td> |
</tr> |
</tbody> |
</table> |
/pack-rat/003_pack_rat/pack-rat/node_modules/bootstrap-table/docs/_i18n/en/documentation/methods.md |
@@ -0,0 +1,348 @@ |
# Methods []({{ site.repo }}/blob/develop/docs/_i18n/{{ site.lang }}/documentation/methods.md) |
|
--- |
|
The calling method syntax: `$('#table').bootstrapTable('method', parameter);`. |
|
<table class="table" |
id="m" |
data-search="true" |
data-show-toggle="true" |
data-show-columns="true" |
data-mobile-responsive="true"> |
<thead> |
<tr> |
<th>Name</th> |
<th>Parameter</th> |
<th>Description</th> |
<th data-formatter="methodFormatter" |
data-align="center" |
data-valign="middle">Example</th> |
</tr> |
</thead> |
<tbody> |
<tr> |
<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, an empty array will return.</td> |
<td>getSelections</td> |
</tr> |
<tr> |
<td>getAllSelections</td> |
<td>none</td> |
<td>Return all selected rows contain search or filter, when no record selected, an empty array will return.</td> |
<td>getAllSelections</td> |
</tr> |
<tr> |
<td>showAllColumns</td> |
<td>none</td> |
<td>Show All the columns.</td> |
<td>showAllColumns</td> |
</tr> |
<tr> |
<td>hideAllColumns</td> |
<td>none</td> |
<td>Hide All the columns.</td> |
<td>hidAllColumns</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>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> |
<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. |
</td> |
<td>remove</td> |
</tr> |
<tr> |
<td>removeAll</td> |
<td>-</td> |
<td> |
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. |
</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. |
</td> |
</tr> |
<tr> |
<td>updateRow</td> |
<td>params</td> |
<td> |
Update the specified row(s), each param contains following properties: <br> |
index: the row index to be updated. <br> |
row: the new row data. |
</td> |
</tr> |
<tr> |
<td>updateByUniqueId</td> |
<td>params</td> |
<td> |
Update the specified row(s), each param contains following properties: <br> |
id: a row id where the id should be the uniqueid field assigned to the table. <br> |
row: the new row data. |
</td> |
</tr> |
<tr> |
<td>showRow</td> |
<td>params</td> |
<td>Show the specified row. The param must contain at least one of the following properties: |
index: the row index. |
uniqueId: the value of the uniqueId for that row.</td> |
</tr> |
<tr> |
<td>hideRow</td> |
<td>params</td> |
<td>Hide the specified row. The param must contain at least one of the following properties: |
index: the row index. |
uniqueId: the value of the uniqueId for that row.</td> |
</tr> |
<tr> |
<td>getRowsHidden</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> |
</tr> |
<tr> |
<td>mergeCells</td> |
<td>options</td> |
<td> |
Merge some cells to one cell, the options contains following properties: <br> |
index: the row index. <br> |
field: the field name.<br> |
rowspan: the rowspan count to be merged. <br> |
colspan: the colspan count to be merged. |
</td> |
</tr> |
<tr> |
<td>updateCell</td> |
<td>params</td> |
<td> |
Update one cell, the params contains following properties: <br> |
index: the row index. <br> |
field: the field name.<br> |
value: the new field value. |
<br> |
To disable table re-initialization you can set <code>{reinit: false}</code> |
</td> |
</tr> |
<tr> |
<td>refresh</td> |
<td>params</td> |
<td>Refresh the remote server data, you can set <code>{silent: true}</code> to refresh the data silently, and set <code>{url: newUrl, pageNumber: pageNumber, pageSize: pageSize}</code> to change the url (optional), page number (optional) and page size (optional). To supply query params specific to this request, set <code>{query: {foo: 'bar'}}</code>.</td> |
</tr> |
<tr> |
<td>refreshOptions</td> |
<td>options</td> |
<td>Refresh the options</td> |
</tr> |
<tr> |
<td>resetSearch</td> |
<td>text</td> |
<td>Set the search text</td> |
</tr> |
<tr> |
<td>showLoading</td> |
<td>none</td> |
<td>Show loading status.</td> |
</tr> |
<tr> |
<td>hideLoading</td> |
<td>none</td> |
<td>Hide loading status.</td> |
</tr> |
<tr> |
<td>checkAll</td> |
<td>none</td> |
<td>Check all current page rows.</td> |
</tr> |
<tr> |
<td>uncheckAll</td> |
<td>none</td> |
<td>Uncheck all current page rows.</td> |
</tr> |
<tr> |
<td>checkInvert</td> |
<td>none</td> |
<td>Invert check of current page rows. Triggers onCheckSome and onUncheckSome events.</td> |
</tr> |
<tr> |
<td>check</td> |
<td>index</td> |
<td>Check a row, the row index start with 0.</td> |
</tr> |
<tr> |
<td>uncheck</td> |
<td>index</td> |
<td>Uncheck a row, the row index start with 0.</td> |
</tr> |
<tr> |
<td>checkBy</td> |
<td>params</td> |
<td> |
Check a row by array of values, the params contains:<br> |
field: name of the field used to find records<br> |
values: array of values for rows to check<br> |
Example: <br> |
$("#table").bootstrapTable("checkBy", {field:"field_name", values:["value1","value2","value3"]}) |
</td> |
</tr> |
<tr> |
<td>uncheckBy</td> |
<td>params</td> |
<td> |
Uncheck a row by array of values, the params contains:<br> |
field: name of the field used to find records<br> |
values: array of values for rows to uncheck<br> |
Example: <br> |
$("#table").bootstrapTable("uncheckBy", {field:"field_name", values:["value1","value2","value3"]}) |
</td> |
</tr> |
<tr> |
<td>resetView</td> |
<td>params</td> |
<td>Reset the bootstrap table view, for example reset the table height.</td> |
</tr> |
<tr> |
<td>resetWidth</td> |
<td>none</td> |
<td>Resizes header and footer to fit current columns width</td> |
</tr> |
<tr> |
<td>destroy</td> |
<td>none</td> |
<td>Destroy the bootstrap table.</td> |
</tr> |
<tr> |
<td>showColumn</td> |
<td>field</td> |
<td>Show the specified column.</td> |
</tr> |
<tr> |
<td>hideColumn</td> |
<td>field</td> |
<td>Hide the specified column.</td> |
</tr> |
<tr> |
<td>getHiddenColumns</td> |
<td>-</td> |
<td>Get hidden columns.</td> |
</tr> |
<tr> |
<td>getVisibleColumns</td> |
<td>-</td> |
<td>Get visible columns.</td> |
</tr> |
<tr> |
<td>scrollTo</td> |
<td>value</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, the unit is 'px'.</td> |
</tr> |
<tr> |
<td>filterBy</td> |
<td>params</td> |
<td>(Can use only in client-side) Filter data in table, e.g. you can filter <code>{age: 10}</code> to show the data only age is equal to 10. You can also filter with an array of values, as in: <code>{age: 10, hairColor: ["blue", "red", "green"]} to find data where age is equal to 10 and hairColor is either blue, red, or green.</td> |
</tr> |
<tr> |
<td>selectPage</td> |
<td>page</td> |
<td>Go to the a specified page.</td> |
</tr> |
<tr> |
<td>prevPage</td> |
<td>none</td> |
<td>Go to previous page.</td> |
</tr> |
<tr> |
<td>nextPage</td> |
<td>none</td> |
<td>Go to next page.</td> |
</tr> |
<tr> |
<td>togglePagination</td> |
<td>none</td> |
<td>Toggle the pagination option.</td> |
</tr> |
<tr> |
<td>toggleView</td> |
<td>none</td> |
<td>Toggle the card/table view.</td> |
</tr> |
<tr> |
<td>expandRow</td> |
<td>index</td> |
<td>Expand the row that has the index passed by parameter if the detail view option is set to True.</td> |
</tr> |
<tr> |
<td>collapseRow</td> |
<td>index</td> |
<td>Collapse the row that has the index passed by parameter if the detail view option is set to True.</td> |
</tr> |
<tr> |
<td>expandAllRows</td> |
<td>is subtable</td> |
<td>Expand all rows if the detail view option is set to True.</td> |
</tr> |
<tr> |
<td>collapseAllRows</td> |
<td>is subtable</td> |
<td>Collapse all rows if the detail view option is set to True.</td> |
</tr> |
</tbody> |
</table> |
/pack-rat/003_pack_rat/pack-rat/node_modules/bootstrap-table/docs/_i18n/en/documentation/table-options.md |
@@ -0,0 +1,664 @@ |
# Table options []({{ site.repo }}/blob/develop/docs/_i18n/{{ site.lang }}/documentation/table-options.md) |
|
--- |
|
The table options are defined in `jQuery.fn.bootstrapTable.defaults`. |
|
<table class="table" |
id="t" |
data-search="true" |
data-show-toggle="true" |
data-show-columns="true" |
data-mobile-responsive="true"> |
<thead> |
<tr> |
<th>Name</th> |
<th>Attribute</th> |
<th>Type</th> |
<th>Default</th> |
<th>Description</th> |
</tr> |
</thead> |
<tbody> |
<tr> |
<td>-</td> |
<td>data-toggle</td> |
<td>String</td> |
<td>'table'</td> |
<td>Activate bootstrap table without writing 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> |
</tr> |
<tr> |
<td>sortClass</td> |
<td>data-sort-class</td> |
<td>String</td> |
<td>undefined</td> |
<td>The class name of the td elements which are sorted.</td> |
</tr> |
<tr> |
<td>height</td> |
<td>data-height</td> |
<td>Number</td> |
<td>undefined</td> |
<td>The height of table.</td> |
</tr> |
<tr> |
<td>undefinedText</td> |
<td>data-undefined-text</td> |
<td>String</td> |
<td>'-'</td> |
<td>Defines the default undefined text.</td> |
</tr> |
<tr> |
<td>striped</td> |
<td>data-striped</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to stripe the rows.</td> |
</tr> |
<tr> |
<td>sortName</td> |
<td>data-sort-name</td> |
<td>String</td> |
<td>undefined</td> |
<td>Defines which column will be sorted.</td> |
</tr> |
<tr> |
<td>sortOrder</td> |
<td>data-sort-order</td> |
<td>String</td> |
<td>'asc'</td> |
<td>Defines the column sort order, can only be 'asc' or 'desc'.</td> |
</tr> |
<tr> |
<td>sortStable</td> |
<td>data-sort-stable</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to get a stable sorting. We will add <code>_position</code> property to the row.</td> |
</tr> |
<tr> |
<td>iconsPrefix</td> |
<td>data-icons-prefix</td> |
<td>String</td> |
<td>'glyphicon'</td> |
<td>Defines icon set name ('glyphicon' or 'fa' for FontAwesome). By default 'glyphicon' is used. </td> |
</tr> |
<tr> |
<td>iconSize</td> |
<td>data-icon-size</td> |
<td>String</td> |
<td>undefined</td> |
<td>Defines icon size: <ul><li>undefined => btn</li><li>xs => btn-xs</li><li>sm => btn-sm</li><li>lg => btn-lg</li></ul> |
</td> |
</tr> |
<tr> |
<td>buttonsClass</td> |
<td>data-buttons-class</td> |
<td>String</td> |
<td>'default'</td> |
<td>Defines the Bootstrap class (added after 'btn-') of table buttons: EX: 'primary', 'danger', 'warning'...</td> |
</tr> |
<tr> |
<td>icons</td> |
<td>data-icons</td> |
<td>Object</td> |
<td>{<br/> |
<i>paginationSwitchDown:</i> 'glyphicon-collapse-down icon-chevron-down',<br/> |
<i>paginationSwitchUp:</i> 'glyphicon-collapse-up icon-chevron-up',<br/> |
<i>refresh:</i> 'glyphicon-refresh icon-refresh',<br/> |
<i>toggle:</i> 'glyphicon-list-alt icon-list-alt',<br/> |
<i>columns:</i> 'glyphicon-th icon-th',<br/> |
<i>detailOpen:</i> 'glyphicon-plus icon-plus',<br/> |
<i>detailClose:</i> 'glyphicon-minus icon-minus'<br/> |
} |
</td> |
<td>Defines icons used in the toolbar, pagination, and details view.</td> |
</tr> |
<tr> |
<td>columns</td> |
<td>-</td> |
<td>Array</td> |
<td>[]</td> |
<td>The table columns config object, see column properties for more details. |
</td> |
</tr> |
<tr> |
<td>data</td> |
<td>-</td> |
<td>Array</td> |
<td>[]</td> |
<td>The data to be loaded.</td> |
</tr> |
<tr> |
<td>dataField</td> |
<td>data-data-field</td> |
<td>String</td> |
<td>'rows'</td> |
<td>Key in incoming json containing rows data list.</td> |
</tr> |
<tr> |
<td>totalField</td> |
<td>data-total-field</td> |
<td>String</td> |
<td>'total'</td> |
<td>Key in incoming json containing "total" data .</td> |
</tr> |
<tr> |
<td>ajax</td> |
<td>data-ajax</td> |
<td>Function</td> |
<td>undefined</td> |
<td>A method to replace ajax call. Should implement the same API as jQuery ajax method.</td> |
</tr> |
<tr> |
<td>method</td> |
<td>data-method</td> |
<td>String</td> |
<td>'get'</td> |
<td>The method type to request remote data.</td> |
</tr> |
<tr> |
<td>url</td> |
<td>data-url</td> |
<td>String</td> |
<td>undefined</td> |
<td> |
A URL to request data from remote site. |
<br/>Note that the required server response format is different depending on whether the 'sidePagination' |
option is specified. See the following examples: |
<ul> |
<li><a href="https://github.com/wenzhixin/bootstrap-table-examples/blob/master/json/data1.json">Without server-side pagination</a></li> |
<li><a href="https://github.com/wenzhixin/bootstrap-table-examples/blob/master/json/data2.json">With server-side pagination</a></li> |
</ul> |
</td> |
</tr> |
<tr> |
<td>cache</td> |
<td>data-cache</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False to disable caching of AJAX requests.</td> |
</tr> |
<tr> |
<td>contentType</td> |
<td>data-content-type</td> |
<td>String</td> |
<td>'application/json'</td> |
<td>The contentType of request remote data.</td> |
</tr> |
<tr> |
<td>dataType</td> |
<td>data-data-type</td> |
<td>String</td> |
<td>'json'</td> |
<td>The type of data that you are expecting back from the server.</td> |
</tr> |
<tr> |
<td>ajaxOptions</td> |
<td>data-ajax-options</td> |
<td>Object</td> |
<td>{}</td> |
<td>Additional options for submit ajax request. List of values: <a href="http://api.jquery.com/jQuery.ajax">http://api.jquery.com/jQuery.ajax</a>.</td> |
</tr> |
<tr> |
<td>queryParams</td> |
<td>data-query-params</td> |
<td>Function</td> |
<td>function(params) {<br>return params;<br>}</td> |
<td> |
When requesting remote data, you can send additional parameters by modifying queryParams. |
If queryParamsType = 'limit', the params object contains: <br> |
limit, offset, search, sort, order |
Else, it contains: <br> |
pageSize, pageNumber, searchText, sortName, sortOrder. <br> |
Return false to stop request. |
</td> |
</tr> |
<tr> |
<td>queryParamsType</td> |
<td>data-query-params-type</td> |
<td>String</td> |
<td>'limit'</td> |
<td>Set 'limit' to send query params width RESTFul type.</td> |
</tr> |
<tr> |
<td>responseHandler</td> |
<td>data-response-handler</td> |
<td>Function</td> |
<td>function(res) {<br>return res;<br>}</td> |
<td> |
Before load remote data, handler the response data format, the parameters object contains: <br> |
res: the response data. |
</td> |
</tr> |
<tr> |
<td>pagination</td> |
<td>data-pagination</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to show a pagination toolbar on table bottom.</td> |
</tr> |
<tr> |
<td>paginationLoop</td> |
<td>data-pagination-loop</td> |
<td>Boolean</td> |
<td>true</td> |
<td>True to enable pagination continuous loop mode.</td> |
</tr> |
<tr> |
<td>onlyInfoPagination</td> |
<td>data-only-info-pagination</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to show only the quantity of the data that is showing in the table. It needs the pagination table options is set to true.</td> |
</tr> |
<tr> |
<td>sidePagination</td> |
<td>data-side-pagination</td> |
<td>String</td> |
<td>'client'</td> |
<td> |
Defines the side pagination of table, can only be 'client' or 'server'. |
Using 'server' side requires either setting the 'url' or 'ajax' option. |
<br/>Note that the required server response format is different depending on whether |
the 'client' or 'server' option is specified. See the following examples: |
<ul> |
<li><a href="https://github.com/wenzhixin/bootstrap-table-examples/blob/master/json/data1.json">Without server-side pagination</a></li> |
<li><a href="https://github.com/wenzhixin/bootstrap-table-examples/blob/master/json/data2.json">With server-side pagination</a></li> |
</ul> |
</td> |
</tr> |
<tr> |
<td>pageNumber</td> |
<td>data-page-number</td> |
<td>Number</td> |
<td>1</td> |
<td>When set pagination property, initialize the page number.</td> |
</tr> |
<tr> |
<td>pageSize</td> |
<td>data-page-size</td> |
<td>Number</td> |
<td>10</td> |
<td>When set pagination property, initialize the page size.</td> |
</tr> |
<tr> |
<td>pageList</td> |
<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> |
</tr> |
<tr> |
<td>selectItemName</td> |
<td>data-select-item-name</td> |
<td>String</td> |
<td>'btSelectItem'</td> |
<td>The name of radio or checkbox input.</td> |
</tr> |
<tr> |
<td>smartDisplay</td> |
<td>data-smart-display</td> |
<td>Boolean</td> |
<td>true</td> |
<td>True to display pagination or card view smartly.</td> |
</tr> |
<tr> |
<td>escape</td> |
<td>data-escape</td> |
<td>Boolean</td> |
<td>false</td> |
<td>Escapes a string for insertion into HTML, |
replacing <code>&</code>, <code><</code>, <code>></code>, |
<code>"</code>, <code>`</code>, and <code>'</code> characters.</td> |
</tr> |
<tr> |
<td>search</td> |
<td>data-search</td> |
<td>Boolean</td> |
<td>false</td> |
<td>Enable the search input.</td> |
</tr> |
<tr> |
<td>searchOnEnterKey</td> |
<td>data-search-on-enter-key</td> |
<td>Boolean</td> |
<td>false</td> |
<td>The search method will be executed until the Enter key is pressed.</td> |
</tr> |
<tr> |
<td>strictSearch</td> |
<td>data-strict-search</td> |
<td>Boolean</td> |
<td>false</td> |
<td>Enable the strict search.</td> |
</tr> |
<tr> |
<td>searchText</td> |
<td>data-search-text</td> |
<td>String</td> |
<td>''</td> |
<td>When set search property, initialize the search text.</td> |
</tr> |
<tr> |
<td>searchTimeOut</td> |
<td>data-search-time-out</td> |
<td>Number</td> |
<td>500</td> |
<td>Set timeout for search fire.</td> |
</tr> |
<tr> |
<td>trimOnSearch</td> |
<td>data-trim-on-search</td> |
<td>Boolean</td> |
<td>true</td> |
<td>True to trim spaces in search field.</td> |
</tr |
<tr> |
<td>showHeader</td> |
<td>data-show-header</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False to hide the table header.</td> |
</tr> |
<tr> |
<td>showFooter</td> |
<td>data-show-footer</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to show the summary footer row.</td> |
</tr> |
<tr> |
<td>showColumns</td> |
<td>data-show-columns</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to show the columns drop down list.</td> |
</tr> |
<tr> |
<td>showRefresh</td> |
<td>data-show-refresh</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to show the refresh button.</td> |
</tr> |
<tr> |
<td>showToggle</td> |
<td>data-show-toggle</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to show the toggle button to toggle table / card view. |
</td> |
</tr> |
<tr> |
<td>showPaginationSwitch</td> |
<td>data-show-pagination-switch</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to show the pagination switch button.</td> |
</tr> |
<tr> |
<td>minimumCountColumns</td> |
<td>data-minimum-count-columns</td> |
<td>Number</td> |
<td>1</td> |
<td>The minimum number of columns to hide from the columns drop down list. |
</td> |
</tr> |
<tr> |
<td>idField</td> |
<td>data-id-field</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indicate which field is an identity field.</td> |
</tr> |
<tr> |
<td>uniqueId</td> |
<td>data-unique-id</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indicate an unique identifier for each row.</td> |
</tr> |
<tr> |
<td>cardView</td> |
<td>data-card-view</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to show card view table, for example mobile view.</td> |
</tr> |
<tr> |
<td>detailView</td> |
<td>data-detail-view</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to show detail view table.</td> |
</tr> |
<tr> |
<td>detailFormatter</td> |
<td>data-detail-formatter</td> |
<td>Function</td> |
<td>function(index, row, element) {<br>return '';<br>}</td> |
<td>Format your detail view when <code>detailView</code> is set to <code>true</code>. Return a String and it will be appended into the detail view cell, optionally render the element directly using the third parameter which is a jQuery element of the target cell.</td> |
</tr> |
<tr> |
<td>searchAlign</td> |
<td>data-search-align</td> |
<td>String</td> |
<td>'right'</td> |
<td>Indicate how to align the search input. 'left', 'right' can be used.</td> |
</tr> |
<tr> |
<td>buttonsAlign</td> |
<td>data-buttons-align</td> |
<td>String</td> |
<td>'right'</td> |
<td>Indicate how to align the toolbar buttons. 'left', 'right' can be used.</td> |
</tr> |
<tr> |
<td>toolbarAlign</td> |
<td>data-toolbar-align</td> |
<td>String</td> |
<td>'left'</td> |
<td>Indicate how to align the custom toolbar. 'left', 'right' can be used.</td> |
</tr> |
<tr> |
<td>paginationVAlign</td> |
<td>data-pagination-v-align</td> |
<td>String</td> |
<td>'bottom'</td> |
<td>Indicate how to align the pagination. 'top', 'bottom', 'both' (put the pagination on top and bottom) can be used.</td> |
</tr> |
<tr> |
<td>paginationHAlign</td> |
<td>data-pagination-h-align</td> |
<td>String</td> |
<td>'right'</td> |
<td>Indicate how to align the pagination. 'left', 'right' can be used.</td> |
</tr> |
<tr> |
<td>paginationDetailHAlign</td> |
<td>data-pagination-detail-h-align</td> |
<td>String</td> |
<td>'left'</td> |
<td>Indicate how to align the pagination detail. 'left', 'right' can be used.</td> |
</tr> |
<tr> |
<td>paginationPreText</td> |
<td>data-pagination-pre-text</td> |
<td>String</td> |
<td>'‹'</td> |
<td>Indicate the icon or text to be shown in the pagination detail, the previous button.</td> |
</tr> |
<tr> |
<td>paginationNextText</td> |
<td>data-pagination-next-text</td> |
<td>String</td> |
<td>'›'</td> |
<td>Indicate the icon or text to be shown in the pagination detail, the next button.</td> |
</tr> |
<tr> |
<td>clickToSelect</td> |
<td>data-click-to-select</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to select checkbox or radiobox when clicking rows.</td> |
</tr> |
<tr> |
<td>singleSelect</td> |
<td>data-single-select</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to allow checkbox selecting only one row.</td> |
</tr> |
<tr> |
<td>toolbar</td> |
<td>data-toolbar</td> |
<td>String | Node</td> |
<td>undefined</td> |
<td> |
A jQuery selector that indicates the toolbar, for example:<br> |
#toolbar, .toolbar, or a DOM node. |
</td> |
</tr> |
<tr> |
<td>checkboxHeader</td> |
<td>data-checkbox-header</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False to hide check-all checkbox in header row.</td> |
</tr> |
<tr> |
<td>maintainSelected</td> |
<td>data-maintain-selected</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to maintain selected rows on change page and search.</td> |
</tr> |
<tr> |
<td>sortable</td> |
<td>data-sortable</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False to disable sortable of all columns.</td> |
</tr> |
<tr> |
<td>silentSort</td> |
<td>data-silent-sort</td> |
<td>Boolean</td> |
<td>true</td> |
<td>Set <code>false</code> to sort the data silently. This options works when the sidePagination option is set to <code>server</code>.</td> |
</tr> |
<tr> |
<td>rowStyle</td> |
<td>data-row-style</td> |
<td>Function</td> |
<td>{}</td> |
<td> |
The row style formatter function, takes two parameters: <br> |
row: the row record data.<br> |
index: the row index.<br> |
Support classes or css. Example usage:<br> |
<pre> |
function rowStyle(row, index) { |
return { |
classes: 'text-nowrap another-class', |
css: {"color": "blue", "font-size": "50px"} |
}; |
} |
</pre> |
</td> |
</tr> |
<tr> |
<td>rowAttributes</td> |
<td>data-row-attributes</td> |
<td>Function</td> |
<td>{}</td> |
<td> |
The row attribute formatter function, takes two parameters: <br> |
row: the row record data.<br> |
index: the row index.<br> |
Support all custom attributes. |
</td> |
</tr> |
<tr> |
<td>customSearch</td> |
<td>data-custom-search</td> |
<td>Function</td> |
<td>$.noop</td> |
<td> |
The custom search function is executed instead of built-in search function, takes one parameters: <br> |
text: the search text.<br> |
Example usage:<br> |
<pre> |
function customSearch(text) { |
//Search logic here. |
//You must use `this.data` array in order to filter the data. NO use `this.options.data`. |
} |
</pre> |
</td> |
</tr> |
<tr> |
<td>customSort</td> |
<td>data-custom-sort</td> |
<td>Function</td> |
<td>$.noop</td> |
<td> |
The custom sort function is executed instead of built-in sort function, takes two parameters: <br> |
sortName: the sort name.<br> |
sortOrder: the sort order.<br> |
Example usage:<br> |
<pre> |
function customSort(sortName, sortOrder) { |
//Sort logic here. |
//You must use `this.data` array in order to sort the data. NO use `this.options.data`. |
} |
</pre> |
</td> |
</tr> |
<tr> |
<td>locale</td> |
<td>data-locale</td> |
<td>String</td> |
<td>undefined</td> |
<td> |
Sets the locale to use (i.e. <code>'fr-CA'</code>). Locale files must be pre-loaded. |
Allows for fallback locales, if loaded, in the following order:<br> |
<ol> |
<li>First tries for the locale as specified,</li> |
<li>Then tries the locale with <code>'_'</code> translated to |
<code>'-'</code> and the region code upper cased,</li> |
<li>Then tries the the short locale code (i.e. <code>'fr'</code> instead of <code>'fr-CA'</code>),</li> |
<li>And finally will use the last locale file loaded (or the default locale if no locales loaded).</li> |
</ol> |
If left undfined or an empty string, uses the last locale loaded (or <code>'en-US'</code> |
if no locale files loaded). |
</td> |
</tr> |
<tr> |
<td>footerStyle</td> |
<td>data-footer-style</td> |
<td>Function</td> |
<td>{}</td> |
<td> |
The footer style formatter function, takes two parameters: <br> |
row: the row record data.<br> |
index: the row index.<br> |
Support classes or css. Example usage:<br> |
<pre> |
function footerStyle(value, row, index) { |
return { |
css: { "font-weight": "bold" } |
}; |
} |
</pre> |
</td> |
</tr> |
</tbody> |
</table> |
/pack-rat/003_pack_rat/pack-rat/node_modules/bootstrap-table/docs/_i18n/es/documentation/column-options.md |
@@ -0,0 +1,243 @@ |
# Column options []({{ site.repo }}/blob/develop/docs/_i18n/{{ site.lang }}/documentation/column-options.md) |
|
--- |
|
Las propiedades de la columna están definidas en `jQuery.fn.bootstrapTable.columnDefaults`. |
|
<table class="table" |
id="c" |
data-search="true" |
data-show-toggle="true" |
data-show-columns="true" |
data-mobile-responsive="true"> |
<thead> |
<tr> |
<th>Nombre</th> |
<th>Atributo</th> |
<th>Tipo</th> |
<th>Valor por defecto</th> |
<th>Descripción</th> |
</tr> |
</thead> |
<tbody> |
<tr> |
<td>radio</td> |
<td>data-radio</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True para mostrar un radio. La columna con el radio tiene fijado el ancho.</td> |
</tr> |
<tr> |
<td>checkbox</td> |
<td>data-checkbox</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True para mostrar un checkbox. La columna con el checkbox tiene fijado el ancho.</td> |
</tr> |
<tr> |
<td>field</td> |
<td>data-field</td> |
<td>String</td> |
<td>undefined</td> |
<td>El nombre del campo.</td> |
</tr> |
<tr> |
<td>title</td> |
<td>data-title</td> |
<td>String</td> |
<td>undefined</td> |
<td>El título de la columna.</td> |
</tr> |
<tr> |
<td>titleTooltip</td> |
<td>data-title-tooltip</td> |
<td>String</td> |
<td>undefined</td> |
<td>Texto del title tooltip de la columna. Esta opción soporta el tag title de HTML.</td> |
</tr> |
<tr> |
<td>class</td> |
<td>class / data-class</td> |
<td>String</td> |
<td>undefined</td> |
<td>La clase CSS de la columna.</td> |
</tr> |
<tr> |
<td>rowspan</td> |
<td>rowspan / data-rowspan</td> |
<td>Number</td> |
<td>undefined</td> |
<td>Indica cuantas filas debe tomar una celda.</td> |
</tr> |
<tr> |
<td>colspan</td> |
<td>colspan / data-colspan</td> |
<td>Number</td> |
<td>undefined</td> |
<td>indica cuantas columnas debe tomar una celda.</td> |
</tr> |
<tr> |
<td>align</td> |
<td>data-align</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indica cómo se alinea la columna. Se puede usar 'left', 'right', 'center'.</td> |
</tr> |
<tr> |
<td>halign</td> |
<td>data-halign</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indica cómo se alinea el encabezado de la tabla. Se puede usar 'left', 'right', 'center'.</td> |
</tr> |
<tr> |
<td>falign</td> |
<td>data-falign</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indica cómo se alinea el footer. Se puede usar 'left', 'right', 'center'.</td> |
</tr> |
<tr> |
<td>valign</td> |
<td>data-valign</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indica cómo se alinea el contenido de la celda. Se puede usar 'top', 'middle', 'bottom'.</td> |
</tr> |
<tr> |
<td>width</td> |
<td>data-width</td> |
<td>Number {Pixeles o Porcentaje}</td> |
<td>undefined</td> |
<td>Indica el ancho de la columna. Si no es definido, el ancho será auto. Tmabién puede agregar '%' a su número y la bootstrapTable |
usará la unidad de porcentaje, sino, puede agregar o no 'px' a su número para que bootstrapTable use pixeles.</td> |
</tr> |
<tr> |
<td>sortable</td> |
<td>data-sortable</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True para permitir que la coluna sea ordenable.</td> |
</tr> |
<tr> |
<td>order</td> |
<td>data-order</td> |
<td>String</td> |
<td>'asc'</td> |
<td>El valor por defecto para ordenar los datos, solo puede ser 'asc' o 'desc'.</td> |
</tr> |
<tr> |
<td>visible</td> |
<td>data-visible</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False para ocultar el item de la columna.</td> |
</tr> |
<tr> |
<td>cardVisible</td> |
<td>data-card-visible</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False para ocultar columnas en el modo card.</td> |
</tr> |
<tr> |
<td>switchable</td> |
<td>data-switchable</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False para deshabilitar el switchable en el item de la columna.</td> |
</tr> |
<tr> |
<td>clickToSelect</td> |
<td>data-click-to-select</td> |
<td>Boolean</td> |
<td>true</td> |
<td>True para seleccionar un checkbox o radiobox cuando se le da click a la columna.</td> |
</tr> |
<tr> |
<td>formatter</td> |
<td>data-formatter</td> |
<td>Function</td> |
<td>undefined</td> |
<td> |
El contexto (this) es el objecto columna. <br> |
La función de formateo de la celda, toma tres parámetros: <br> |
value: el valor del campo. <br> |
row: los datos de la fila.<br> |
index: el indice de la fila.</td> |
</tr> |
<tr> |
<td>footerFormatter</td> |
<td>data-footer-formatter</td> |
<td>Function</td> |
<td>undefined</td> |
<td> |
El contexto (this) es el objecto columna. <br> |
La función toma un parámetro: <br> |
data: Array de todas las filas. <br> |
La función debe retornar un string con el texto a mostrar en el footer. |
</tr> |
<tr> |
<td>events</td> |
<td>data-events</td> |
<td>Object</td> |
<td>undefined</td> |
<td> |
Los eventos de la celda son escuchados cuando se usa la función formatter, toma tres parámetros: <br> |
event: el evento de jQuery. <br> |
value: el valor del campo. <br> |
row: los datos de la fila.<br> |
index: el indice de la fila.</td> |
</tr> |
<tr> |
<td>sorter</td> |
<td>data-sorter</td> |
<td>Function</td> |
<td>undefined</td> |
<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> |
</tr> |
<tr> |
<td>sortName</td> |
<td>data-sort-name</td> |
<td>String</td> |
<td>undefined</td> |
<td>Proporcionar una especie-nombre adaptable, no la clase-nombre por defecto en la cabecera, o el nombre del campo |
de la columna. Por ejemplo, una columna puede mostrar el valor de nombreCampo de "HTML" como |
"<b><span style="color:red">abc</span></b>", pero una nombreCampo para ordenar es el "contenido" con el valor de "abc". |
</td> |
</tr> |
<tr> |
<td>cellStyle</td> |
<td>data-cell-style</td> |
<td>Function</td> |
<td>undefined</td> |
<td> |
La función formatter para el estilo de la celda, toma tres parámetros: <br> |
value: el valor del campo.<br> |
row: los datos de la fila.<br> |
index: el indice de la fila.<br> |
field: la vico kampo.<br> |
Soporta clases o CSS. |
</td> |
</tr> |
<tr> |
<td>searchable</td> |
<td>data-searchable</td> |
<td>Boolean</td> |
<td>true</td> |
<td>True para incluir la columna en la búsqueda.</td> |
</tr> |
<tr> |
<td>searchFormatter</td> |
<td>data-search-formatter</td> |
<td>Boolean</td> |
<td>true</td> |
<td> |
True to search use formated data. |
</td> |
</tr> |
</tbody> |
</table> |
/pack-rat/003_pack_rat/pack-rat/node_modules/bootstrap-table/docs/_i18n/es/documentation/events.md |
@@ -0,0 +1,216 @@ |
# Events []({{ site.repo }}/blob/develop/docs/_i18n/{{ site.lang }}/documentation/events.md) |
|
--- |
|
<table class="table" |
id="e" |
data-search="true" |
data-show-toggle="true" |
data-show-columns="true" |
data-mobile-responsive="true"> |
<thead> |
<tr> |
<th>Evento</th> |
<th>Evento de jQuery</th> |
<th>Parámetros</th> |
<th>Descripción</th> |
</tr> |
</thead> |
<tbody> |
<tr> |
<td>onAll</td> |
<td>all.bs.table</td> |
<td>name, args</td> |
<td> |
Se ejecuta cuando todos los eventos son llamados, los parámetros contienen: <br> |
name: nombre del evento, <br> |
args: datos del evento.</td> |
</tr> |
<tr> |
<td>onClickRow</td> |
<td>click-row.bs.table</td> |
<td>row, $element</td> |
<td> |
Se ejecuta cuando el usuario le da click a una fila, los parámetros contienen: <br> |
row: el registro que corresponde con la fila a la que se le dio click, <br> |
$element: el elemento tr, <br> |
field: el nombre del campo correspondiente a la celda hecho clic. |
</td> |
</tr> |
<tr> |
<td>onDblClickRow</td> |
<td>dbl-click-row.bs.table</td> |
<td>row, $element</td> |
<td> |
Se ejecuta cuando el usuario le da click a una fila, los parámetros contienen: <br> |
row: el registro que corresponde con la fila a la que se le dio click, <br> |
$element: el elemento tr, <br> |
field: el nombre del campo correspondiente a la celda hecho clic. |
</td> |
</tr> |
<tr> |
<td>onClickCell</td> |
<td>click-cell.bs.table</td> |
<td>field, value, row, $element</td> |
<td> |
Se ejecuta cuando el usuario le da click a una celda de la tabla, los parámetros contienen: <br> |
field: el nombre del campo correspondiente a la celda hecho clic, <br> |
value: el valor de datos correspondiente a la celda hecho clic, <br> |
row: el registro que corresponde con la fila a la que se le dio click, <br> |
$element: el elemento td. |
</td> |
</tr> |
<tr> |
<td>onDblClickCell</td> |
<td>dbl-click-cell.bs.table</td> |
<td>field, value, row, $element</td> |
<td> |
Se ejecuta cuando el usuario le da click a una celda de la tabla, los parámetros contienen: <br> |
field: el nombre del campo correspondiente a la celda hecho clic, <br> |
value: el valor de datos correspondiente a la celda hecho clic, <br> |
row: el registro que corresponde con la fila a la que se le dio click, <br> |
$element: el elemento td. |
</td> |
</tr> |
<tr> |
<td>onSort</td> |
<td>sort.bs.table</td> |
<td>name, order</td> |
<td> |
Se ejecuta cuando el usuario orderna una columna, los parámetros contienen: <br> |
name: el nombre de la columna del campo ordenado<br> |
order: el orden utilizado. |
</td> |
</tr> |
<tr> |
<td>onCheck</td> |
<td>check.bs.table</td> |
<td>row</td> |
<td> |
Se ejecuta cuando el usuario chequea una fila, los parámetros contienen: <br> |
row: el registro que corresponde a la fila chequeada. |
$element: el elemento DOM chequeado. |
</td> |
</tr> |
<tr> |
<td>onUncheck</td> |
<td>uncheck.bs.table</td> |
<td>row</td> |
<td> |
Se ejecuta cuando el usuario des-chequea una fila, los parámetros contienen: <br> |
row: el registro que corresponde a la fila deschequeada. |
$element: el elemento DOM deschequeado. |
</td> |
</tr> |
<tr> |
<td>onCheckAll</td> |
<td>check-all.bs.table</td> |
<td>rows</td> |
<td>Se ejecuta cuando el usuario chequea todas las filas, los parámetros contienen: <br> |
rows: arreglo de las filas chequeadas.</td> |
</tr> |
<tr> |
<td>onUncheckAll</td> |
<td>uncheck-all.bs.table</td> |
<td>rows</td> |
<td>Se ejecuta cuando el usuario des-chequea todas las filas, los parámetros contienen: <br> |
rows: arreglo de las filas deschequeadas.</td> |
</tr> |
<tr> |
<td>onCheckSome</td> |
<td>check-some.bs.table</td> |
<td>rows</td> |
<td> |
Se ejecuta cuando el usuario chequea algunas filas, los parámetros contienen: <br> |
rows: arreglo de las filas chequeadas. |
</td> |
</tr> |
<tr> |
<td>onUncheckSome</td> |
<td>uncheck-some.bs.table</td> |
<td>rows</td> |
<td> |
Se ejecuta cuando el usuario deschequea algunas filas, los parámetros contienen: <br> |
rows: arreglo de las filas deschequeadas. |
</td> |
</tr> |
<tr> |
<td>onLoadSuccess</td> |
<td>load-success.bs.table</td> |
<td>data</td> |
<td>Se ejecuta cuando los datos remotos se cargan correctamente.</td> |
</tr> |
<tr> |
<td>onLoadError</td> |
<td>load-error.bs.table</td> |
<td>status</td> |
<td>Se ejecuta cuando ocurre algún error cargando los datos remotos.</td> |
</tr> |
<tr> |
<td>onColumnSwitch</td> |
<td>column-switch.bs.table</td> |
<td>field, checked</td> |
<td>Se ejecuta cuando se cambia la visibilidad de una columna.</td> |
</tr> |
<tr> |
<td>onColumnSearch</td> |
<td>column-search.bs.table</td> |
<td>field, text</td> |
<td>Se ejecuta cuando se busca por columna.</td> |
</tr> |
<tr> |
<td>onPageChange</td> |
<td>page-change.bs.table</td> |
<td>number, size</td> |
<td>Se ejecuta cuando se cambia el número de página o el tamaño de la página.</td> |
</tr> |
<tr> |
<td>onSearch</td> |
<td>search.bs.table</td> |
<td>text</td> |
<td>Se ejecuta cuando se busca en la tabla.</td> |
</tr> |
<tr> |
<td>onPreBody</td> |
<td>pre-body.bs.table</td> |
<td>data</td> |
<td>Se ejecuta antes de que el cuerpo/contenido de la tabla se construya.</td> |
</tr> |
<tr> |
<td>onPostBody</td> |
<td>post-body.bs.table</td> |
<td>none</td> |
<td>Se ejecuta después de que el cuerpo/contenido de la tabla es renderizado y es disponible en el DOM</td> |
</tr> |
<tr> |
<td>onPostHeader</td> |
<td>post-header.bs.table</td> |
<td>none</td> |
<td>Se ejecuta después de que el encabezado es renderizado y disponible en el DOM.</td> |
</tr> |
<tr> |
<td>onExpandRow</td> |
<td>expand-row.bs.table</td> |
<td>index, row, $detail</td> |
<td>Se ejecuta cuando se da click al icono de detalle para expandir la vista detalle.</td> |
</tr> |
<tr> |
<td>onCollapseRow</td> |
<td>collapse-row.bs.table</td> |
<td>index, row</td> |
<td>Se ejecuta cuando se da click al icono de detalle para colapsar la vista detalle.</td> |
</tr> |
<tr> |
<td>onRefreshOptions</td> |
<td>refresh-options.bs.table</td> |
<td>options</td> |
<td>Se ejecuta cuando se actualiza el objeto options, este método se ejecuta antes de los eventos destroy e init.</td> |
</tr> |
<tr> |
<td>onRefresh</td> |
<td>refresh.bs.table</td> |
<td>params</td> |
<td>Se ejecuta cuando se cliquea el botón de refresh.</td> |
</tr> |
</tbody> |
</table> |
/pack-rat/003_pack_rat/pack-rat/node_modules/bootstrap-table/docs/_i18n/es/documentation/methods.md |
@@ -0,0 +1,314 @@ |
# Methods []({{ site.repo }}/blob/develop/docs/_i18n/{{ site.lang }}/documentation/methods.md) |
|
--- |
|
Sintaxis para llamar a un método: `$('#table').bootstrapTable('method', parameter);`. |
|
<table class="table" |
id="m" |
data-search="true" |
data-show-toggle="true" |
data-show-columns="true" |
data-mobile-responsive="true"> |
<thead> |
<tr> |
<th>Nombre</th> |
<th>Parámetro</th> |
<th>Descripción</th> |
</tr> |
</thead> |
<tbody> |
<tr> |
<td>getOptions</td> |
<td>none</td> |
<td>Retorna el objeto options.</td> |
</tr> |
<tr> |
<td>getSelections</td> |
<td>none</td> |
<td>Retorna todas las filas seleccionadas, cuando no hay seleccionadas, se retorna un array vacío .</td> |
</tr> |
<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> |
</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>showAllColumns</td> |
<td>none</td> |
<td>Muestra todas las columnas.</td> |
<td>showAllColumns</td> |
</tr> |
<tr> |
<td>hideAllColumns</td> |
<td>none</td> |
<td>Oculta todas las columnas.</td> |
<td>hideAllColumns</td> |
</tr> |
<tr> |
<td>load</td> |
<td>data</td> |
<td>Se cargan los datos en la tabla, las filas antiguas se removeran.</td> |
</tr> |
<tr> |
<td>append</td> |
<td>data</td> |
<td>Se anexan los datos a la tabla.</td> |
</tr> |
<tr> |
<td>prepend</td> |
<td>data</td> |
<td>Se antepone los datos a la tabla.</td> |
</tr> |
<tr> |
<td>remove</td> |
<td>params</td> |
<td> |
Se remueven los datos de la tabla, los parámetros contienen dos propiedades: <br> |
field: el nombre del campo de las filas removidas. <br> |
values: el array de valores de las filas que deberían ser removidas. <br> |
Ejemplo: $('#myTable').bootstrapTable('remove', {field: 'id', values: ["73", "74"]}) |
</td> |
</tr> |
<tr> |
<td>removeAll</td> |
<td>-</td> |
<td> |
Se remueven todos los datos de la tabla <br> |
Ejemplo: $('#myTable').bootstrapTable('removeAll') |
</td> |
</tr> |
<tr> |
<td>removeByUniqueId</td> |
<td>id</td> |
<td> |
Se remueve el dato de la tabla que contiene el id pasado por parámetro<br> |
Ejemplo: $('#myTable').bootstrapTable('removeByUniqueId', "122") |
</td> |
</tr> |
<tr> |
<td>insertRow</td> |
<td>params</td> |
<td> |
Inserta una nueva fila, los paeámetros contienen las siguientes propiedades:<br> |
index: el índice donde se insertara la nueva fila.<br> |
row: los datos de la fila. |
</td> |
</tr> |
<tr> |
<td>updateRow</td> |
<td>params</td> |
<td> |
Actualiza la fila especificada, el parámetro contiene las siguientes propiedades: <br> |
index: el índice de la fila para ser actualizada. <br> |
row: los nuevos data de la fila. |
</td> |
</tr> |
<tr> |
<td>showRow</td> |
<td>params</td> |
<td>Muesta la fila especificada. El parámetro contiene los siguiente propiedades: <br> |
index: el indice o idField de la fila. |
isIdField: Boolean que indica si el index es idField o la posición de la fila.</td> |
</tr> |
<tr> |
<td>hideRow</td> |
<td>params</td> |
<td>Oculta la fila especificada. El parámetro contiene los siguiente propiedades: <br> |
index: el indice o idField de la fila. |
isIdField: Boolean que indica si el index es idField o la posición de la fila.</td> |
</tr> |
<tr> |
<td>getRowsHidden</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> |
</tr> |
<tr> |
<td>mergeCells</td> |
<td>options</td> |
<td> |
Se unen algunas celdas en una, las opciones contienen las siguientes propiedades: <br> |
index: el índice de la fila. <br> |
field: el nombre del campo.<br> |
rowspan: el rowspan para ser unidas. <br> |
colspan: el colspan para ser unidas. |
</td> |
</tr> |
<tr> |
<td>updateCell</td> |
<td>params</td> |
<td> |
Actualiza una celda, los parámetros contienen: <br> |
rowIndex: índice de la fila. <br> |
fieldName: el nombre del campo.<br> |
fieldValue: el nuevo valor de la celda. <br> |
</td> |
</tr> |
<tr> |
<td>refresh</td> |
<td>params</td> |
<td>Refresca los datos remotos del servidor, se puede setear <code>{silent: true}</code> para refrescar los datos silenciosamente, y setear <code>{url: newUrl}</code> para cambiar el URL. Para suministrar query params especificos para este request, setear <code>{query: {foo: 'bar'}}</code></td> |
</tr> |
<tr> |
<td>refreshOptions</td> |
<td>options</td> |
<td>Actualiza el objecto options</td> |
</tr> |
<tr> |
<td>resetSearch</td> |
<td>text</td> |
<td>Setea el texto de búsqueda</td> |
</tr> |
<tr> |
<td>showLoading</td> |
<td>none</td> |
<td>Mostrar el estado de la carga.</td> |
</tr> |
<tr> |
<td>hideLoading</td> |
<td>none</td> |
<td>Ocultar el estado de la carga.</td> |
</tr> |
<tr> |
<td>checkAll</td> |
<td>none</td> |
<td>Chequear todas las filas de la página actual de la tabla.</td> |
</tr> |
<tr> |
<td>uncheckAll</td> |
<td>none</td> |
<td>Des-chequear todas las filas de la página actual de la tabla.</td> |
</tr> |
<tr> |
<td>check</td> |
<td>index</td> |
<td>Chequea una fila, el índice de la fila inicia en 0.</td> |
</tr> |
<tr> |
<td>uncheck</td> |
<td>index</td> |
<td>Des-chequea una fila, el índice de la fila inicia en 0.</td> |
</tr> |
<tr> |
<td>checkBy</td> |
<td>params</td> |
<td> |
Chequea una fila por un array de valores los parámetros continen:<br> |
field: nombre del campo a usar para encontrar los registros<br> |
values: array de valores de las filas por chequear<br> |
Ejemplo: <br> |
$("#table").bootstrapTable("checkBy", {field:"field_name", values:["value1","value2","value3"]}) |
</td> |
</tr> |
<tr> |
<td>uncheckBy</td> |
<td>params</td> |
<td> |
Deschequea una fila por un array de valores los parámetros continen:<br> |
field: nombre del campo a usar para encontrar los registros<br> |
values: array de valores de las filas por deschequear<br> |
Ejemplo: <br> |
$("#table").bootstrapTable("uncheckBy", {field:"field_name", values:["value1","value2","value3"]}) |
</td> |
</tr> |
<tr> |
<td>resetView</td> |
<td>params</td> |
<td>Reinicia la vista de bootstrap table, por ejemplo reinicia el alto de la tabla.</td> |
</tr> |
<tr> |
<td>destroy</td> |
<td>none</td> |
<td>Destruye la bootstrap table.</td> |
</tr> |
<tr> |
<td>showColumn</td> |
<td>field</td> |
<td>Muestra la columna especificada.</td> |
</tr> |
<tr> |
<td>hideColumn</td> |
<td>field</td> |
<td>Oculta la columna especificada.</td> |
</tr> |
<tr> |
<td>getHiddenColumns</td> |
<td>-</td> |
<td>Obtiene las columnas ocultas.</td> |
</tr> |
<tr> |
<td>getVisibleColumns</td> |
<td>-</td> |
<td>Retorna las columnas visibles.</td> |
</tr> |
<tr> |
<td>scrollTo</td> |
<td>value</td> |
<td>Setea la posición del scroll, setear 'bottom' significa setear la posición del scroll al final de la tabla.</td> |
</tr> |
<tr> |
<td>getScrollPosition</td> |
<td>none</td> |
<td>Obtiene la posición actual del scroll.</td> |
</tr> |
<tr> |
<td>filterBy</td> |
<td>params</td> |
<td>(Solo se puede usar en client-side)Filtra los datos en la tabla, ejm. se puede filtrar <code>{age: 10}</code> para mostrar los daros solo con la edad igual a 10.</td> |
</tr> |
<tr> |
<td>selectPage</td> |
<td>page</td> |
<td>Ir a una página en especifico.</td> |
</tr> |
<tr> |
<td>prevPage</td> |
<td>none</td> |
<td>Ir a la página anterior.</td> |
</tr> |
<tr> |
<td>nextPage</td> |
<td>none</td> |
<td>Ir a la siguiente página.</td> |
</tr> |
<tr> |
<td>togglePagination</td> |
<td>none</td> |
<td>Habilita y deshabilita la paginación.</td> |
</tr> |
<tr> |
<td>toggleView</td> |
<td>none</td> |
<td>Alterna la vista entre tabla y tarjeta.</td> |
</tr> |
<tr> |
<td>expandRow</td> |
<td>index</td> |
<td>Expande la fila que tiene el index pasado por parámetro si la opción detail view está en True.</td> |
</tr> |
<tr> |
<td>collapseRow</td> |
<td>index</td> |
<td>Colapsa la fila que tiene el index pasado por parámetro si la opción detail view está en True.</td> |
</tr> |
<tr> |
<td>expandAllRows</td> |
<td>is subtable</td> |
<td>Expande todas las filas si la opción detail view está en True..</td> |
</tr> |
<tr> |
<td>collapseAllRows</td> |
<td>is subtable</td> |
<td>Colapsa todas las filas si la opción detail view está en True.</td> |
</tr> |
</tbody> |
</table> |
/pack-rat/003_pack_rat/pack-rat/node_modules/bootstrap-table/docs/_i18n/es/documentation/table-options.md |
@@ -0,0 +1,547 @@ |
# Table options []({{ site.repo }}/blob/develop/docs/_i18n/{{ site.lang }}/documentation/table-options.md) |
|
--- |
|
Las opciones de la tabla están definidas en `jQuery.fn.bootstrapTable.defaults`. |
|
<table class="table" |
id="t" |
data-search="true" |
data-show-toggle="true" |
data-show-columns="true" |
data-mobile-responsive="true"> |
<thead> |
<tr> |
<th>Nombre</th> |
<th>Atributo</th> |
<th>Tipo</th> |
<th>Valor por defecto</th> |
<th>Descripción</th> |
</tr> |
</thead> |
<tbody> |
<tr> |
<td>-</td> |
<td>data-toggle</td> |
<td>String</td> |
<td>'table'</td> |
<td>Activa bootstrap table sin escribir código JavaScript.</td> |
</tr> |
<tr> |
<td>classes</td> |
<td>data-classes</td> |
<td>String</td> |
<td>'table table-hover'</td> |
<td>El nombre de la clase de la tabla.</td> |
</tr> |
<tr> |
<td>sortClass</td> |
<td>data-sort-class</td> |
<td>String</td> |
<td>undefined</td> |
<td>El nombre de la clase de los elementos td que están ordenados.</td> |
</tr> |
<tr> |
<td>height</td> |
<td>data-height</td> |
<td>Number</td> |
<td>undefined</td> |
<td>El alto de la tabla.</td> |
</tr> |
<tr> |
<td>undefinedText</td> |
<td>data-undefined-text</td> |
<td>String</td> |
<td>'-'</td> |
<td>Define el texto por defecto.</td> |
</tr> |
<tr> |
<td>striped</td> |
<td>data-striped</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True para stripe las filas.</td> |
</tr> |
<tr> |
<td>sortName</td> |
<td>data-sort-name</td> |
<td>String</td> |
<td>undefined</td> |
<td>Define cuales columnas pueden ser ordenadas.</td> |
</tr> |
<tr> |
<td>sortOrder</td> |
<td>data-sort-order</td> |
<td>String</td> |
<td>'asc'</td> |
<td>Define el método de ordenamiento, solo puede ser 'asc' o 'desc'.</td> |
</tr> |
<tr> |
<td>sortStable</td> |
<td>data-sort-stable</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to get a stable sorting. We will add <code>_position</code> property to the row.</td> |
</tr> |
<tr> |
<td>iconsPrefix</td> |
<td>data-icons-prefix</td> |
<td>String</td> |
<td>'glyphicon'</td> |
<td>Define el nombre del icono ('glyphicon' o 'fa' para FontAwesome). Por defecto se usa 'glyphicon'. </td> |
</tr> |
<tr> |
<td>icons</td> |
<td>data-icons</td> |
<td>Object</td> |
<td>{<br/> |
refresh: 'glyphicon-refresh icon-refresh',<br/> |
toggle: 'glyphicon-list-alt icon-list-alt',<br/> |
columns: 'glyphicon-th icon-th'<br/> |
}</td> |
<td>Define los iconos que son usados para los botones de refresh, toggle y columnas.</td> |
</tr> |
<tr> |
<td>columns</td> |
<td>-</td> |
<td>Array</td> |
<td>[]</td> |
<td>El array de columnas de la tabla, vea las propiedades de las columnas para más información.</td> |
</tr> |
<tr> |
<td>data</td> |
<td>-</td> |
<td>Array</td> |
<td>[]</td> |
<td>Los datos que serán cargados.</td> |
</tr> |
<tr> |
<td>method</td> |
<td>data-method</td> |
<td>String</td> |
<td>'get'</td> |
<td>El tipo de método para hacer request de los datos remotos.</td> |
</tr> |
<tr> |
<td>url</td> |
<td>data-url</td> |
<td>String</td> |
<td>undefined</td> |
<td>Una URL para hacer request de datos en un sitio remoto.</td> |
</tr> |
<tr> |
<td>cache</td> |
<td>data-cache</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False para deshabilitar los AJAX requests.</td> |
</tr> |
<tr> |
<td>contentType</td> |
<td>data-content-type</td> |
<td>String</td> |
<td>'application/json'</td> |
<td>EL contentType para hacer request de los datos.</td> |
</tr> |
<tr> |
<td>dataType</td> |
<td>data-data-type</td> |
<td>String</td> |
<td>'json'</td> |
<td>El tipo de datos que se esperan del servidor.</td> |
</tr> |
<tr> |
<td>ajaxOptions</td> |
<td>data-ajax-options</td> |
<td>Object</td> |
<td>{}</td> |
<td>Opciones adicionales para enviar ajax request. Lista de valores: <a href="http://api.jquery.com/jQuery.ajax">http://api.jquery.com/jQuery.ajax</a>.</td> |
</tr> |
<tr> |
<td>queryParams</td> |
<td>data-query-params</td> |
<td>Function</td> |
<td>function(params) {<br>return params;<br>}</td> |
<td> |
Cuando se solicita datos remotos, se debe enviar parámetros adicionales para modificar los queryParams. |
Si queryParamsType = 'limit', el objecto params contiene: <br> |
limit, offset, search, sort, order |
Sino, el objeoto contiene: <br> |
pageSize, pageNumber, searchText, sortName, sortOrder. <br> |
Retorna false para parar el request. |
</td> |
</tr> |
<tr> |
<td>queryParamsType</td> |
<td>data-query-params-type</td> |
<td>String</td> |
<td>'limit'</td> |
<td>Set 'limit' to send query params width RESTFul type.</td> |
</tr> |
<tr> |
<td>responseHandler</td> |
<td>data-response-handler</td> |
<td>Function</td> |
<td>function(res) {<br>return res;<br>}</td> |
<td> |
Antes de cargar los datos remotos, manejar el formato de respuesta de los datos, el objecto parameters contiene: <br> |
res: los datos devueltos. |
</td> |
</tr> |
<tr> |
<td>pagination</td> |
<td>data-pagination</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True para mostrar la paginación al final de la tabla.</td> |
</tr> |
<tr> |
<td>paginationLoop</td> |
<td>data-pagination-loop</td> |
<td>Boolean</td> |
<td>true</td> |
<td>True to enable pagination continuous loop mode.</td> |
</tr> |
<tr> |
<td>onlyInfoPagination</td> |
<td>data-only-info-pagination</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True para mostrar solo la cantidad de los registros que se están mostrando en la tabla. Esta opción necesita que la opción pagination este en true.</td> |
</tr> |
<tr> |
<td>sidePagination</td> |
<td>data-side-pagination</td> |
<td>String</td> |
<td>'client'</td> |
<td>Define el tipo de paginación de la tabla, puede ser solo 'client' o 'server'.</td> |
</tr> |
<tr> |
<td>pageNumber</td> |
<td>data-page-number</td> |
<td>Number</td> |
<td>1</td> |
<td>Cuando se habilita la paginación, inicializa el número de página.</td> |
</tr> |
<tr> |
<td>pageSize</td> |
<td>data-page-size</td> |
<td>Number</td> |
<td>10</td> |
<td>Cuando se habilita la paginación, inicializa el tamaño de la página.</td> |
</tr> |
<tr> |
<td>pageList</td> |
<td>data-page-list</td> |
<td>Array</td> |
<td>[10, 25, 50, 100, All]</td> |
<td>Cuando se habilita la paginación, inicializa la lista de cantidad de registros por página.</td> |
</tr> |
<tr> |
<td>selectItemName</td> |
<td>data-select-item-name</td> |
<td>String</td> |
<td>'btSelectItem'</td> |
<td>El nombre del radio o del checkbox.</td> |
</tr> |
<tr> |
<td>smartDisplay</td> |
<td>data-smart-display</td> |
<td>Boolean</td> |
<td>true</td> |
<td>True para mostrar la páginación o la vista de tarjeta inteligentemente.</td> |
</tr> |
<tr> |
<td>escape</td> |
<td>data-escape</td> |
<td>Boolean</td> |
<td>false</td> |
<td>Escapes a string for insertion into HTML, |
replacing <code>&</code>, <code><</code>, <code>></code>, |
<code>"</code>, <code>`</code>, and <code>'</code> characters.</td> |
</tr> |
<tr> |
<td>search</td> |
<td>data-search</td> |
<td>Boolean</td> |
<td>false</td> |
<td>Habilita el campo para búsqueda.</td> |
</tr> |
<tr> |
<td>searchOnEnterKey</td> |
<td>data-search-on-enter-key</td> |
<td>Boolean</td> |
<td>false</td> |
<td>El método será ejecutado hasta que la tecla Enter sea presionada.</td> |
</tr> |
<tr> |
<td>strictSearch</td> |
<td>data-strict-search</td> |
<td>Boolean</td> |
<td>false</td> |
<td>Habilita la busqueda exacta.</td> |
</tr> |
<tr> |
<td>searchText</td> |
<td>data-search-text</td> |
<td>String</td> |
<td>''</td> |
<td>Inicializa el campo de búsqueda con el texto especificado.</td> |
</tr> |
<tr> |
<td>searchTimeOut</td> |
<td>data-search-time-out</td> |
<td>Number</td> |
<td>500</td> |
<td>Setea el tiempo de espera para iniciar la búsqueda.</td> |
</tr> |
<tr> |
<td>showHeader</td> |
<td>data-show-header</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False para ocultar el encabezado de la tabla.</td> |
</tr> |
<tr> |
<td>showFooter</td> |
<td>data-show-footer</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True para mostrar el footer.</td> |
</tr> |
<tr> |
<td>showColumns</td> |
<td>data-show-columns</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True para mostrar las columnas en una lista.</td> |
</tr> |
<tr> |
<td>showRefresh</td> |
<td>data-show-refresh</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True para mostrar el botón de refresh.</td> |
</tr> |
<tr> |
<td>showToggle</td> |
<td>data-show-toggle</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True para mostrar el botón de vista cambiada entre vista de tabla y vista de tarjeta.</td> |
</tr> |
<tr> |
<td>showPaginationSwitch</td> |
<td>data-show-pagination-switch</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True para mostrar el botón de mostrar/ocultar la paginación.</td> |
</tr> |
<tr> |
<td>minimumCountColumns</td> |
<td>data-minimum-count-columns</td> |
<td>Number</td> |
<td>1</td> |
<td>la cantidad mínima de columnas que se deben mostrar.</td> |
</tr> |
<tr> |
<td>idField</td> |
<td>data-id-field</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indica cuál campo es el identificador.</td> |
</tr> |
<tr> |
<td>uniqueId</td> |
<td>data-unique-id</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indica un único id para cada fila.</td> |
</tr> |
<tr> |
<td>cardView</td> |
<td>data-card-view</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True para mostrar la vista de tarjeta, por ejemplo en móviles.</td> |
</tr> |
<tr> |
<td>detailView</td> |
<td>data-detail-view</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True para mostrar la vista detalle en la tabla.</td> |
</tr> |
<tr> |
<td>detailFormatter</td> |
<td>data-detail-formatter</td> |
<td>Function</td> |
<td>function(index, row) {<br>return '';<br>}</td> |
<td>Formatee su vista detalle cuando <code>detailView</code> está seteada en <code>true</code>.</td> |
</tr> |
<tr> |
<td>searchAlign</td> |
<td>data-search-align</td> |
<td>String</td> |
<td>'right'</td> |
<td>Indica cómo alinear el campo de búsqueda. Se puede usar 'left', 'right'.</td> |
</tr> |
<tr> |
<td>buttonsAlign</td> |
<td>data-buttons-align</td> |
<td>String</td> |
<td>'right'</td> |
<td>Indica cómo alinear los botones de la barra de herramientas. Se puede usar 'left', 'right'.</td> |
</tr> |
<tr> |
<td>toolbarAlign</td> |
<td>data-toolbar-align</td> |
<td>String</td> |
<td>'left'</td> |
<td>Indica cómo alinear la barra de herramientas customizable. Se puede usar 'left', 'right'.</td> |
</tr> |
<tr> |
<td>paginationVAlign</td> |
<td>data-pagination-v-align</td> |
<td>String</td> |
<td>'bottom'</td> |
<td>Indica cómo alinear la paginación. Se puede usar: 'top', 'bottom', 'both' (coloca la paginación arriba y abajo de la tabla.</td> |
</tr> |
<tr> |
<td>paginationHAlign</td> |
<td>data-pagination-h-align</td> |
<td>String</td> |
<td>'right'</td> |
<td>Indica cómo alinear la paginación. Se puede usar: 'left', 'right'.</td> |
</tr> |
<tr> |
<td>paginationDetailHAlign</td> |
<td>data-pagination-detail-h-align</td> |
<td>String</td> |
<td>'left'</td> |
<td>Indica cómo alinear el detalle de la paginación. Se puede usar: 'left', 'right'.</td> |
</tr> |
<tr> |
<td>paginationPreText</td> |
<td>data-pagination-pre-text</td> |
<td>String</td> |
<td>'<'</td> |
<td>Indica el icono o el texto a mostrar en la paginación, el botón previous del detalle de la paginación.</td> |
</tr> |
<tr> |
<td>paginationNextText</td> |
<td>data-pagination-next-text</td> |
<td>String</td> |
<td>'>'</td> |
<td>Indica el icono o el texto a mostrar en la paginación, el botón next del detalle de la paginación.</td> |
</tr> |
<tr> |
<td>clickToSelect</td> |
<td>data-click-to-select</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True para seleccionar el checkbox o el radiobox cuando se da click sobre las filas.</td> |
</tr> |
<tr> |
<td>singleSelect</td> |
<td>data-single-select</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True para permirir solo un checkbox seleccionado.</td> |
</tr> |
<tr> |
<td>toolbar</td> |
<td>data-toolbar</td> |
<td>String</td> |
<td>undefined</td> |
<td>Un selector jQuery que indica la barra de herramientas, por ejemplo:<br> #toolbar, .toolbar.</td> |
</tr> |
<tr> |
<td>checkboxHeader</td> |
<td>data-checkbox-header</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False para ocular el checkbox check-all en el encabezado de la fila.</td> |
</tr> |
<tr> |
<td>maintainSelected</td> |
<td>data-maintain-selected</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True para mantener las columnas después de seleccionar o cambiar entre páginas.</td> |
</tr> |
<tr> |
<td>sortable</td> |
<td>data-sortable</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False para deshabilitar el ordenamiento en todas las columnas.</td> |
</tr> |
<tr> |
<td>silentSort</td> |
<td>data-silent-sort</td> |
<td>Boolean</td> |
<td>true</td> |
<td>Setear a <code>false</code> para ordenar los datos silenciosamente. Esta opción funciona cuando la opción sidePagination es seteada a <code>server</code>.</td> |
</tr> |
<tr> |
<td>rowStyle</td> |
<td>data-row-style</td> |
<td>Function</td> |
<td>{}</td> |
<td> |
La función formatter para aplicar el estilo de la fila, toma dos parámetros: <br> |
row: los datos de la fila.<br> |
index: el índice de la fila.<br> |
Soporta clases y CSS. |
</td> |
</tr> |
<tr> |
<td>rowAttributes</td> |
<td>data-row-attributes</td> |
<td>Function</td> |
<td>{}</td> |
<td> |
La función formatter para los atributos de la fiila, toma dos parámetros: <br> |
row: los datos de la fila.<br> |
index: el índice de la fila.<br> |
Soporta cualquier atributo customizable. |
</td> |
</tr> |
<tr> |
<td>customSearch</td> |
<td>data-custom-search</td> |
<td>Function</td> |
<td>$.noop</td> |
<td> |
The custom search function is executed instead of built-in search function, takes one parameters: <br> |
text: the search text.<br> |
Example usage:<br> |
<pre> |
function customSearch(text) { |
//Search logic here. |
//You must use `this.data` array in order to filter the data. NO use `this.options.data`. |
} |
</pre> |
</td> |
</tr> |
<tr> |
<td>customSort</td> |
<td>data-custom-sort</td> |
<td>Function</td> |
<td>$.noop</td> |
<td> |
The custom sort function is executed instead of built-in sort function, takes two parameters: <br> |
sortName: the sort name.<br> |
sortOrder: the sort order.<br> |
Example usage:<br> |
<pre> |
function customSort(sortName, sortOrder) { |
//Sort logic here. |
//You must use `this.data` array in order to sort the data. NO use `this.options.data`. |
} |
</pre> |
</td> |
</tr> |
</tbody> |
</table> |
/pack-rat/003_pack_rat/pack-rat/node_modules/bootstrap-table/docs/_i18n/zh-cn/documentation/column-options.md |
@@ -0,0 +1,248 @@ |
# 列参数 []({{ site.repo }}/blob/develop/docs/_i18n/{{ site.lang }}/documentation/column-options.md) |
|
--- |
|
The column options is defined in `jQuery.fn.bootstrapTable.columnDefaults`. |
|
<table class="table" |
id="c" |
data-search="true" |
data-show-toggle="true" |
data-show-columns="true" |
data-mobile-responsive="true"> |
<thead> |
<tr> |
<th>Name</th> |
<th>Attribute</th> |
<th>Type</th> |
<th>Default</th> |
<th>Description</th> |
</tr> |
</thead> |
<tbody> |
<tr> |
<td>radio</td> |
<td>data-radio</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to show a radio. The radio column has fixed width.</td> |
</tr> |
<tr> |
<td>checkbox</td> |
<td>data-checkbox</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to show a checkbox. The checkbox column has fixed width.</td> |
</tr> |
<tr> |
<td>field</td> |
<td>data-field</td> |
<td>String</td> |
<td>undefined</td> |
<td>The column field name.</td> |
</tr> |
<tr> |
<td>title</td> |
<td>data-title</td> |
<td>String</td> |
<td>undefined</td> |
<td>The column title text.</td> |
</tr> |
<tr> |
<td>titleTooltip</td> |
<td>data-title-tooltip</td> |
<td>String</td> |
<td>undefined</td> |
<td>The column title tooltip text. This option also support the title HTML attribute</td> |
</tr> |
<tr> |
<td>class</td> |
<td>class / data-class</td> |
<td>String</td> |
<td>undefined</td> |
<td>The column class name.</td> |
</tr> |
<tr> |
<td>rowspan</td> |
<td>rowspan / data-rowspan</td> |
<td>Number</td> |
<td>undefined</td> |
<td>Indicate how many rows a cell should take up.</td> |
</tr> |
<tr> |
<td>colspan</td> |
<td>colspan / data-colspan</td> |
<td>Number</td> |
<td>undefined</td> |
<td>Indicate how many columns a cell should take up.</td> |
</tr> |
<tr> |
<td>align</td> |
<td>data-align</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indicate how to align the column data. 'left', 'right', 'center' can be used.</td> |
</tr> |
<tr> |
<td>halign</td> |
<td>data-halign</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indicate how to align the table header. 'left', 'right', 'center' can be used.</td> |
</tr> |
<tr> |
<td>falign</td> |
<td>data-falign</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indicate how to align the table footer. 'left', 'right', 'center' can be used.</td> |
</tr> |
<tr> |
<td>valign</td> |
<td>data-valign</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indicate how to align the cell data. 'top', 'middle', 'bottom' can be used.</td> |
</tr> |
<tr> |
<td>width</td> |
<td>data-width</td> |
<td>Number {Pixels or Percentage}</td> |
<td>undefined</td> |
<td>The width of column. If not defined, the width will auto expand to fit its contents. Also you can add '%' to your number and |
the bootstrapTable will use the percentage unit, otherwise, you can add or no the 'px' to your number and then the bootstrapTable will use the pixels</td> |
</tr> |
<tr> |
<td>sortable</td> |
<td>data-sortable</td> |
<td>Boolean</td> |
<td>false</td> |
<td>True to allow the column can be sorted. |
</td> |
</tr> |
<tr> |
<td>order</td> |
<td>data-order</td> |
<td>String</td> |
<td>'asc'</td> |
<td>The default sort order, can only be 'asc' or 'desc'.</td> |
</tr> |
<tr> |
<td>visible</td> |
<td>data-visible</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False to hide the columns item.</td> |
</tr> |
<tr> |
<td>cardVisible</td> |
<td>data-card-visible</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False to hide the columns item in card view state.</td> |
</tr> |
<tr> |
<td>switchable</td> |
<td>data-switchable</td> |
<td>Boolean</td> |
<td>true</td> |
<td>False to disable the switchable of columns item.</td> |
</tr> |
<tr> |
<td>clickToSelect</td> |
<td>data-click-to-select</td> |
<td>Boolean</td> |
<td>true</td> |
<td>True to select checkbox or radiobox when the column is clicked.</td> |
</tr> |
<tr> |
<td>formatter</td> |
<td>data-formatter</td> |
<td>Function</td> |
<td>undefined</td> |
<td> |
The context (this) is the column Object. <br> |
The cell formatter function, take three parameters: <br> |
value: the field value. <br> |
row: the row record data.<br> |
index: the row index.</td> |
</tr> |
<tr> |
<td>footerFormatter</td> |
<td>data-footer-formatter</td> |
<td>Function</td> |
<td>undefined</td> |
<td> |
The context (this) is the column Object. <br> |
The function, take one parameter: <br> |
data: Array of all the data rows. <br> |
the function should return a string with the text to show in the footer cell. |
</tr> |
<tr> |
<td>events</td> |
<td>data-events</td> |
<td>Object</td> |
<td>undefined</td> |
<td> |
The cell events listener when you use formatter function, take three parameters: <br> |
event: the jQuery event. <br> |
value: the field value. <br> |
row: the row record data.<br> |
index: the row index. |
</td> |
</tr> |
<tr> |
<td>sorter</td> |
<td>data-sorter</td> |
<td>Function</td> |
<td>undefined</td> |
<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. |
</td> |
</tr> |
<tr> |
<td>sortName</td> |
<td>data-sort-name</td> |
<td>String</td> |
<td>undefined</td> |
<td>Provide a customizable sort-name, not the default sort-name in the header, or the field name |
of the column. For example, a column might display the value of fieldName of "html" such as |
"<b><span style="color:red">abc</span></b>", but a fieldName to sort is "content" with the value of "abc". |
</td> |
</tr> |
<tr> |
<td>cellStyle</td> |
<td>data-cell-style</td> |
<td>Function</td> |
<td>undefined</td> |
<td> |
The cell style formatter function, take three parameters: <br> |
value: the field value.<br> |
row: the row record data.<br> |
index: the row index.<br> |
field: the row field.<br> |
Support classes or css. |
</td> |
</tr> |
<tr> |
<td>searchable</td> |
<td>data-searchable</td> |
<td>Boolean</td> |
<td>true</td> |
<td> |
True to search data for this column. |
</td> |
</tr> |
<tr> |
<td>searchFormatter</td> |
<td>data-search-formatter</td> |
<td>Boolean</td> |
<td>true</td> |
<td> |
True to search use formated data. |
</td> |
</tr> |
</tbody> |
</table> |
/pack-rat/003_pack_rat/pack-rat/node_modules/bootstrap-table/docs/_i18n/zh-cn/documentation/events.md |
@@ -0,0 +1,229 @@ |
# 事件 []({{ site.repo }}/blob/develop/docs/_i18n/{{ site.lang }}/documentation/events.md) |
|
--- |
|
<table class="table" |
id="e" |
data-search="true" |
data-show-toggle="true" |
data-show-columns="true" |
data-mobile-responsive="true"> |
<thead> |
<tr> |
<th>Option 事件</th> |
<th>jQuery 事件</th> |
<th>参数</th> |
<th>描述</th> |
</tr> |
</thead> |
<tbody> |
<tr> |
<td>onAll</td> |
<td>all.bs.table</td> |
<td>name, args</td> |
<td> |
所有的事件都会触发该事件,参数包括:<br> |
name:事件名,<br> |
args:事件的参数。 |
</td> |
</tr> |
<tr> |
<td>onClickRow</td> |
<td>click-row.bs.table</td> |
<td>row, $element</td> |
<td> |
当用户点击某一行的时候触发,参数包括:<br> |
row:点击行的数据,<br> |
$element:tr 元素,<br> |
field:点击列的 field 名称。 |
</td> |
</tr> |
<tr> |
<td>onDblClickRow</td> |
<td>dbl-click-row.bs.table</td> |
<td>row, $element</td> |
<td> |
当用户双击某一行的时候触发,参数包括:<br> |
row:点击行的数据,<br> |
$element:tr 元素,<br> |
field:点击列的 field 名称。 |
</td> |
</tr> |
<tr> |
<td>onClickCell</td> |
<td>click-cell.bs.table</td> |
<td>field, value, row, $element</td> |
<td> |
当用户点击某一列的时候触发,参数包括:<br> |
field:点击列的 field 名称,<br> |
value:点击列的 value 值,<br> |
row:点击列的整行数据,<br> |
$element:td 元素。 |
</td> |
</tr> |
<tr> |
<td>onDblClickCell</td> |
<td>dbl-click-cell.bs.table</td> |
<td>field, value, row, $element</td> |
<td> |
当用户双击某一列的时候触发,参数包括:<br> |
field:点击列的 field 名称,<br> |
value:点击列的 value 值,<br> |
row:点击列的整行数据,<br> |
$element:td 元素。 |
</td> |
</tr> |
<tr> |
<td>onSort</td> |
<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. |
</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. |
</td> |
</tr> |
<tr> |
<td>onUncheck</td> |
<td>uncheck.bs.table</td> |
<td>row</td> |
<td> |
Fires when user uncheck a row, the parameters contains: <br> |
row: the record corresponding to the clicked row. |
$element: the DOM element unchecked. |
</td> |
</tr> |
<tr> |
<td>onCheckAll</td> |
<td>check-all.bs.table</td> |
<td>rows</td> |
<td> |
Fires when user check all rows, the parameters contains: <br> |
rows: array of records corresponding to newly checked rows. |
</td> |
</tr> |
<tr> |
<td>onUncheckAll</td> |
<td>uncheck-all.bs.table</td> |
<td>rows</td> |
<td> |
Fires when user uncheck all rows, the parameters contains: <br> |
rows: array of records corresponding to previously checked rows. |
</td> |
</tr> |
<tr> |
<td>onCheckSome</td> |
<td>check-some.bs.table</td> |
<td>rows</td> |
<td> |
Fires when user check some rows, the parameters contains: <br> |
rows: array of records corresponding to previously checked rows. |
</td> |
</tr> |
<tr> |
<td>onUncheckSome</td> |
<td>uncheck-some.bs.table</td> |
<td>rows</td> |
<td> |
Fires when user uncheck some rows, the parameters contains: <br> |
rows: array of records corresponding to previously checked rows. |
</td> |
</tr> |
<tr> |
<td>onLoadSuccess</td> |
<td>load-success.bs.table</td> |
<td>data</td> |
<td>Fires when remote data is loaded |
successfully. |
</td> |
</tr> |
<tr> |
<td>onLoadError</td> |
<td>load-error.bs.table</td> |
<td>status</td> |
<td>Fires when some errors occur to load remote data.</td> |
</tr> |
<tr> |
<td>onColumnSwitch</td> |
<td>column-switch.bs.table</td> |
<td>field, checked</td> |
<td>Fires when switch the column visible.</td> |
</tr> |
<tr> |
<td>onColumnSearch</td> |
<td>column-search.bs.table</td> |
<td>field, text</td> |
<td>Fires when search by column.</td> |
</tr> |
<tr> |
<td>onPageChange</td> |
<td>page-change.bs.table</td> |
<td>number, size</td> |
<td>Fires when change the page number or page size.</td> |
</tr> |
<tr> |
<td>onSearch</td> |
<td>search.bs.table</td> |
<td>text</td> |
<td>Fires when search the table.</td> |
</tr> |
<tr> |
<td>onToggle</td> |
<td>toggle.bs.table</td> |
<td>cardView</td> |
<td>Fires when toggle the view of table.</td> |
</tr> |
<tr> |
<td>onPreBody</td> |
<td>pre-body.bs.table</td> |
<td>data</td> |
<td>Fires before the table body is rendered</td> |
</tr> |
<tr> |
<td>onPostBody</td> |
<td>post-body.bs.table</td> |
<td>none</td> |
<td>Fires after the table body is rendered and available in the DOM</td> |
</tr> |
<tr> |
<td>onPostHeader</td> |
<td>post-header.bs.table</td> |
<td>none</td> |
<td>Fires after the table header is rendered and availble in the DOM</td> |
</tr> |
<tr> |
<td>onExpandRow</td> |
<td>expand-row.bs.table</td> |
<td>index, row, $detail</td> |
<td>当点击详细图标展开详细页面的时候触发。</td> |
</tr> |
<tr> |
<td>onCollapseRow</td> |
<td>collapse-row.bs.table</td> |
<td>index, row</td> |
<td>当点击详细图片收起详细页面的时候触发。</td> |
</tr> |
<tr> |
<td>onRefreshOptions</td> |
<td>refresh-options.bs.table</td> |
<td>options</td> |
<td>Fires after refresh the options and before destroy and init the table.</td> |
</tr> |
<tr> |
<td>onRefresh</td> |
<td>refresh.bs.table</td> |
<td>params</td> |
<td>Fires after the click the refresh button.</td> |
</tr> |
</tbody> |
</table> |
/pack-rat/003_pack_rat/pack-rat/node_modules/bootstrap-table/docs/_i18n/zh-cn/documentation/methods.md |
@@ -0,0 +1,332 @@ |
# 方法 []({{ site.repo }}/blob/develop/docs/_i18n/{{ site.lang }}/documentation/methods.md) |
|
--- |
|
使用方法的语法:`$('#table').bootstrapTable('method', parameter);`。 |
|
<table class="table" |
id="m" |
data-search="true" |
data-show-toggle="true" |
data-show-columns="true" |
data-mobile-responsive="true"> |
<thead> |
<tr> |
<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>返回表格的 Options。</td> |
<td>getOptions</td> |
</tr> |
<tr> |
<td>getSelections</td> |
<td>none</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>或者当前加载的数据。假如设置 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>加载数据到表格中,旧数据会被替换。</td> |
<td>load</td> |
</tr> |
<tr> |
<td>showAllColumns</td> |
<td>none</td> |
<td>Show All the columns.</td> |
<td>showAllColumns</td> |
</tr> |
<tr> |
<td>hideAllColumns</td> |
<td>none</td> |
<td>Hide All the columns.</td> |
<td>hidAllColumns</td> |
</tr> |
<tr> |
<td>append</td> |
<td>data</td> |
<td>添加数据到表格在现有数据之后。</td> |
<td>append</td> |
</tr> |
<tr> |
<td>prepend</td> |
<td>data</td> |
<td>插入数据到表格在现有数据之前。</td> |
<td>prepend</td> |
</tr> |
<tr> |
<td>remove</td> |
<td>params</td> |
<td> |
从表格中删除数据,包括两个参数: |
field: 需要删除的行的 field 名称。<br> |
values: 需要删除的行的值,类型为数组。<br> |
</td> |
<td>remove</td> |
</tr> |
<tr> |
<td>removeAll</td> |
<td>-</td> |
<td>删除表格所有数据。</td> |
<td>removeAll</td> |
</tr> |
<tr> |
<td>removeByUniqueId</td> |
<td>id</td> |
<td>根据 uniqueId 删除指定的行。</td> |
<td>removeByUniqueId</td> |
</tr> |
<tr> |
<td>insertRow</td> |
<td>params</td> |
<td> |
插入新行,参数包括:<br> |
index: 要插入的行的 index。<br> |
row: 行的数据,Object 对象。 |
</td> |
<td>insertRow</td> |
</tr> |
<tr> |
<td>updateRow</td> |
<td>params</td> |
<td> |
更新指定的行,参数包括:<br> |
index: 要更新的行的 index。<br> |
row: 行的数据,Object 对象。 |
</td> |
<td>updateRow</td> |
</tr> |
<tr> |
<td>showRow</td> |
<td>params</td> |
<td>显示指定的行,参数包括:<br> |
index: 要更新的行的 index 或者 uniqueId。<br> |
isIdField: 指定 index 是否为 uniqueid。</td> |
<td>showRow-hideRow</td> |
</tr> |
<tr> |
<td>hideRow</td> |
<td>params</td> |
<td>显示指定的行,参数包括:<br> |
index: 要更新的行的 index。<br> |
uniqueId: 或者要更新的行的 uniqueid。 |
<td>showRow-hideRow</td> |
</tr> |
<tr> |
<td>getRowsHidden</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> |
<tr> |
<td>mergeCells</td> |
<td>options</td> |
<td> |
Merge some cells to one cell, the options contains following properties: <br> |
index: the row index. <br> |
field: the field name.<br> |
rowspan: the rowspan count to be merged. <br> |
colspan: the colspan count to be merged. |
</td> |
</tr> |
<tr> |
<td>updateCell</td> |
<td>params</td> |
<td> |
Update one cell, the params contains following properties: <br> |
index: the row index. <br> |
field: the field name.<br> |
value: the new field value. |
</td> |
</tr> |
<tr> |
<td>refresh</td> |
<td>params</td> |
<td>Refresh the remote server data, you can set <code>{silent: true}</code> to refresh the data silently, and set <code>{url: newUrl}</code> to change the url. To supply query params specific to this request, set <code>{query: {foo: 'bar'}}</code></td> |
</tr> |
<tr> |
<td>refreshOptions</td> |
<td>options</td> |
<td>Refresh the options</td> |
</tr> |
<tr> |
<td>resetSearch</td> |
<td>text</td> |
<td>Set the search text</td> |
</tr> |
<tr> |
<td>showLoading</td> |
<td>none</td> |
<td>Show loading status.</td> |
</tr> |
<tr> |
<td>hideLoading</td> |
<td>none</td> |
<td>Hide loading status.</td> |
</tr> |
<tr> |
<td>checkAll</td> |
<td>none</td> |
<td>Check all current page rows.</td> |
</tr> |
<tr> |
<td>uncheckAll</td> |
<td>none</td> |
<td>Uncheck all current page rows.</td> |
</tr> |
<tr> |
<td>check</td> |
<td>index</td> |
<td>Check a row, the row index start with 0.</td> |
</tr> |
<tr> |
<td>uncheck</td> |
<td>index</td> |
<td>Uncheck a row, the row index start with 0.</td> |
</tr> |
<tr> |
<td>checkBy</td> |
<td>params</td> |
<td> |
Check a row by array of values, the params contains:<br> |
field: name of the field used to find records<br> |
values: array of values for rows to check<br> |
Example: <br> |
$("#table").bootstrapTable("checkBy", {field:"field_name", values:["value1","value2","value3"]}) |
</td> |
</tr> |
<tr> |
<td>uncheckBy</td> |
<td>params</td> |
<td> |
Uncheck a row by array of values, the params contains:<br> |
field: name of the field used to find records<br> |
values: array of values for rows to uncheck<br> |
Example: <br> |
$("#table").bootstrapTable("uncheckBy", {field:"field_name", values:["value1","value2","value3"]}) |
</td> |
</tr> |
<tr> |
<td>resetView</td> |
<td>params</td> |
<td>Reset the bootstrap table view, for example reset the table height.</td> |
</tr> |
<tr> |
<td>resetWidth</td> |
<td>none</td> |
<td>Resizes header and footer to fit current columns width</td> |
</tr> |
<tr> |
<td>destroy</td> |
<td>none</td> |
<td>Destroy the bootstrap table.</td> |
</tr> |
<tr> |
<td>showColumn</td> |
<td>field</td> |
<td>Show the specified column.</td> |
</tr> |
<tr> |
<td>hideColumn</td> |
<td>field</td> |
<td>Hide the specified column.</td> |
</tr> |
<tr> |
<td>getHiddenColumns</td> |
<td>-</td> |
<td>获取隐藏的列。</td> |
</tr> |
<tr> |
<td>getVisibleColumns</td> |
<td>-</td> |
<td>获取可见列。</td> |
</tr> |
<tr> |
<td>scrollTo</td> |
<td>value</td> |
<td>滚动到指定位置,单位为 px,设置 'bottom' 表示跳到最后。</td> |
</tr> |
<tr> |
<td>getScrollPosition</td> |
<td>none</td> |
<td>获取当前滚动条的位置,单位为 px。</td> |
</tr> |
<tr> |
<td>filterBy</td> |
<td>params</td> |
<td>(只能用于 client 端)过滤表格数据, 你可以通过过滤<code>{age: 10}</code>来显示 age 等于 10 的数据。</td> |
</tr> |
<tr> |
<td>selectPage</td> |
<td>page</td> |
<td>跳到指定的页。</td> |
</tr> |
<tr> |
<td>prevPage</td> |
<td>none</td> |
<td>跳到上一页。</td> |
</tr> |
<tr> |
<td>nextPage</td> |
<td>none</td> |
<td>跳到下一页。</td> |
</tr> |
<tr> |
<td>togglePagination</td> |
<td>none</td> |
<td>切换分页选项。</td> |
</tr> |
<tr> |
<td>toggleView</td> |
<td>none</td> |
<td>切换 card/table 视图</td> |
</tr> |
<tr> |
<td>expandRow</td> |
<td>index</td> |
<td>Expand the row that has the index passed by parameter if the detail view option is set to True.</td> |
</tr> |
<tr> |
<td>collapseRow</td> |
<td>index</td> |
<td>Collapse the row that has the index passed by parameter if the detail view option is set to True.</td> |
</tr> |
<tr> |
<td>expandAllRows</td> |
<td>is subtable</td> |
<td>Expand all rows if the detail view option is set to True.</td> |
</tr> |
<tr> |
<td>collapseAllRows</td> |
<td>is subtable</td> |
<td>Collapse all rows if the detail view option is set to True.</td> |
</tr> |
</tbody> |
</table> |
/pack-rat/003_pack_rat/pack-rat/node_modules/bootstrap-table/docs/_i18n/zh-cn/documentation/table-options.md |
@@ -0,0 +1,573 @@ |
# 表格参数 []({{ site.repo }}/blob/develop/docs/_i18n/{{ site.lang }}/documentation/table-options.md) |
|
--- |
|
表格的参数定义在 `jQuery.fn.bootstrapTable.defaults`。 |
|
<table class="table" |
id="t" |
data-search="true" |
data-show-toggle="true" |
data-show-columns="true" |
data-mobile-responsive="true"> |
<thead> |
<tr> |
<th>名称</th> |
<th>标签</th> |
<th>类型</th> |
<th>默认</th> |
<th>描述</th> |
</tr> |
</thead> |
<tbody> |
<tr> |
<td>-</td> |
<td>data-toggle</td> |
<td>String</td> |
<td>'table'</td> |
<td>不用写 JavaScript 直接启用表格。</td> |
</tr> |
<tr> |
<td>classes</td> |
<td>data-classes</td> |
<td>String</td> |
<td>'table table-hover'</td> |
<td>表格的类名称。默认情况下,表格是有边框的,你可以添加 'table-no-bordered' 来删除表格的边框样式。</td> |
</tr> |
<tr> |
<td>sortClass</td> |
<td>data-sort-class</td> |
<td>String</td> |
<td>undefined</td> |
<td>The class name of the td elements which are sorted.</td> |
</tr> |
<tr> |
<td>height</td> |
<td>data-height</td> |
<td>Number</td> |
<td>undefined</td> |
<td>定义表格的高度。</td> |
</tr> |
<tr> |
<td>undefinedText</td> |
<td>data-undefined-text</td> |
<td>String</td> |
<td>'-'</td> |
<td>当数据为 undefined 时显示的字符</td> |
</tr> |
<tr> |
<td>striped</td> |
<td>data-striped</td> |
<td>Boolean</td> |
<td>false</td> |
<td>设置为 <code>true</code> 会有隔行变色效果</td> |
</tr> |
<tr> |
<td>sortName</td> |
<td>data-sort-name</td> |
<td>String</td> |
<td>undefined</td> |
<td>定义排序列,通过url方式获取数据填写字段名,否则填写下标</td> |
</tr> |
<tr> |
<td>sortOrder</td> |
<td>data-sort-order</td> |
<td>String</td> |
<td>'asc'</td> |
<td>定义排序方式 'asc' 或者 'desc'</td> |
</tr> |
<tr> |
<td>sortStable</td> |
<td>data-sort-stable</td> |
<td>Boolean</td> |
<td>false</td> |
<td>设置为 <code>true</code> 将获得稳定的排序,我们会添加<code>_position</code>属性到 row 数据中。</td> |
</tr> |
<tr> |
<td>iconsPrefix</td> |
<td>data-icons-prefix</td> |
<td>String</td> |
<td>'glyphicon'</td> |
<td>定义字体库 ('Glyphicon' or 'fa' for FontAwesome),使用"fa"时需引用 FontAwesome,并且配合 icons 属性实现效果<br> |
Glyphicon 集成于Bootstrap可免费使用 参考:<a href="http://glyphicons.com/">http://glyphicons.com/</a><br> |
FontAwesome 参考:<a href="http://fortawesome.github.io/">http://fortawesome.github.io/</a> |
</td> |
</tr> |
<tr> |
<td>icons</td> |
<td>data-icons</td> |
<td>Object</td> |
<td>{<br/> |
paginationSwitchDown: 'glyphicon-collapse-down icon-chevron-down',<br/> |
paginationSwitchUp: 'glyphicon-collapse-up icon-chevron-up',<br/> |
refresh: 'glyphicon-refresh icon-refresh'<br/> |
toggle: 'glyphicon-list-alt icon-list-alt'<br/> |
columns: 'glyphicon-th icon-th'<br/> |
detailOpen: 'glyphicon-plus icon-plus'<br/> |
detailClose: 'glyphicon-minus icon-minus'<br/> |
}</td> |
<td>自定义图标</td> |
</tr> |
<tr> |
<td>columns</td> |
<td>-</td> |
<td>Array</td> |
<td>[]</td> |
<td>列配置项,详情请查看 列参数 表格. |
</td> |
</tr> |
<tr> |
<td>data</td> |
<td>-</td> |
<td>Array</td> |
<td>[]</td> |
<td>加载json格式的数据</td> |
</tr> |
<tr> |
<td>ajax</td> |
<td>data-ajax</td> |
<td>Function</td> |
<td>undefined</td> |
<td>自定义 AJAX 方法,须实现 jQuery AJAX API</td> |
</tr> |
<tr> |
<td>method</td> |
<td>data-method</td> |
<td>String</td> |
<td>'get'</td> |
<td>服务器数据的请求方式 'get' or 'post' </td> |
</tr> |
<tr> |
<td>url</td> |
<td>data-url</td> |
<td>String</td> |
<td>undefined</td> |
<td>服务器数据的加载地址</td> |
</tr> |
<tr> |
<td>cache</td> |
<td>data-cache</td> |
<td>Boolean</td> |
<td>true</td> |
<td>设置为 <code>false</code> 禁用 AJAX 数据缓存</td> |
</tr> |
<tr> |
<td>contentType</td> |
<td>data-content-type</td> |
<td>String</td> |
<td>'application/json'</td> |
<td>发送到服务器的数据编码类型</td> |
</tr> |
<tr> |
<td>dataType</td> |
<td>data-data-type</td> |
<td>String</td> |
<td>'json'</td> |
<td>服务器返回的数据类型</td> |
</tr> |
<tr> |
<td>ajaxOptions</td> |
<td>data-ajax-options</td> |
<td>Object</td> |
<td>{}</td> |
<td>提交ajax请求时的附加参数,可用参数列请查看<a href="http://api.jquery.com/jQuery.ajax">http://api.jquery.com/jQuery.ajax</a>.</td> |
</tr> |
<tr> |
<td>queryParams</td> |
<td>data-query-params</td> |
<td>Function</td> |
<td>function(params) {<br>return params;<br>}</td> |
<td> |
请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 |
如果 queryParamsType = 'limit' ,返回参数必须包含<br> |
limit, offset, search, sort, order |
否则, 需要包含: <br> |
pageSize, pageNumber, searchText, sortName, sortOrder. <br> |
返回false将会终止请求 |
</td> |
</tr> |
<tr> |
<td>queryParamsType</td> |
<td>data-query-params-type</td> |
<td>String</td> |
<td>'limit'</td> |
<td>设置为 'limit' 则会发送符合 RESTFul 格式的参数.</td> |
</tr> |
<tr> |
<td>responseHandler</td> |
<td>data-response-handler</td> |
<td>Function</td> |
<td>function(res) {<br>return res;<br>}</td> |
<td> |
加载服务器数据之前的处理程序,可以用来格式化数据。<br />参数:res为从服务器请求到的数据。 |
</td> |
</tr> |
<tr> |
<td>pagination</td> |
<td>data-pagination</td> |
<td>Boolean</td> |
<td>false</td> |
<td>设置为 <code>true</code> 会在表格底部显示分页条</td> |
</tr> |
<tr> |
<td>paginationLoop</td> |
<td>data-pagination-loop</td> |
<td>Boolean</td> |
<td>true</td> |
<td>设置为 <code>true</code> 启用分页条无限循环的功能。</td> |
</tr> |
<tr> |
<td>onlyInfoPagination</td> |
<td>data-only-info-pagination</td> |
<td>Boolean</td> |
<td>false</td> |
<td>设置为 <code>true</code> 只显示总数据数,而不显示分页按钮。需要 pagination='True'</td> |
</tr> |
<tr> |
<td>sidePagination</td> |
<td>data-side-pagination</td> |
<td>String</td> |
<td>'client'</td> |
<td>设置在哪里进行分页,可选值为 'client' 或者 'server'。设置 'server'时,必须设置 服务器数据地址(url)或者重写ajax方法</td> |
</tr> |
<tr> |
<td>pageNumber</td> |
<td>data-page-number</td> |
<td>Number</td> |
<td>1</td> |
<td>如果设置了分页,首页页码</td> |
</tr> |
<tr> |
<td>pageSize</td> |
<td>data-page-size</td> |
<td>Number</td> |
<td>10</td> |
<td>如果设置了分页,页面数据条数</td> |
</tr> |
<tr> |
<td>pageList</td> |
<td>data-page-list</td> |
<td>Array</td> |
<td>[10, 25, 50, 100, All]</td> |
<td>如果设置了分页,设置可供选择的页面数据条数。设置为All 则显示所有记录。</td> |
</tr> |
<tr> |
<td>selectItemName</td> |
<td>data-select-item-name</td> |
<td>String</td> |
<td>'btSelectItem'</td> |
<td>radio or checkbox 的字段名</td> |
</tr> |
<tr> |
<td>smartDisplay</td> |
<td>data-smart-display</td> |
<td>Boolean</td> |
<td>true</td> |
<td>True to display pagination or card view smartly.</td> |
</tr> |
<tr> |
<td>escape</td> |
<td>data-escape</td> |
<td>Boolean</td> |
<td>false</td> |
<td>转义HTML字符串,替换 <code>&</code>, <code><</code>, |
<code>></code>, <code>"</code>, <code>`</code>, 和 <code>'</code> 字符.</td> |
</tr> |
<tr> |
<td>search</td> |
<td>data-search</td> |
<td>Boolean</td> |
<td>false</td> |
<td>是否启用搜索框</td> |
</tr> |
<tr> |
<td>searchOnEnterKey</td> |
<td>data-search-on-enter-key</td> |
<td>Boolean</td> |
<td>false</td> |
<td>设置为 <code>true</code>时,按回车触发搜索方法,否则自动触发搜索方法</td> |
</tr> |
<tr> |
<td>strictSearch</td> |
<td>data-strict-search</td> |
<td>Boolean</td> |
<td>false</td> |
<td>设置为 <code>true</code>启用 全匹配搜索,否则为模糊搜索</td> |
</tr> |
<tr> |
<td>searchText</td> |
<td>data-search-text</td> |
<td>String</td> |
<td>''</td> |
<td>初始化搜索文字</td> |
</tr> |
<tr> |
<td>searchTimeOut</td> |
<td>data-search-time-out</td> |
<td>Number</td> |
<td>500</td> |
<td>设置搜索超时时间</td> |
</tr> |
<tr> |
<td>trimOnSearch</td> |
<td>data-trim-on-search</td> |
<td>Boolean</td> |
<td>true</td> |
<td>设置为 <code>true</code> 将允许空字符搜索</td> |
</tr |
<tr> |
<td>showHeader</td> |
<td>data-show-header</td> |
<td>Boolean</td> |
<td>true</td> |
<td>是否显示列头</td> |
</tr> |
<tr> |
<td>showFooter</td> |
<td>data-show-footer</td> |
<td>Boolean</td> |
<td>false</td> |
<td>是否显示列脚</td> |
</tr> |
<tr> |
<td>showColumns</td> |
<td>data-show-columns</td> |
<td>Boolean</td> |
<td>false</td> |
<td>是否显示 内容列下拉框</td> |
</tr> |
<tr> |
<td>showRefresh</td> |
<td>data-show-refresh</td> |
<td>Boolean</td> |
<td>false</td> |
<td>是否显示 刷新按钮</td> |
</tr> |
<tr> |
<td>showToggle</td> |
<td>data-show-toggle</td> |
<td>Boolean</td> |
<td>false</td> |
<td>是否显示 切换试图(table/card)按钮 |
</td> |
</tr> |
<tr> |
<td>showPaginationSwitch</td> |
<td>data-show-pagination-switch</td> |
<td>Boolean</td> |
<td>false</td> |
<td>是否显示 数据条数选择框</td> |
</tr> |
<tr> |
<td>minimumCountColumns</td> |
<td>data-minimum-count-columns</td> |
<td>Number</td> |
<td>1</td> |
<td>当列数小于此值时,将隐藏内容列下拉框。 |
</td> |
</tr> |
<tr> |
<td>idField</td> |
<td>data-id-field</td> |
<td>String</td> |
<td>undefined</td> |
<td>指定主键列</td> |
</tr> |
<tr> |
<td>uniqueId</td> |
<td>data-unique-id</td> |
<td>String</td> |
<td>undefined</td> |
<td>Indicate an unique identifier for each row.</td> |
</tr> |
<tr> |
<td>cardView</td> |
<td>data-card-view</td> |
<td>Boolean</td> |
<td>false</td> |
<td>设置为 <code>true</code>将显示card视图,适用于移动设备。否则为table试图,适用于pc</td> |
</tr> |
<tr> |
<td>detailView</td> |
<td>data-detail-view</td> |
<td>Boolean</td> |
<td>false</td> |
<td>设置为 <code>true</code> 可以显示详细页面模式。</td> |
</tr> |
<tr> |
<td>detailFormatter</td> |
<td>data-detail-formatter</td> |
<td>Function</td> |
<td>function(index, row) {<br>return '';<br>}</td> |
<td>格式化详细页面模式的视图。</td> |
</tr> |
<tr> |
<td>searchAlign</td> |
<td>data-search-align</td> |
<td>String</td> |
<td>'right'</td> |
<td>指定 搜索框 水平方向的位置。'left' or 'right'</td> |
</tr> |
<tr> |
<td>buttonsAlign</td> |
<td>data-buttons-align</td> |
<td>String</td> |
<td>'right'</td> |
<td>指定 按钮 水平方向的位置。'left' or 'right'</td> |
</tr> |
<tr> |
<td>toolbarAlign</td> |
<td>data-toolbar-align</td> |
<td>String</td> |
<td>'left'</td> |
<td>指定 toolbar 水平方向的位置。'left' or 'right'</td> |
</tr> |
<tr> |
<td>paginationVAlign</td> |
<td>data-pagination-v-align</td> |
<td>String</td> |
<td>'bottom'</td> |
<td>指定 分页条 在垂直方向的位置。'top' or 'bottom' or 'bonth'</td> |
</tr> |
<tr> |
<td>paginationHAlign</td> |
<td>data-pagination-h-align</td> |
<td>String</td> |
<td>'right'</td> |
<td>指定 分页条 在水平方向的位置。'left' or 'right'</td> |
</tr> |
<tr> |
<td>paginationDetailHAlign</td> |
<td>data-pagination-detail-h-align</td> |
<td>String</td> |
<td>'left'</td> |
<td>指定 分页详细信息 在水平方向的位置。'left' or 'right'</td> |
</tr> |
<tr> |
<td>paginationPreText</td> |
<td>data-pagination-pre-text</td> |
<td>String</td> |
<td>'<'</td> |
<td>指定分页条中上一页按钮的图标或文字</td> |
</tr> |
<tr> |
<td>paginationNextText</td> |
<td>data-pagination-next-text</td> |
<td>String</td> |
<td>'>'</td> |
<td>指定分页条中下一页按钮的图标或文字</td> |
</tr> |
<tr> |
<td>clickToSelect</td> |
<td>data-click-to-select</td> |
<td>Boolean</td> |
<td>false</td> |
<td>设置true 将在点击行时,自动选择rediobox 和 checkbox</td> |
</tr> |
<tr> |
<td>singleSelect</td> |
<td>data-single-select</td> |
<td>Boolean</td> |
<td>false</td> |
<td>设置True 将禁止多选</td> |
</tr> |
<tr> |
<td>toolbar</td> |
<td>data-toolbar</td> |
<td>String</td> |
<td>undefined</td> |
<td> |
一个jQuery 选择器,指明自定义的toolbar 例如:<br> |
#toolbar, .toolbar. |
</td> |
</tr> |
<tr> |
<td>checkboxHeader</td> |
<td>data-checkbox-header</td> |
<td>Boolean</td> |
<td>true</td> |
<td>设置false 将在列头隐藏check-all checkbox .</td> |
</tr> |
<tr> |
<td>maintainSelected</td> |
<td>data-maintain-selected</td> |
<td>Boolean</td> |
<td>false</td> |
<td>设置为 <code>true</code> 在点击分页按钮或搜索按钮时,将记住checkbox的选择项</td> |
</tr> |
<tr> |
<td>sortable</td> |
<td>data-sortable</td> |
<td>Boolean</td> |
<td>true</td> |
<td>设置为<code>false</code> 将禁止所有列的排序</td> |
</tr> |
<tr> |
<td>silentSort</td> |
<td>data-silent-sort</td> |
<td>Boolean</td> |
<td>true</td> |
<td>设置为 <code>false</code> 将在点击分页按钮时,自动记住排序项。仅在 sidePagination设置为 <code>server</code>时生效.</td> |
</tr> |
<tr> |
<td>rowStyle</td> |
<td>data-row-style</td> |
<td>Function</td> |
<td>function(row,index) {<br>return class;<br>}</td> |
<td> |
自定义行样式 参数为:<br> |
row: 行数据<br> |
index: 行下标<br> |
返回值可以为class或者css |
</td> |
</tr> |
<tr> |
<td>rowAttributes</td> |
<td>data-row-attributes</td> |
<td>Function</td> |
<td>function(row,index) {<br>return attributes;<br>}</td> |
<td> |
自定义行属性 参数为:<br> |
row: 行数据<br> |
index: 行下标<br> |
返回值可以为class或者css |
支持所有自定义属性 |
</td> |
</tr> |
<tr> |
<td>customSearch</td> |
<td>data-custom-search</td> |
<td>Function</td> |
<td>$.noop</td> |
<td> |
The custom search function is executed instead of built-in search function, takes one parameters: <br> |
text: the search text.<br> |
Example usage:<br> |
<pre> |
function customSearch(text) { |
//Search logic here. |
//You must use `this.data` array in order to filter the data. NO use `this.options.data`. |
} |
</pre> |
</td> |
</tr> |
<tr> |
<td>customSort</td> |
<td>data-custom-sort</td> |
<td>Function</td> |
<td>$.noop</td> |
<td> |
The custom sort function is executed instead of built-in sort function, takes two parameters: <br> |
sortName: the sort name.<br> |
sortOrder: the sort order.<br> |
Example usage:<br> |
<pre> |
function customSort(sortName, sortOrder) { |
//Sort logic here. |
//You must use `this.data` array in order to sort the data. NO use `this.options.data`. |
} |
</pre> |
</td> |
</tr> |
</tbody> |
</table> |