Revert "Merge remote-tracking branch 'origin/open793'"

This reverts commit f49552779a, reversing
changes made to e068173f3e.
This commit is contained in:
Pete Richards
2016-03-31 16:30:35 -07:00
parent f49552779a
commit d35fccbbe8
6 changed files with 100 additions and 187 deletions

View File

@@ -67,8 +67,8 @@ define(
$scope.$watchCollection('filters', function () {
self.updateRows($scope.rows);
});
$scope.$watch('rows', this.updateRows.bind(this));
$scope.$watch('headers', this.updateHeaders.bind(this));
$scope.$watch('rows', this.updateRows.bind(this));
/*
* Listen for rows added individually (eg. for real-time tables)
@@ -101,19 +101,13 @@ define(
*/
MCTTableController.prototype.newRow = function (event, rowIndex) {
var row = this.$scope.rows[rowIndex];
//If rows.length === 1 we need to calculate column widths etc.
// so do the updateRows logic, rather than the 'add row' logic
if (this.$scope.rows.length === 1){
this.updateRows(this.$scope.rows);
} else {
//Add row to the filtered, sorted list of all rows
if (this.filterRows([row]).length > 0) {
this.insertSorted(this.$scope.displayRows, row);
}
this.$timeout(this.setElementSizes.bind(this))
.then(this.scrollToBottom.bind(this));
//Add row to the filtered, sorted list of all rows
if (this.filterRows([row]).length > 0) {
this.insertSorted(this.$scope.displayRows, row);
}
this.$timeout(this.setElementSizes.bind(this))
.then(this.scrollToBottom.bind(this));
};
/**