docs.js 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673
  1. $(function () {
  2. 'use strict';
  3. function initTables() {
  4. var cardView = false;
  5. if ($(window).width() < 640) {
  6. cardView = true;
  7. }
  8. $('#table, #column, #event, #method, #localization').bootstrapTable('destroy');
  9. $('#table').bootstrapTable({
  10. cardView: cardView,
  11. columns: [
  12. {field: 'name', title: 'Name', sortable: true},
  13. {field: 'name', title: '名称', sortable: true, visible: false},
  14. {field: 'attribute', title: 'Attribute'},
  15. {field: 'attribute', title: '属性', visible: false},
  16. {field: 'type', title: 'Type'},
  17. {field: 'type', title: '类型', visible: false},
  18. {field: 'description', title: 'Description', align: 'left'},
  19. {field: 'description_zh', title: '描述', align: 'left', visible: false},
  20. {field: 'default', title: 'Default', align: 'left'},
  21. {field: 'default', title: '默认', align: 'left', visible: false},
  22. {field: 'example', title: '', valign: 'middle', formatter: function (value) {
  23. if (!value) {
  24. return '-';
  25. }
  26. return [
  27. '<a title="Example" href="examples.html#' + value + '">',
  28. '<i class="glyphicon glyphicon-eye-open"></i>',
  29. '</a>'].join('');
  30. }}
  31. ],
  32. data: [
  33. {
  34. name: '-',
  35. attribute: 'data-toggle',
  36. type: 'String',
  37. description: 'Activate bootstrap table without writing JavaScript.',
  38. description_zh: '不通过JavaScript的方式启动Bootstrap Table。',
  39. 'default': 'table',
  40. example: 'basic-table'
  41. },
  42. {
  43. name: 'classes',
  44. attribute: 'data-classes',
  45. type: 'String',
  46. description: 'The class name of table.',
  47. description_zh: '表格的类名。',
  48. 'default': 'table table-hover',
  49. example: 'classes-table'
  50. },
  51. {
  52. name: 'height',
  53. attribute: 'data-height',
  54. type: 'Number',
  55. description: 'The height of table.',
  56. description_zh: '表格的高度。',
  57. 'default': 'undefined',
  58. example: 'basic-table'
  59. },
  60. {
  61. name: 'undefinedText',
  62. attribute: 'data-undefined-text',
  63. type: 'String',
  64. description: 'Defines the default undefined text.',
  65. description_zh: '定义默认的undefined显示文字。',
  66. 'default': '-',
  67. example: ''
  68. },
  69. {
  70. name: 'striped',
  71. attribute: 'data-striped',
  72. type: 'Boolean',
  73. description: 'True to stripe the rows.',
  74. description_zh: '使表格带有条纹。',
  75. 'default': 'false',
  76. example: 'classes-table'
  77. },
  78. {
  79. name: 'sortName',
  80. attribute: 'data-sort-name',
  81. type: 'String',
  82. description: 'Defines which column can be sorted.',
  83. description_zh: '定义哪一列可被排序。',
  84. 'default': 'undefined',
  85. example: 'sort-table'
  86. },
  87. {
  88. name: 'sortOrder',
  89. attribute: 'data-sort-order',
  90. type: 'String',
  91. description: 'Defines the column sort order, can only be "asc" or "desc".',
  92. description_zh: '定义列排序的顺序,只能为“asc”和“desc”',
  93. 'default': 'asc',
  94. example: 'sort-table'
  95. },
  96. {
  97. name: 'columns',
  98. attribute: '-',
  99. type: 'Array',
  100. description: 'The table columns config object, see column properties for more details.',
  101. description_zh: '表格列的配置,详细见列属性。',
  102. 'default': '[]',
  103. example: 'via-javascript-table'
  104. },
  105. {
  106. name: 'data',
  107. attribute: '-',
  108. type: 'Array',
  109. description: 'The data to be loaded.',
  110. description_zh: '需要加载的数据。',
  111. 'default': '[]',
  112. example: 'table-methods'
  113. },
  114. {
  115. name: 'method',
  116. attribute: 'data-method',
  117. type: 'String',
  118. description: 'The method type to request remote data.',
  119. description_zh: '远程数据请求的方法。',
  120. 'default': 'get',
  121. example: 'basic-table'
  122. },
  123. {
  124. name: 'url',
  125. attribute: 'data-url',
  126. type: 'String',
  127. description: 'A URL to request data from remote site.',
  128. description_zh: '远程数据请求的URL地址。',
  129. 'default': 'undefined',
  130. example: 'basic-table'
  131. },
  132. {
  133. name: 'contentType',
  134. attribute: 'data-content-type',
  135. type: 'String',
  136. description: 'The contentType of request remote data.',
  137. description_zh: '远程数据请求的“contentType”类型。',
  138. 'default': 'application/json',
  139. example: ''
  140. },
  141. {
  142. name: 'queryParams',
  143. attribute: 'data-query-params',
  144. type: 'Function',
  145. description: 'When request remote data, sending additional parameters by format the queryParams, the parameters object contains: <br>pageSize, pageNumber, searchText, sortName, sortOrder.',
  146. description_zh: '远程数据请求时,可以通过queryParams来格式化所需要的数据信息,参数(对象)包含了:<br>pageSize, pageNumber, searchText, sortName, sortOrder。',
  147. 'default': 'function(params) {<br>return {};<br>}',
  148. example: 'server-side-pagination-table'
  149. },
  150. {
  151. name: 'queryParamsType',
  152. attribute: 'data-query-params-type',
  153. type: 'String',
  154. description: 'Set "limit" to send query params width RESTFul type.',
  155. description_zh: '设置为“limit”可以发送标准的RESTFul类型的参数请求。',
  156. 'default': 'undefined',
  157. example: '-'
  158. },
  159. {
  160. name: 'responseHandler',
  161. attribute: 'data-response-handler',
  162. type: 'Function',
  163. description: 'Before load remote data, handler the response data format, the parameters object contains: <br>res: the response data.',
  164. description_zh: '在加载数据前,可以对返回的数据进行处理,参数包含:<br>res: 返回的数据。',
  165. 'default': 'function(res) {<br>return res;<br>}',
  166. example: 'card-view'
  167. },
  168. {
  169. name: 'pagination',
  170. attribute: 'data-pagination',
  171. type: 'Boolean',
  172. description: 'True to show a pagination toolbar on table bottom.',
  173. description_zh: '设置True在表格底部显示分页工具栏。',
  174. 'default': 'false',
  175. example: 'pagination-table'
  176. },
  177. {
  178. name: 'sidePagination',
  179. attribute: 'data-side-pagination',
  180. type: 'String',
  181. description: 'Defines the side pagination of table, can only be "client" or "server".',
  182. description_zh: '定义表格分页的位置,只能是“client”(客户端)和“server”(服务器端)。',
  183. 'default': 'client',
  184. example: 'pagination-table'
  185. },
  186. {
  187. name: 'totalRows',
  188. attribute: 'data-total-rows',
  189. type: 'Number',
  190. description: 'Defines the total rows of table, you need to set this option when the sidePagination option is set to "server".',
  191. description_zh: '定义表格记录的总条数,在server端分页的时候需要设置该参数。',
  192. 'default': 0,
  193. example: ''
  194. },
  195. {
  196. name: 'pageNumber',
  197. attribute: 'data-page-number',
  198. type: 'Number',
  199. description: 'When set pagination property, initialize the page number.',
  200. description_zh: '分页的时候设置当前的页码。',
  201. 'default': 1,
  202. example: 'via-javascript-table'
  203. },
  204. {
  205. name: 'pageSize',
  206. attribute: 'data-page-size',
  207. type: 'Number',
  208. description: 'When set pagination property, initialize the page size.',
  209. description_zh: '分页的时候设置每页的条数。',
  210. 'default': 10,
  211. example: 'via-javascript-table'
  212. },
  213. {
  214. name: 'pageList',
  215. attribute: 'data-page-list',
  216. type: 'Array',
  217. description: 'When set pagination property, initialize the page size selecting list.',
  218. description_zh: '分页的时候设置分页数的列表。',
  219. 'default': '[10, 25, 50, 100]',
  220. example: 'via-javascript-table'
  221. },
  222. {
  223. name: 'search',
  224. attribute: 'data-search',
  225. type: 'Boolean',
  226. description: 'Enable the search input.',
  227. description_zh: '启用搜索输入框。',
  228. 'default': 'false',
  229. example: 'pagination-table'
  230. },
  231. {
  232. name: 'selectItemName',
  233. attribute: 'data-select-item-name',
  234. type: 'String',
  235. description: 'The name of radio or checkbox input.',
  236. description_zh: '单选框或者复选框的name,用于多个表格使用radio的情况。',
  237. 'default': 'btSelectItem',
  238. example: 'radio-table'
  239. },
  240. {
  241. name: 'showHeader',
  242. attribute: 'data-show-header',
  243. type: 'Boolean',
  244. description: 'False to hide the table header.',
  245. description_zh: '设置为False可隐藏表头。',
  246. 'default': 'true',
  247. example: 'hide-header-table'
  248. },
  249. {
  250. name: 'showColumns',
  251. attribute: 'data-show-columns',
  252. type: 'Boolean',
  253. description: 'True to show the columns drop down list.',
  254. description_zh: '设置为True可显示表格显示/隐藏列表。',
  255. 'default': 'false',
  256. example: 'show-columns-table'
  257. },
  258. {
  259. name: 'showRefresh',
  260. attribute: 'data-show-refresh',
  261. type: 'Boolean',
  262. description: 'True to show the refresh button.',
  263. description_zh: '设置为True可显示刷新按钮。',
  264. 'default': 'false',
  265. example: 'basic-toolbar-table'
  266. },
  267. {
  268. name: 'showToggle',
  269. attribute: 'data-show-toggle',
  270. type: 'Boolean',
  271. description: 'True to show the toggle button to toggle table / card view.',
  272. description_zh: '设置为True可显示切换普通表格和名片(card)布局。',
  273. 'default': 'false',
  274. example: 'basic-toolbar-table'
  275. },
  276. {
  277. name: 'minimunCountColumns',
  278. attribute: 'data-minimun-count-columns',
  279. type: 'Number',
  280. description: 'The minimun count columns to hide of the columns drop down list.',
  281. description_zh: '表格显示/隐藏列表时可设置最小隐藏的列数。',
  282. 'default': '1',
  283. example: 'via-javascript-table'
  284. },
  285. {
  286. name: 'idField',
  287. attribute: 'data-id-field',
  288. type: 'String',
  289. description: 'Indicate which field is an identity field.',
  290. description_zh: '标识哪个字段为id主键。',
  291. 'default': 'undefined',
  292. example: ''
  293. },
  294. {
  295. name: 'cardView',
  296. attribute: 'data-card-view',
  297. type: 'Boolean',
  298. description: 'True to show card view table, for example mobile view.',
  299. description_zh: '设置为True时显示名片(card)布局,例如用手机浏览的时候。',
  300. 'default': 'false',
  301. example: 'card-view'
  302. },
  303. {
  304. name: 'clickToSelect',
  305. attribute: 'data-click-to-select',
  306. type: 'Boolean',
  307. description: 'True to select checkbox or radiobox when click rows.',
  308. description_zh: '设置为True时点击行即可选中单选/复选框。',
  309. 'default': 'false',
  310. example: 'table-select'
  311. },
  312. {
  313. name: 'singleSelect',
  314. attribute: 'data-single-select',
  315. type: 'Boolean',
  316. description: 'True to allow checkbox selecting only one row.',
  317. description_zh: '设置为True时复选框只能选择一条记录。',
  318. 'default': 'false',
  319. example: 'single-checkbox-table'
  320. },
  321. {
  322. name: 'toolbar',
  323. attribute: 'data-toolbar',
  324. type: 'String',
  325. description: 'A jQuery selector that indicate the toolbar, for example: <br>#toolbar, .toolbar.',
  326. description_zh: '设置jQuery元素为工具栏,例如:<br>#toolbar, .toolbar。',
  327. 'default': 'undefined',
  328. example: 'custom-toolbar-table'
  329. },
  330. {
  331. name: 'checkboxHeader',
  332. attribute: 'data-checkbox-header',
  333. type: 'Boolean',
  334. description: 'False to hide check-all checkbox in header row.',
  335. description_zh: '设置为False时隐藏表头中的全选复选框。',
  336. 'default': 'true',
  337. example: '-'
  338. },
  339. {
  340. name: 'rowStyle',
  341. attribute: 'data-row-style',
  342. type: 'Function',
  343. description: 'The row style formatter function, take two parameters: <br>row: the row record data.<br>index: the row index.<br>Support classes or css.',
  344. description_zh: '行样式格式化方法,有两个参数:<br>row: 行记录的数据。<br>index: 行数据的 index。<br>支持 classes 或者 css.',
  345. 'default': '{}',
  346. example: 'classes-table'
  347. }
  348. ]
  349. });
  350. $('#column').bootstrapTable({
  351. cardView: cardView,
  352. columns: [
  353. {field: 'name', title: 'Name', width: 60, sortable: true},
  354. {field: 'name', title: '名称', width: 60, sortable: true, visible: false},
  355. {field: 'attribute', title: 'Attribute'},
  356. {field: 'attribute', title: '属性', visible: false},
  357. {field: 'type', title: 'Type', width: 60},
  358. {field: 'type', title: '类型', width: 60, visible: false},
  359. {field: 'description', title: 'Description', align: 'left', width: 400},
  360. {field: 'description_zh', title: '描述', align: 'left', width: 400, visible: false},
  361. {field: 'default', title: 'Default', align: 'left', width: 180},
  362. {field: 'default', title: '默认', align: 'left', width: 180, visible: false},
  363. {field: 'example', title: '', formatter: function (value) {
  364. if (!value) {
  365. return '-';
  366. }
  367. return [
  368. '<a title="Example" href="examples.html#' + value + '">',
  369. '<i class="glyphicon glyphicon-eye-open"></i>',
  370. '</a>'].join('');
  371. }}
  372. ],
  373. data: [
  374. {
  375. name: 'radio',
  376. attribute: 'data-radio',
  377. type: 'Boolean',
  378. description: 'True to show a radio. The radio column has fixed width.',
  379. description_zh: '设置为True显示单选框,单选框列有固定的宽度。',
  380. 'default': 'false',
  381. example: 'radio-table'
  382. },
  383. {
  384. name: 'checkbox',
  385. attribute: 'data-checkbox',
  386. type: 'Boolean',
  387. description: 'True to show a checkbox. The checkbox column has fixed width.',
  388. description_zh: '设置为True显示复选框,复选框列有固定的宽度。',
  389. 'default': 'false',
  390. example: 'checkbox-table'
  391. },
  392. {
  393. name: 'field',
  394. attribute: 'data-field',
  395. type: 'String',
  396. description: 'The column field name.',
  397. description_zh: '列标识名称。',
  398. 'default': 'undefined',
  399. example: 'via-javascript-table'
  400. },
  401. {
  402. name: 'title',
  403. attribute: 'data-title',
  404. type: 'String',
  405. description: 'The column title text.',
  406. description_zh: '表头标题。',
  407. 'default': 'undefined',
  408. example: 'via-javascript-table'
  409. },
  410. {
  411. name: 'class',
  412. attribute: 'class / data-class',
  413. type: 'String',
  414. description: 'The column class name.',
  415. description_zh: '列的类名称。',
  416. 'default': 'undefined',
  417. example: 'classes-table'
  418. },
  419. {
  420. name: 'align',
  421. attribute: 'data-align',
  422. type: 'String',
  423. description: 'Indicate how to align the column data. "left", "right", "center" can be used.',
  424. description_zh: '定义列的水平对齐方式,只能为:"left", "right" 和 "center"。',
  425. 'default': 'undefined',
  426. example: 'via-javascript-table'
  427. },
  428. {
  429. name: 'valign',
  430. attribute: 'data-valign',
  431. type: 'String',
  432. description: 'Indicate how to align the cell data. "top", "middle", "bottom" can be used.',
  433. description_zh: '定义列的垂直对齐方式,只能为:"top", "middle" 和 "bottom"。',
  434. 'default': 'undefined',
  435. example: 'via-javascript-table'
  436. },
  437. {
  438. name: 'width',
  439. attribute: 'data-width',
  440. type: 'Number',
  441. description: 'The width of column. If not defined, the width will auto expand to fit its contents.',
  442. description_zh: '列的宽度,假如没有定义,将根据内容自适应宽度。',
  443. 'default': 'undefined',
  444. example: ''
  445. },
  446. {
  447. name: 'sortable',
  448. attribute: 'data-sortable',
  449. type: 'Boolean',
  450. description: 'True to allow the column can be sorted.',
  451. description_zh: '设置为True允许对该列进行排序。',
  452. 'default': 'false',
  453. example: 'sort-table'
  454. },
  455. {
  456. name: 'order',
  457. attribute: 'data-order',
  458. type: 'String',
  459. description: 'The default sort order, can only be "asc" or "desc".',
  460. description_zh: '定义列排序的顺序,只能为“asc”和“desc”。',
  461. 'default': 'asc',
  462. example: 'sort-table'
  463. },
  464. {
  465. name: 'visible',
  466. attribute: 'data-visible',
  467. type: 'Boolean',
  468. description: 'False to hide the columns item.',
  469. description_zh: '设置为False隐藏该列。',
  470. 'default': 'true',
  471. example: 'show-columns-table'
  472. },
  473. {
  474. name: 'switchable',
  475. attribute: 'data-switchable',
  476. type: 'Boolean',
  477. description: 'False to disable the switchable of columns item.',
  478. description_zh: '设置为False禁用切换列的显示/隐藏。',
  479. 'default': 'true',
  480. example: 'show-columns-table'
  481. },
  482. {
  483. name: 'formatter',
  484. attribute: 'data-formatter',
  485. type: 'Function',
  486. description: 'The cell formatter function, take three parameters: <br />value: the field value. <br />row: the row record data.<br />index: the row index.',
  487. description_zh: '列的格式化方法,包含3个参数:<br />value: 该单元格的数据。<br />row: 该行的数据。<br />index: 该行的index。',
  488. 'default': 'undefined',
  489. example: 'format-table'
  490. },
  491. {
  492. name: 'events',
  493. attribute: 'data-events',
  494. type: 'Object',
  495. description: '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.',
  496. description_zh: '当你使用格式化方式时,可以对该列的元素进行事件监听。包含三个参数:<br />event: jQuery 事件。<br />value: 该单元格的数据。<br />row: 该行的数据。<br />index: 该行的index。',
  497. 'default': 'undefined',
  498. example: 'column-events-table'
  499. },
  500. {
  501. name: 'sorter',
  502. attribute: 'data-sorter',
  503. type: 'Function',
  504. description: '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.',
  505. description_zh: '可对列进行自定义排序,包含两个参数:<br />a: 第一个值。<br /> b: 第二个值。',
  506. 'default': 'undefined',
  507. example: 'custom-sort-table'
  508. }
  509. ]
  510. });
  511. $('#event').bootstrapTable({
  512. cardView: cardView,
  513. columns: [
  514. {field: 'name', title: 'Option Event', width: 100, sortable: true},
  515. {field: 'event', title: 'jQuery Event', width: 100, sortable: true},
  516. {field: 'parameter', title: 'Parameter', width: 100, sortable: true},
  517. {field: 'description', title: 'Description', align: 'left', width: 400, sortable: true}
  518. ],
  519. data: [
  520. {
  521. name: 'onAll',
  522. event: 'all.bs.table',
  523. parameter: 'name, args',
  524. description: 'Fires when all events trigger, the parameters contains: <br />name: the event name, <br>args: the event data.'
  525. },
  526. {
  527. name: 'onClickRow',
  528. event: 'click-row.bs.table',
  529. parameter: 'row, $element',
  530. description: 'Fires when user click a row, the parameters contains: <br />row: the record corresponding to the clicked row, <br>$element: the tr element.'
  531. },
  532. {
  533. name: 'onDblClickRow',
  534. event: 'dbl-click-row.bs.table',
  535. parameter: 'row, $element',
  536. description: 'Fires when user click a row, the parameters contains: <br />row: the record corresponding to the clicked row, <br>$element: the tr element.'
  537. },
  538. {
  539. name: 'onSort',
  540. event: 'sort.bs.table',
  541. parameter: 'name, order',
  542. description: 'Fires when user sort a column, the parameters contains: <br />name: the sort column field name<br />order: the sort column order.'
  543. },
  544. {
  545. name: 'onCheck',
  546. event: 'check.bs.table',
  547. parameter: 'row',
  548. description: 'Fires when user check a row, the parameters contains: <br />row: the record corresponding to the clicked row.'
  549. },
  550. {
  551. name: 'onUncheck',
  552. event: 'uncheck.bs.table',
  553. parameter: 'row',
  554. description: 'Fires when user uncheck a row, the parameters contains: <br />row: the record corresponding to the clicked row.'
  555. },
  556. {
  557. name: 'onCheckAll',
  558. event: 'check-all.bs.table',
  559. parameter: 'none',
  560. description: 'Fires when user check all rows.'
  561. },
  562. {
  563. name: 'onUncheckAll',
  564. event: 'uncheck-all.bs.table',
  565. parameter: 'none',
  566. description: 'Fires when user uncheck all rows.'
  567. },
  568. {
  569. name: 'onLoadSuccess',
  570. event: 'load-success.bs.table',
  571. parameter: 'data',
  572. description: 'Fires when remote data is loaded successfully.'
  573. },
  574. {
  575. name: 'onLoadError',
  576. event: 'load-error.bs.table',
  577. parameter: 'status',
  578. description: 'Fires when some errors occur to load remote data.'
  579. }
  580. ],
  581. onClickRow: function (row) {
  582. console.log('onClickRow', row);
  583. },
  584. onSort: function (name, order) {
  585. console.log('onSort', name, order);
  586. },
  587. onCheck: function(row) {
  588. console.log('onCheck', row);
  589. },
  590. onUncheck: function(row) {
  591. console.log('onUncheck', row);
  592. },
  593. onCheckAll: function() {
  594. console.log('onCheckAll');
  595. },
  596. onUncheckAll: function() {
  597. console.log('onUncheckAll');
  598. }
  599. });
  600. $('#method').bootstrapTable({
  601. cardView: cardView,
  602. columns: [
  603. {field: 'name', title: 'Name', width: 100},
  604. {field: 'parameter', title: 'Parameter', width: 100},
  605. {field: 'description', title: 'Description', align: 'left', width: 400}
  606. ]
  607. }).bootstrapTable('load', [
  608. {name: 'getSelections', parameter: 'none', description: 'Return all selected rows, when no record selected, am empty array will return.'},
  609. {name: 'load', parameter: 'data', description: 'Load the data to table.'}
  610. ]).bootstrapTable('append', [
  611. {name: 'append', parameter: 'data', description: 'Append the data to table.'},
  612. {name: 'mergeCells', parameter: 'options', description: 'Merge some cells to one cell, the options contains following properties:'},
  613. {name: 'mergeCells', parameter: 'options', description: 'index: the row index.'},
  614. {name: 'mergeCells', parameter: 'options', description: 'field: the field name.'},
  615. {name: 'mergeCells', parameter: 'options', description: 'rowspan: the rowspan count to be merged.'},
  616. {name: 'mergeCells', parameter: 'options', description: 'colspan: the colspan count to be merged.'},
  617. {name: 'refresh', parameter: 'none', description: 'Refresh the remote server data.'},
  618. {name: 'showLoading', parameter: 'none', description: 'Show loading status.'},
  619. {name: 'hideLoading', parameter: 'none', description: 'Hide loading status.'},
  620. {name: 'checkAll', parameter: 'none', description: 'Check all current page rows.'},
  621. {name: 'uncheckAll', parameter: 'none', description: 'Uncheck all current page rows.'},
  622. {name: 'resetView', parameter: 'params', description: 'Reset the bootstrap table view, for example reset the table height.'},
  623. {name: 'destroy', parameter: 'none', description: 'Destroy the bootstrap table.'}
  624. ]).bootstrapTable('mergeCells', {
  625. index: 3,
  626. field: 'name',
  627. rowspan: 5
  628. }).bootstrapTable('mergeCells', {
  629. index: 3,
  630. field: 'parameter',
  631. rowspan: 5
  632. });
  633. $('#localization').bootstrapTable({
  634. cardView: cardView,
  635. columns: [
  636. {field: 'name', title: 'Name', width: 100},
  637. {field: 'parameter', title: 'Parameter', width: 100},
  638. {field: 'default', title: 'Default', width: 200}
  639. ],
  640. data: [{
  641. name: 'formatLoadingMessage',
  642. parameter: '-',
  643. 'default': 'Loading, please wait…'
  644. }, {
  645. name: 'formatRecordsPerPage',
  646. parameter: 'pageNumber',
  647. 'default': '%s records per page'
  648. }, {
  649. name: 'formatShowingRows',
  650. parameter: 'pageFrom, pageTo, totalRows',
  651. 'default': 'Showing %s to %s of %s rows'
  652. }, {
  653. name: 'formatSearch',
  654. parameter: '-',
  655. 'default': 'Search'
  656. }, {
  657. name: 'formatNoMatches',
  658. parameter: '-',
  659. 'default': 'No matching records found'
  660. }]
  661. });
  662. $('[title]').tooltip();
  663. }
  664. $(window).on('resize', initTables);
  665. initTables();
  666. });