diff --git a/src/main/webapp/about.html b/src/main/webapp/about.html new file mode 100644 index 000000000..2d0be673d --- /dev/null +++ b/src/main/webapp/about.html @@ -0,0 +1 @@ + About Gridworks

Gridworks

Credits

Special Thanks

\ No newline at end of file diff --git a/src/main/webapp/project.html b/src/main/webapp/project.html index 122f1a955..871bbb5f0 100644 --- a/src/main/webapp/project.html +++ b/src/main/webapp/project.html @@ -1 +1 @@ - Gridworks
starting up ...
\ No newline at end of file + Gridworks
starting up ...
\ No newline at end of file diff --git a/src/main/webapp/scripts/dialogs/facet-based-edit-dialog.js b/src/main/webapp/scripts/dialogs/clustering-dialog.js similarity index 72% rename from src/main/webapp/scripts/dialogs/facet-based-edit-dialog.js rename to src/main/webapp/scripts/dialogs/clustering-dialog.js index ff6d405f1..9408e579c 100644 --- a/src/main/webapp/scripts/dialogs/facet-based-edit-dialog.js +++ b/src/main/webapp/scripts/dialogs/clustering-dialog.js @@ -1,4 +1,4 @@ -function FacetBasedEditDialog(columnName, expression) { +function ClusteringDialog(columnName, expression) { this._columnName = columnName; this._expression = expression; this._method = "binning"; @@ -11,7 +11,7 @@ function FacetBasedEditDialog(columnName, expression) { this._cluster(); } -FacetBasedEditDialog.prototype._createDialog = function() { +ClusteringDialog.prototype._createDialog = function() { var self = this; var frame = DialogSystem.createDialog(); frame.width("900px"); @@ -62,7 +62,7 @@ FacetBasedEditDialog.prototype._createDialog = function() { '' + '' + '' + - '
' + + '
' + '' + '' + '' + @@ -133,75 +133,85 @@ FacetBasedEditDialog.prototype._createDialog = function() { $("#recon-dialog-tabs-strict").css("display", ""); }; -FacetBasedEditDialog.prototype._renderTable = function(clusters) { +ClusteringDialog.prototype._renderTable = function(clusters) { var self = this; var container = this._elmts.tableContainer; - var table = $('
').addClass("facet-based-edit-dialog-entry-table")[0]; - var trHead = table.insertRow(table.rows.length); - trHead.className = "header"; - $(trHead.insertCell(0)).text("Cluster Size"); - $(trHead.insertCell(1)).text("Row Count"); - $(trHead.insertCell(2)).text("Values in Cluster"); - $(trHead.insertCell(3)).text("Merge?"); - $(trHead.insertCell(4)).text("New Cell Value"); - - var renderCluster = function(cluster) { - var tr = table.insertRow(table.rows.length); - tr.className = table.rows.length % 2 == 0 ? "odd" : "even"; + if (clusters.length > 0) { + var table = $('
').addClass("clustering-dialog-entry-table")[0]; - $(tr.insertCell(0)).text(cluster.choices.length); + var trHead = table.insertRow(table.rows.length); + trHead.className = "header"; + $(trHead.insertCell(0)).text("Cluster Size"); + $(trHead.insertCell(1)).text("Row Count"); + $(trHead.insertCell(2)).text("Values in Cluster"); + $(trHead.insertCell(3)).text("Merge?"); + $(trHead.insertCell(4)).text("New Cell Value"); + + var renderCluster = function(cluster) { + var tr = table.insertRow(table.rows.length); + tr.className = table.rows.length % 2 == 0 ? "odd" : "even"; + + $(tr.insertCell(0)).text(cluster.choices.length); + + $(tr.insertCell(1)).text(cluster.rowCount); + + var ul = $(''); + var choices = cluster.choices; + var rowCount = 0; + for (var c = 0; c < choices.length; c++) { + var choice = choices[c]; + var li = $('
  • '); + $('').text(choice.v).click(function() { + var parent = $(this).closest("tr"); + parent.find("input[type='text']").val($(this).text()); + parent.find("input:not(:checked)").attr('checked', true).change(); + return false; + }).appendTo(li); + $('').text("(" + choice.c + " rows)").addClass("clustering-dialog-entry-count").appendTo(li); + rowCount += choice.c; + li.appendTo(ul); + } + $(tr.insertCell(2)).append(ul); + + var editCheck = $('') + .change(function() { + cluster.edit = !cluster.edit; + }).appendTo(tr.insertCell(3)); + + if (cluster.edit) { + editCheck.attr("checked", "true"); + } + + var input = $('') + .attr("value", cluster.value) + .keyup(function() { + cluster.value = this.value; + }).appendTo(tr.insertCell(4)); + }; - $(tr.insertCell(1)).text(cluster.rowCount); - - var ul = $('