Skip to content

Commit

Permalink
пофиксил баг в стиле контейнера + с выбором строк при релоаде таблици
Browse files Browse the repository at this point in the history
  • Loading branch information
Морозов Антон committed Jan 26, 2015
1 parent 29ed18e commit 02ecbf5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion css/tmsTable.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,7 @@ <h3>Табличка с исходными данными на удаленно
json_tbl.render();

</script>
<a class="btn btn-default" onclick="console.log(json_tbl.getSelectedIndexes());return false;">Показать выбранные</a>

</body>
</html>
11 changes: 11 additions & 0 deletions js/tmsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,8 @@ tmsTable = function (params) {
tfoot_td.append(a_golast);

__select_page.bind('change', function () {
this_object.unselectAllRows();

this_object.reloadRows()
})
a_refresh.bind('click', function () {
Expand Down Expand Up @@ -619,6 +621,7 @@ tmsTable = function (params) {
* @param page
*/
this.goToPage = function (page) {
this.unselectAllRows();

if (page < 1)page = 1;
if (page > _tbl_page_num)page = _tbl_page_num;
Expand Down Expand Up @@ -815,10 +818,18 @@ tmsTable = function (params) {
_tbl_order_by = order_by;
_tbl_order_direction = 'asc';
}
this.unselectAllRows();
this.reloadRows();
}


this.unselectAllRows = function(){
_tbl_selected_rows = [];
__tbody.find('tr').find('td:first').find('input').prop('checked', false);
__thead.find('tr').find('th:first').find('input').prop('checked', false);

}

/**
* throw error ID is not defined
*/
Expand Down

0 comments on commit 02ecbf5

Please sign in to comment.