From a3bcfc15763f36097343958d132f7cc21fff55ad Mon Sep 17 00:00:00 2001 From: David Huynh Date: Mon, 8 Mar 2010 23:05:44 +0000 Subject: [PATCH] Implemented facets on cluster metrics in facet-based edit dialog. git-svn-id: http://google-refine.googlecode.com/svn/trunk@244 7d457c2a-affb-35e4-300a-418c747d4874 --- .../dialogs/facet-based-edit-dialog.js | 353 +++++++++++++++--- .../dialogs/facet-based-edit-dialog.css | 24 ++ 2 files changed, 316 insertions(+), 61 deletions(-) diff --git a/src/main/webapp/scripts/dialogs/facet-based-edit-dialog.js b/src/main/webapp/scripts/dialogs/facet-based-edit-dialog.js index ec21e0a83..e159ff329 100644 --- a/src/main/webapp/scripts/dialogs/facet-based-edit-dialog.js +++ b/src/main/webapp/scripts/dialogs/facet-based-edit-dialog.js @@ -5,6 +5,8 @@ function FacetBasedEditDialog(columnName, expression) { this._function = "fingerprint"; this._params = {}; + this._facets = []; + this._createDialog(); this._cluster(); } @@ -20,42 +22,49 @@ FacetBasedEditDialog.prototype._createDialog = function() { var html = $( '
' + - '
' + - '' + - '' + - '' + - '' + - '
' + - 'Method: ' + - '' + - '
Keying Function:
' + - '' + - '
' + - '' + - '' + - '' + - '
' + - '
' + + '
' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '
' + + 'Method: ' + + '' + + '
Keying Function:
' + + '' + + '
' + + '' + + '' + + '' + + '
' + + '
' + + '
' + '
' ).appendTo(body); @@ -117,7 +126,7 @@ FacetBasedEditDialog.prototype._createDialog = function() { $("#recon-dialog-tabs-strict").css("display", ""); }; -FacetBasedEditDialog.prototype._renderTable = function() { +FacetBasedEditDialog.prototype._renderTable = function(clusters) { var self = this; var container = this._elmts.tableContainer; @@ -125,10 +134,11 @@ FacetBasedEditDialog.prototype._renderTable = function() { var trHead = table.insertRow(table.rows.length); trHead.className = "header"; - $(trHead.insertCell(0)).text("Cluster size"); - $(trHead.insertCell(1)).text("Facet choices in Cluster"); - $(trHead.insertCell(2)).text("Edit?"); - $(trHead.insertCell(3)).text("New cell value"); + $(trHead.insertCell(0)).text("Cluster Size"); + $(trHead.insertCell(1)).text("Row Count"); + $(trHead.insertCell(2)).text("Values in Cluster"); + $(trHead.insertCell(3)).text("Edit?"); + $(trHead.insertCell(4)).text("New Cell Value"); var renderCluster = function(cluster) { var tr = table.insertRow(table.rows.length); @@ -136,17 +146,23 @@ FacetBasedEditDialog.prototype._renderTable = function() { $(tr.insertCell(0)).text(cluster.choices.length); - var ul = $(tr.insertCell(1)); + $(tr.insertCell(1)).text(cluster.rowCount); + + var ul = $('