Skip to content

Commit fdb0daf

Browse files
committed
Update change log and format the code.
1 parent 029bc2a commit fdb0daf

File tree

2 files changed

+53
-38
lines changed

2 files changed

+53
-38
lines changed

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## ChangeLog
22

3-
### 1.8.2
3+
### 1.9.0
44

55
- [enh] Update bootstrap-table-cookie.js.
66
- [enh] Use options for detailView's open/close icons.
@@ -11,6 +11,21 @@
1111
- [bug] Fix #938, fix #940: Multiple Sort and Hide/Show column.
1212
- [bug] Fix #970: click and dblclick bug on no-rows table.
1313
- [bug] Fix #967: unselected column while column sorted display error.
14+
- [enh] Support title feature in cells.
15+
- [enh] Improved cookie, mobile extension.
16+
- [enh] Added groupby, angular extension.
17+
- [enh] Added option for setting locale.
18+
- [enh] Added `exportDataType` option for export extension.
19+
- [enh] Add fa-IR, ca-ES, es-ES, et-EE and af-ZA locales.
20+
- [enh] Supported complex header with rowspans and colspans.
21+
- [enh] Added `searchFomatter` column option.
22+
- [bug] Fixed ResetRow function and undefined column search bug.
23+
- [bug] Fixed #639: footer resizing problem.
24+
- [enh] Added resetSearch method to reset the search text.
25+
- [enh] Supported flat json.
26+
- [enh] Improved reorder-columns extension.
27+
- [enh] Added multiple-search, accent-neutralise extension.
28+
- [enh] Added fixed-columns extension.
1429

1530
### 1.8.1
1631

src/bootstrap-table.js

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* https://github.com/wenzhixin/bootstrap-table/
55
*/
66

7-
! function ($) {
7+
!function ($) {
88
'use strict';
99

1010
// TOOLS DEFINITION
@@ -95,7 +95,7 @@
9595
}
9696
}
9797
}
98-
}
98+
};
9999

100100
var getScrollBarWidth = function () {
101101
if (cachedWidth === null) {
@@ -210,11 +210,11 @@
210210

211211
return dataAttr;
212212
};
213-
213+
214214
var getItemField = function (item, field) {
215215
var props = field.split('.');
216216
var value = item;
217-
for(var p in props) {
217+
for (var p in props) {
218218
value = value[props[p]];
219219
}
220220
return value;
@@ -524,26 +524,26 @@
524524
}
525525
}
526526
};
527-
527+
528528
BootstrapTable.prototype.initContainer = function () {
529529
this.$container = $([
530530
'<div class="bootstrap-table">',
531-
'<div class="fixed-table-toolbar"></div>',
532-
this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ?
533-
'<div class="fixed-table-pagination" style="clear: both;"></div>' :
534-
'',
535-
'<div class="fixed-table-container">',
536-
'<div class="fixed-table-header"><table></table></div>',
537-
'<div class="fixed-table-body">',
538-
'<div class="fixed-table-loading">',
539-
this.options.formatLoadingMessage(),
540-
'</div>',
541-
'</div>',
542-
'<div class="fixed-table-footer"><table><tr></tr></table></div>',
543-
this.options.paginationVAlign === 'bottom' || this.options.paginationVAlign === 'both' ?
531+
'<div class="fixed-table-toolbar"></div>',
532+
this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ?
533+
'<div class="fixed-table-pagination" style="clear: both;"></div>' :
534+
'',
535+
'<div class="fixed-table-container">',
536+
'<div class="fixed-table-header"><table></table></div>',
537+
'<div class="fixed-table-body">',
538+
'<div class="fixed-table-loading">',
539+
this.options.formatLoadingMessage(),
540+
'</div>',
541+
'</div>',
542+
'<div class="fixed-table-footer"><table><tr></tr></table></div>',
543+
this.options.paginationVAlign === 'bottom' || this.options.paginationVAlign === 'both' ?
544544
'<div class="fixed-table-pagination"></div>' :
545545
'',
546-
'</div>',
546+
'</div>',
547547
'</div>'
548548
].join(''));
549549

@@ -714,8 +714,8 @@
714714

715715
html.push('<th' + sprintf(' title="%s"', column.titleTooltip),
716716
column.checkbox || column.radio ?
717-
sprintf(' class="bs-checkbox %s"', column['class'] || '') :
718-
class_,
717+
sprintf(' class="bs-checkbox %s"', column['class'] || '') :
718+
class_,
719719
sprintf(' style="%s"', halign + style),
720720
sprintf(' rowspan="%s"', column.rowspan),
721721
sprintf(' colspan="%s"', column.colspan),
@@ -762,7 +762,7 @@
762762
this.$header.children().children().off('keypress').on('keypress', function (event) {
763763
if (that.options.sortable && $(this).data().sortable) {
764764
var code = event.keyCode || event.which;
765-
if(code == 13) { //Enter keycode
765+
if (code == 13) { //Enter keycode
766766
that.onSort(event);
767767
}
768768
}
@@ -1103,7 +1103,7 @@
11031103
}
11041104
} else {
11051105
if ((value + '').toLowerCase().indexOf(s) !== -1) {
1106-
return true;
1106+
return true;
11071107
}
11081108
}
11091109
}
@@ -1176,10 +1176,10 @@
11761176
var pageNumber = [
11771177
sprintf('<span class="btn-group %s">',
11781178
this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ?
1179-
'dropdown' : 'dropup'),
1179+
'dropdown' : 'dropup'),
11801180
'<button type="button" class="btn btn-default ' +
1181-
(this.options.iconSize === undefined ? '' : ' btn-' + this.options.iconSize) +
1182-
' dropdown-toggle" data-toggle="dropdown">',
1181+
(this.options.iconSize === undefined ? '' : ' btn-' + this.options.iconSize) +
1182+
' dropdown-toggle" data-toggle="dropdown">',
11831183
'<span class="page-size">',
11841184
$allSelected ? this.options.formatAllRows() : this.options.pageSize,
11851185
'</span>',
@@ -1493,9 +1493,9 @@
14931493
sprintf(' type="%s"', type) +
14941494
sprintf(' value="%s"', item[that.options.idField]) +
14951495
sprintf(' checked="%s"', value === true ||
1496-
(value && value.checked) ? 'checked' : undefined) +
1496+
(value && value.checked) ? 'checked' : undefined) +
14971497
sprintf(' disabled="%s"', !column.checkboxEnabled ||
1498-
(value && value.disabled) ? 'disabled' : undefined) +
1498+
(value && value.disabled) ? 'disabled' : undefined) +
14991499
' />',
15001500
that.options.cardView ? '</div>' : '</td>'
15011501
].join('');
@@ -1814,19 +1814,19 @@
18141814
fixedBody = this.$tableBody.get(0);
18151815

