From 4d893271cab356dd5b0237152382d1fb17059425 Mon Sep 17 00:00:00 2001 From: David Huynh Date: Fri, 5 Mar 2010 01:42:21 +0000 Subject: [PATCH] Fixed minor bug in cell UI that prevented single recon judgment operation from updating the UI. Minor optimization: inject main table into the DOM only after it's completely built. git-svn-id: http://google-refine.googlecode.com/svn/trunk@204 7d457c2a-affb-35e4-300a-418c747d4874 --- src/main/webapp/scripts/views/data-table-cell-ui.js | 2 +- src/main/webapp/scripts/views/data-table-view.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/scripts/views/data-table-cell-ui.js b/src/main/webapp/scripts/views/data-table-cell-ui.js index c6c616942..4b07f38a0 100644 --- a/src/main/webapp/scripts/views/data-table-cell-ui.js +++ b/src/main/webapp/scripts/views/data-table-cell-ui.js @@ -233,7 +233,7 @@ DataTableCellUI.prototype._postProcessOneCell = function(command, params, column { columnStatsChanged: columnStatsChanged }, { onDone: function(o) { - self._cell = data.cell; + self._cell = o.cell; self._render(); } } diff --git a/src/main/webapp/scripts/views/data-table-view.js b/src/main/webapp/scripts/views/data-table-view.js index ca55b32b8..b79302e0d 100644 --- a/src/main/webapp/scripts/views/data-table-view.js +++ b/src/main/webapp/scripts/views/data-table-view.js @@ -85,8 +85,7 @@ DataTableView.prototype.render = function() { var table = document.createElement("table"); $(table) .attr("cellspacing", "0") - .addClass("data-table") - .appendTo(tableDiv); + .addClass("data-table"); var columns = theProject.columnModel.columns; var columnGroups = theProject.columnModel.columnGroups; @@ -258,6 +257,11 @@ DataTableView.prototype.render = function() { } renderRow(tr, r, row, even); } + + /* + * Finally, inject the table into the DOM + */ + $(table).appendTo(tableDiv); }; DataTableView.prototype._showRows = function(start, onDone) {