Skip to content

Commit

Permalink
fixed - mainsort larger than colspan
Browse files Browse the repository at this point in the history
fixed a possible issue, if the mainsort would be set outside of the
colspan
in this case, the last cell will be used
  • Loading branch information
drvic10k committed Feb 7, 2015
1 parent e2b257a commit d9529bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Scripts/bootstrap-sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@

var colspan = $this.attr('colspan');
if (colspan) {
var mainSort = parseFloat($this.data('mainsort')) || 0;
var mainSort = Math.min(colspan - 1, parseFloat($this.data('mainsort')) || 0);
var rowIndex = parseFloat($this.data('sortkey').split('-').pop());

// If there is one more row in header, delve deeper
Expand Down

0 comments on commit d9529bb

Please sign in to comment.