Skip to content

Commit

Permalink
Merge pull request #544 from wenzhixin/feature/options
Browse files Browse the repository at this point in the history
Rebuild options to es6 and new template
  • Loading branch information
wenzhixin authored Dec 29, 2024
2 parents 0592c76 + d332a35 commit c958767
Show file tree
Hide file tree
Showing 108 changed files with 4,641 additions and 3,083 deletions.
51 changes: 30 additions & 21 deletions options/ajax-options.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
<script>
init({
title: 'AJAX Options',
desc: 'Use `ajaxOptions` option to set the Additional options for submit ajax reques, for example we can use `beforeSend` option to send the custom request header.',
links: ['bootstrap-table.min.css'],
scripts: ['bootstrap-table.min.js']
})
init({
title: 'AJAX Options',
desc: 'Use `ajaxOptions` option to set the Additional options for submit ajax reques, for example we can use `beforeSend` option to send the custom request header.',
links: ['bootstrap-table.min.css'],
scripts: ['bootstrap-table.min.js']
})
</script>

<table
id="table"
data-toggle="table"
data-height="460"
data-ajax-options="ajaxOptions"
data-url="json/data1.json">
<thead>
<tr>
<th data-field="id">ID</th>
<th data-field="name">Item Name</th>
<th data-field="price">Item Price</th>
</tr>
</thead>
</table>
<template>
<table
id="table"
data-toggle="table"
data-height="460"
data-ajax-options="ajaxOptions"
data-url="json/data1.json"
>
<thead>
<tr>
<th data-field="id">
ID
</th>
<th data-field="name">
Item Name
</th>
<th data-field="price">
Item Price
</th>
</tr>
</thead>
</table>
</template>