18161816
scrollWidth = fixedBody.scrollWidth > fixedBody.clientWidth &&
1817-
fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ?
1817+
fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ?
18181818
getScrollBarWidth() : 0;
18191819

18201820
this.$el.css('margin-top', -this.$header.outerHeight());
18211821

18221822
focused = $(':focus');
1823-
if(focused.length > 0) {
1823+
if (focused.length > 0) {
18241824
var $th = focused.parents('th');
1825-
if($th.length > 0) {
1825+
if ($th.length > 0) {
18261826
var dataField = $th.attr('data-field');
1827-
if(dataField !== undefined) {
1827+
if (dataField !== undefined) {
18281828
var $headerTh = this.$header.find("[data-field='" + dataField + "']");
1829-
if($headerTh.length > 0) {
1829+
if ($headerTh.length > 0) {
18301830
$headerTh.find(":input").addClass("focus-temp");
18311831
}
18321832
}
@@ -1843,7 +1843,7 @@
18431843

18441844

18451845
focusedTemp = $('.focus-temp:visible:eq(0)');
1846-
if(focusedTemp.length > 0) {
1846+
if (focusedTemp.length > 0) {
18471847
focusedTemp.focus();
18481848
this.$header.find('.focus-temp').removeClass('focus-temp');
18491849
}
@@ -1943,8 +1943,8 @@
19431943
scrollWidth = elWidth > this.$tableBody.width() ? getScrollBarWidth() : 0;
19441944

19451945
this.$tableFooter.css({
1946-
'margin-right': scrollWidth
1947-
}).find('table').css('width', elWidth)
1946+
'margin-right': scrollWidth
1947+
}).find('table').css('width', elWidth)
19481948
.attr('class', this.$el.attr('class'));
19491949

19501950
$footerTd = this.$tableFooter.find('td');
@@ -2403,7 +2403,7 @@
24032403
};
24042404

24052405
BootstrapTable.prototype.getHiddenColumns = function () {
2406-
return $.grep(this.columns, function( column ) {
2406+
return $.grep(this.columns, function (column) {
24072407
return !column.visible;
24082408
});
24092409
};

0 commit comments

Comments
 (0)