RandomSec/main/webapp/modules/core/scripts/project/summary-widget.js
James Home d6015f783c first round of UI improvements:
- new front page
- new header
- improved about and preference pages
- new project tabs and header
- new buttons
- new logos



git-svn-id: http://google-refine.googlecode.com/svn/trunk@1533 7d457c2a-affb-35e4-300a-418c747d4874
2010-10-14 17:39:41 +00:00

21 lines
680 B
JavaScript

function SummaryWidget(div) {
this._div = div;
this._initializeUI();
}
SummaryWidget.prototype._initializeUI = function() {
};
SummaryWidget.prototype.updateResultCount = function() {
var summaryText;
var units = theProject.rowModel.mode == "row-based" ? "rows" : "records";
if (theProject.rowModel.filtered == theProject.rowModel.total) {
summaryText = (theProject.rowModel.total) + ' ' + units;
} else {
summaryText = (theProject.rowModel.filtered) + ' matching ' + units + ' <span id="summary-total">(' + (theProject.rowModel.total) + ' total)</span>';
}
$('<span>').html(summaryText).appendTo(this._div.empty());
};