Revert "Merge remote-tracking branch 'origin/open793'"
This reverts commitf49552779a, reversing changes made toe068173f3e.
This commit is contained in:
@@ -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;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user