2010-10-17 08:23:58 +02:00
|
|
|
function SummaryBar(div) {
|
2010-10-06 21:15:29 +02:00
|
|
|
this._div = div;
|
|
|
|
this._initializeUI();
|
|
|
|
}
|
|
|
|
|
2010-10-17 08:23:58 +02:00
|
|
|
SummaryBar.prototype._initializeUI = function() {
|
2010-10-06 21:15:29 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2010-10-17 08:23:58 +02:00
|
|
|
SummaryBar.prototype.updateResultCount = function() {
|
2010-10-06 21:15:29 +02:00
|
|
|
var summaryText;
|
|
|
|
var units = theProject.rowModel.mode == "row-based" ? "rows" : "records";
|
|
|
|
if (theProject.rowModel.filtered == theProject.rowModel.total) {
|
2010-10-14 19:39:41 +02:00
|
|
|
summaryText = (theProject.rowModel.total) + ' ' + units;
|
2010-10-06 21:15:29 +02:00
|
|
|
} else {
|
2010-10-14 19:39:41 +02:00
|
|
|
summaryText = (theProject.rowModel.filtered) + ' matching ' + units + ' <span id="summary-total">(' + (theProject.rowModel.total) + ' total)</span>';
|
2010-10-06 21:15:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
$('<span>').html(summaryText).appendTo(this._div.empty());
|
|
|
|
};
|