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

@@ -39,7 +39,6 @@ define(
function TableConfiguration(domainObject, telemetryFormatter) {
this.domainObject = domainObject;
this.columns = [];
this.columnConfiguration = {};
this.telemetryFormatter = telemetryFormatter;
}
@@ -145,30 +144,16 @@ define(
{}).columns || {};
};
function configEqual(obj1, obj2) {
var obj1Keys = Object.keys(obj1),
obj2Keys = Object.keys(obj2);
return (obj1Keys.length === obj2Keys.length) &&
obj1Keys.every(function (key) {
return obj1[key] === obj2[key];
});
}
/**
* Set the established configuration on the domain object. Will noop
* if configuration is unchanged
* Set the established configuration on the domain object
* @private
*/
TableConfiguration.prototype.saveColumnConfiguration = function (columnConfig) {
var self = this;
if (!configEqual(this.columnConfiguration, columnConfig)) {
this.domainObject.useCapability('mutation', function (model) {
model.configuration = model.configuration || {};
model.configuration.table = model.configuration.table || {};
model.configuration.table.columns = columnConfig;
self.columnConfiguration = columnConfig;
});
}
this.domainObject.useCapability('mutation', function (model) {
model.configuration = model.configuration || {};
model.configuration.table = model.configuration.table || {};
model.configuration.table.columns = columnConfig;
});
};
/**