diff --git a/src/util.js b/src/util.js index c6b00097..f390d994 100644 --- a/src/util.js +++ b/src/util.js @@ -3,17 +3,6 @@ var util = function() { var templates = { transformActions: '
  • Global transform...
  • ', - cellEditor: ' \ - \ - ', editPreview: ' \
    \ \ diff --git a/src/view-grid.js b/src/view-grid.js index 74f4a5f9..8660fb5a 100644 --- a/src/view-grid.js +++ b/src/view-grid.js @@ -260,6 +260,19 @@ my.GridRow = Backbone.View.extend({ // =================== // Cell Editor methods + + cellEditorTemplate: ' \ + \ + ', + onEditClick: function(e) { var editing = this.el.find('.data-table-cell-editor-editor'); if (editing.length > 0) { @@ -268,7 +281,8 @@ my.GridRow = Backbone.View.extend({ $(e.target).addClass("hidden"); var cell = $(e.target).siblings('.data-table-cell-value'); cell.data("previousContents", cell.text()); - util.render('cellEditor', cell, {value: cell.text()}); + var templated = $.mustache(this.cellEditorTemplate, {value: cell.text()}); + cell.html(templated); }, onEditorOK: function(e) {