Clear unused code
This commit is contained in:
parent
b8f948f984
commit
9b98682005
1 changed files with 0 additions and 33 deletions
|
|
@ -1,39 +1,6 @@
|
|||
import Route from '@ember/routing/route';
|
||||
import { hash } from 'rsvp';
|
||||
|
||||
function attributeValue(key) {
|
||||
return function () {
|
||||
return {
|
||||
get() {
|
||||
return this.settings[key].includes(this.name);
|
||||
},
|
||||
|
||||
set(value) {
|
||||
if (value) {
|
||||
this.settings[key].addObject(this.name);
|
||||
} else {
|
||||
this.settings[key].removeObject(this.name);
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
class IndexAttribute {
|
||||
name;
|
||||
settings;
|
||||
|
||||
@attributeValue('displayedAttributes') displayed;
|
||||
@attributeValue('filterableAttributes') filterable;
|
||||
@attributeValue('searchableAttributes') searchable;
|
||||
@attributeValue('sortableAttributes') sortable;
|
||||
|
||||
constructor(name, settings) {
|
||||
this.name = name;
|
||||
this.settings = settings;
|
||||
}
|
||||
}
|
||||
|
||||
export default class AdminIndexesItemSettingsRoute extends Route {
|
||||
async model() {
|
||||
const index = this.modelFor('admin.indexes.item');
|
||||
|
|
|
|||
Loading…
Reference in a new issue