[#13,refactor][xs]: move rendering of transform preview into view.js from costco.js.
* Resolves TODO from e23354eb4e.
This commit is contained in:
@@ -25,8 +25,7 @@ var costco = function() {
|
|||||||
preview.push({before: JSON.stringify(before), after: JSON.stringify(after)});
|
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
|
return preview;
|
||||||
util.render('editPreview', 'expression-preview-container', {rows: preview});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function mapDocs(docs, editFunc) {
|
function mapDocs(docs, editFunc) {
|
||||||
|
|||||||
@@ -469,7 +469,8 @@ my.ColumnTransform = Backbone.View.extend({
|
|||||||
var docs = self.model.currentDocuments.map(function(doc) {
|
var docs = self.model.currentDocuments.map(function(doc) {
|
||||||
return doc.toJSON();
|
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 {
|
} else {
|
||||||
errors.text(editFunc.errorMessage);
|
errors.text(editFunc.errorMessage);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user