<script>
window.ajaxOptions = {
beforeSend: function (xhr) {
beforeSend (xhr) {
xhr.setRequestHeader('custom-auth-token', 'custom-auth-token')
}
}
Expand Down
61 changes: 38 additions & 23 deletions options/basic-columns.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,41 @@
<script>
init({
title: 'Basic Columns',
desc: 'Use `showColumns` to show the columns drop down list.',
links: ['bootstrap-table.min.css'],
scripts: ['bootstrap-table.min.js']
})
init({
title: 'Basic Columns',
desc: 'Use `showColumns` to show the columns drop down list.',
links: ['bootstrap-table.min.css'],
scripts: ['bootstrap-table.min.js']
})
</script>

<table
id="table"
data-toggle="table"
data-height="460"
data-url="json/data5.json"
data-show-columns="true">
<thead>
<tr>
<th data-field="name">Name</th>
<th data-field="price">Price</th>
<th data-field="column1">Columns1</th>
<th data-field="column2">Columns2</th>
<th data-field="column3">Columns3</th>
<th data-field="column4">Columns4</th>
</tr>
</thead>
</table>
<template>
<table
id="table"
data-toggle="table"
data-height="460"
data-url="json/data5.json"
data-show-columns="true"
>
<thead>
<tr>
<th data-field="name">
Name
</th>
<th data-field="price">
Price
</th>
<th data-field="column1">
Columns1
</th>
<th data-field="column2">
Columns2
</th>
<th data-field="column3">
Columns3
</th>
<th data-field="column4">
Columns4
</th>
</tr>
</thead>
</table>
</template>
53 changes: 31 additions & 22 deletions options/buttons-align.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
<script>
init({
title: 'Buttons Align',
desc: 'Use `buttonsAlign` option to indicate how to align the toolbar buttons.',
links: ['bootstrap-table.min.css'],
scripts: ['bootstrap-table.min.js']
})
init({
title: 'Buttons Align',
desc: 'Use `buttonsAlign` option to indicate how to align the toolbar buttons.',
links: ['bootstrap-table.min.css'],
scripts: ['bootstrap-table.min.js']
})
</script>

<table
id="table"
data-toggle="table"
data-height="460"
data-search="true"
data-show-columns="true"
data-buttons-align="left"
data-url="json/data1.json">
<thead>
<tr>
<th data-field="id">ID</th>
<th data-field="name">Item Name</th>
<th data-field="price">Item Price</th>
</tr>
</thead>
</table>
<template>
<table
id="table"
data-toggle="table"
data-height="460"
data-search="true"
data-show-columns="true"
data-buttons-align="left"
data-url="json/data1.json"
>
<thead>
<tr>
<th data-field="id">
ID
</th>
<th data-field="name">
Item Name
</th>
<th data-field="price">
Item Price
</th>
</tr>
</thead>
</table>
</template>
73 changes: 41 additions & 32 deletions options/buttons-attribute-title.html
Original file line number Diff line number Diff line change
@@ -1,35 +1,44 @@
<script>
init({
title: 'Buttons Attribute Title',
desc: 'Customize the title attribute of the toolbar buttons, which is mainly used to customize the toolbar style.',
links: [
'https://unpkg.com/[email protected]/src/hint-css.css',
'bootstrap-table.min.css'
],
scripts: [
'https://unpkg.com/[email protected]/src/hint-css.js',
'bootstrap-table.min.js'
]
})
init({
title: 'Buttons Attribute Title',
desc: 'Customize the title attribute of the toolbar buttons, which is mainly used to customize the toolbar style.',
links: [
'https://unpkg.com/[email protected]/src/hint-css.css',
'bootstrap-table.min.css'
],
scripts: [
'https://unpkg.com/[email protected]/src/hint-css.js',
'bootstrap-table.min.js'
]
})
</script>

<table
id="table"
data-toggle="table"
data-height="460"
data-search="true"
data-show-pagination-switch="true"
data-show-refresh="true"
data-show-toggle="true"
data-show-columns="true"
data-show-fullscreen="true"
data-buttons-attribute-title="data-hint"
data-url="json/data1.json">
<thead>
<tr>
<th data-field="id">ID</th>
<th data-field="name">Item Name</th>
<th data-field="price">Item Price</th>
</tr>
</thead>
</table>
<template>
<table
id="table"
data-toggle="table"
data-height="460"
data-search="true"
data-show-pagination-switch="true"
data-show-refresh="true"
data-show-toggle="true"
data-show-columns="true"
data-show-fullscreen="true"
data-buttons-attribute-title="data-hint"
data-url="json/data1.json"
>
<thead>
<tr>
<th data-field="id">
ID
</th>
<th data-field="name">
Item Name
</th>
<th data-field="price">
Item Price
</th>
</tr>
</thead>
</table>
</template>
55 changes: 32 additions & 23 deletions options/buttons-class.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
<script>
init({
title: 'Buttons Class',
desc: 'Use `buttonsClass: \'primary\'` option to defines the class of table buttons.',
links: ['bootstrap-table.min.css'],
scripts: ['bootstrap-table.min.js']
})
init({
title: 'Buttons Class',
desc: 'Use `buttonsClass: \'primary\'` option to defines the class of table buttons.',
links: ['bootstrap-table.min.css'],
scripts: ['bootstrap-table.min.js']
})
</script>

<table
id="table"
data-toggle="table"
data-height="460"
data-show-refresh="true"
data-show-columns="true"
data-show-fullscreen="true"
data-buttons-class="primary"
data-url="json/data1.json">
<thead>
<tr>
<th data-field="id">ID</th>
<th data-field="name">Item Name</th>
<th data-field="price">Item Price</th>
</tr>
</thead>
</table>
<template>
<table
id="table"
data-toggle="table"
data-height="460"
data-show-refresh="true"
data-show-columns="true"
data-show-fullscreen="true"
data-buttons-class="primary"
data-url="json/data1.json"
>
<thead>
<tr>
<th data-field="id">
ID
</th>
<th data-field="name">
Item Name
</th>
<th data-field="price">
Item Price
</th>
</tr>
</thead>
</table>
</template>
Loading

0 comments on commit c958767

Please sign in to comment.