diff --git a/src/UI/Cells/Edit/QualityCellEditor.js b/src/UI/Cells/Edit/QualityCellEditor.js index 2f238da38..934a36fa3 100644 --- a/src/UI/Cells/Edit/QualityCellEditor.js +++ b/src/UI/Cells/Edit/QualityCellEditor.js @@ -28,10 +28,12 @@ define( var templateName = self.template; self.schema = qualityProfileSchemaCollection.first(); - var selected = _.find(self.schema.get('available'), { 'id': self.model.get(self.column.get('name')).quality.id }); + var selected = _.find(self.schema.get('items'), function (model) { + return model.quality.id === self.model.get(self.column.get('name')).quality.id; + }); if (selected) { - selected.selected = true; + selected.quality.selected = true; } self.templateFunction = Marionette.TemplateCache.get(templateName); diff --git a/src/UI/Cells/Edit/QualityCellEditorTemplate.html b/src/UI/Cells/Edit/QualityCellEditorTemplate.html index 92d3bea99..4916cf284 100644 --- a/src/UI/Cells/Edit/QualityCellEditorTemplate.html +++ b/src/UI/Cells/Edit/QualityCellEditorTemplate.html @@ -1,7 +1,9 @@ -{{#each available}} - {{#if selected}} - - {{else}} - - {{/if}} +{{#each items}} + {{#with quality}} + {{#if selected}} + + {{else}} + + {{/if}} + {{/with}} {{/each}} \ No newline at end of file