[#13,refactor][xs]: move rendering of transform preview into view.js from costco.js.

* Resolves TODO from e23354eb4e451bb3171ed89e40a7ebe2e3ca927f.
This commit is contained in:
Rufus Pollock 2012-01-06 13:38:45 +00:00
parent 587a4fc3b9
commit 0b73a5ffbf
2 changed files with 3 additions and 3 deletions

View File

@ -25,8 +25,7 @@ var costco = function() {
preview.push({before: JSON.stringify(before), after: JSON.stringify(after)});
}
}
// TODO: 2012-01-05 Move this out of this function and up into (view) functions that call this
util.render('editPreview', 'expression-preview-container', {rows: preview});
return preview;
}
function mapDocs(docs, editFunc) {

View File

@ -469,7 +469,8 @@ my.ColumnTransform = Backbone.View.extend({
var docs = self.model.currentDocuments.map(function(doc) {
return doc.toJSON();
});
costco.previewTransform(docs, editFunc, self.state.currentColumn);
var previewData = costco.previewTransform(docs, editFunc, self.state.currentColumn);
util.render('editPreview', 'expression-preview-container', {rows: previewData});
} else {
errors.text(editFunc.errorMessage);
}