Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed dist/jQuery.Bootgrid.1.3.1.nupkg
Binary file not shown.
Binary file removed dist/jquery.bootgrid-1.3.1.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions dist/jquery.bootgrid.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* jQuery Bootgrid v1.3.1 - 09/11/2015
* Copyright (c) 2014-2015 Rafael Staib (http://www.jquery-bootgrid.com)
* jQuery Bootgrid v1.3.1 - 04/07/2016
* Copyright (c) 2014-2016 Rafael Staib (http://www.jquery-bootgrid.com)
* Licensed under MIT http://www.opensource.org/licenses/MIT
*/
.bootgrid-header,
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.bootgrid.fa.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* jQuery Bootgrid v1.3.1 - 09/11/2015
* Copyright (c) 2014-2015 Rafael Staib (http://www.jquery-bootgrid.com)
* jQuery Bootgrid v1.3.1 - 04/07/2016
* Copyright (c) 2014-2016 Rafael Staib (http://www.jquery-bootgrid.com)
* Licensed under MIT http://www.opensource.org/licenses/MIT
*/
;(function ($, window, undefined)
Expand Down
6 changes: 0 additions & 6 deletions dist/jquery.bootgrid.fa.min.js

This file was deleted.

31 changes: 20 additions & 11 deletions dist/jquery.bootgrid.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* jQuery Bootgrid v1.3.1 - 09/11/2015
* Copyright (c) 2014-2015 Rafael Staib (http://www.jquery-bootgrid.com)
* jQuery Bootgrid v1.3.1 - 04/07/2016
* Copyright (c) 2014-2016 Rafael Staib (http://www.jquery-bootgrid.com)
* Licensed under MIT http://www.opensource.org/licenses/MIT
*/
;(function ($, window, undefined)
Expand Down Expand Up @@ -34,6 +34,20 @@
return false;
}

function appendRows(rows)
{
var that = this;

var appendenRows = rows.slice();
appendenRows.filter(function(item) {
return !(that.identifier && item[that.identifier] === this.rows[that.identifier]);
});

this.rows = this.rows.concat(appendenRows);

return appendenRows;
}

function findFooterAndHeaderItems(selector)
{
var footer = (this.footer) ? this.footer.find(selector) : $(),
Expand Down Expand Up @@ -274,6 +288,7 @@
var that = this,
rows = this.element.find("tbody > tr");

var convertedRows = [];
rows.each(function ()
{
var $this = $(this),
Expand All @@ -285,9 +300,10 @@
row[column.id] = column.converter.from(cells.eq(i).text());
});

appendRow.call(that, row);
convertedRows.push(row);
});

appendRows.call(that, convertedRows);
setTotals.call(this, this.rows.length);
sortRows.call(this);
}
Expand Down Expand Up @@ -1392,14 +1408,7 @@
}
else
{
var appendedRows = [];
for (var i = 0; i < rows.length; i++)
{
if (appendRow.call(this, rows[i]))
{
appendedRows.push(rows[i]);
}
}
var appendedRows = appendRows.call(this, rows);
sortRows.call(this);
highlightAppendedRows.call(this, appendedRows);
loadData.call(this);
Expand Down
5 changes: 0 additions & 5 deletions dist/jquery.bootgrid.min.css

This file was deleted.

6 changes: 0 additions & 6 deletions dist/jquery.bootgrid.min.js

This file was deleted.

18 changes: 17 additions & 1 deletion src/internal.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ function appendRow(row)
return false;
}

function appendRows(rows)
{
var that = this;

var appendenRows = rows.slice();
appendenRows.filter(function(item) {
return !(that.identifier && item[that.identifier] === this.rows[that.identifier]);
});

this.rows = this.rows.concat(appendenRows);

return appendenRows;
}

function findFooterAndHeaderItems(selector)
{
var footer = (this.footer) ? this.footer.find(selector) : $(),
Expand Down Expand Up @@ -264,6 +278,7 @@ function loadRows()
var that = this,
rows = this.element.find("tbody > tr");

var convertedRows = [];
rows.each(function ()
{
var $this = $(this),
Expand All @@ -275,9 +290,10 @@ function loadRows()
row[column.id] = column.converter.from(cells.eq(i).text());
});

appendRow.call(that, row);
convertedRows.push(row);
});

appendRows.call(that, convertedRows);
setTotals.call(this, this.rows.length);
sortRows.call(this);
}
Expand Down
9 changes: 1 addition & 8 deletions src/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,14 +433,7 @@ Grid.prototype.append = function(rows)
}
else
{
var appendedRows = [];
for (var i = 0; i < rows.length; i++)
{
if (appendRow.call(this, rows[i]))
{
appendedRows.push(rows[i]);
}
}
var appendedRows = appendRows.call(this, rows);
sortRows.call(this);
highlightAppendedRows.call(this, appendedRows);
loadData.call(this);
Expand Down