').appendTo(this._elmts.facetContainer);
this._facets.push({
elmt: elmt,
- facet: new FacetBasedEditDialog.Facet(this, title, property, elmt, this._getBaseClusters())
+ facet: new ClusteringDialog.Facet(this, title, property, elmt, this._getBaseClusters())
});
};
-FacetBasedEditDialog.Facet = function(dialog, title, property, elmt, clusters) {
+ClusteringDialog.Facet = function(dialog, title, property, elmt, clusters) {
this._dialog = dialog;
this._property = property;
@@ -419,12 +429,12 @@ FacetBasedEditDialog.Facet = function(dialog, title, property, elmt, clusters) {
this._from = this._min;
this._to = this._max;
- elmt.addClass("facet-based-edit-dialog-facet");
+ elmt.addClass("clustering-dialog-facet");
var html = $(
- '' +
- '
' +
- '
' +
- '
'
+ '' +
+ '
' +
+ '
' +
+ '
'
).appendTo(elmt);
this._elmts = DOM.bind(html);
@@ -443,10 +453,10 @@ FacetBasedEditDialog.Facet = function(dialog, title, property, elmt, clusters) {
}
};
-FacetBasedEditDialog.Facet.prototype.dispose = function() {
+ClusteringDialog.Facet.prototype.dispose = function() {
};
-FacetBasedEditDialog.Facet.prototype.restrict = function(clusters) {
+ClusteringDialog.Facet.prototype.restrict = function(clusters) {
if (this._baseBins.length == 0 || (this._from == this._min && this._to == this._max)) {
return clusters;
}
@@ -462,7 +472,7 @@ FacetBasedEditDialog.Facet.prototype.restrict = function(clusters) {
return clusters2;
};
-FacetBasedEditDialog.Facet.prototype.update = function(clusters) {
+ClusteringDialog.Facet.prototype.update = function(clusters) {
if (this._baseBins.length == 0) {
return;
}
@@ -494,11 +504,11 @@ FacetBasedEditDialog.Facet.prototype.update = function(clusters) {
).appendTo(this._elmts.histogramContainer);
};
-FacetBasedEditDialog.Facet.prototype._setRangeIndicators = function() {
+ClusteringDialog.Facet.prototype._setRangeIndicators = function() {
this._elmts.selectionContainer.text(this._from + " to " + this._to);
};
-FacetBasedEditDialog.Facet.prototype._computeDistribution = function(clusters) {
+ClusteringDialog.Facet.prototype._computeDistribution = function(clusters) {
var bins = [];
for (var b = 0; b < this._binCount; b++) {
bins.push(0);
diff --git a/src/main/webapp/scripts/facets/list-facet.js b/src/main/webapp/scripts/facets/list-facet.js
index 3b0d7e4ef..eb0d5641e 100644
--- a/src/main/webapp/scripts/facets/list-facet.js
+++ b/src/main/webapp/scripts/facets/list-facet.js
@@ -238,7 +238,7 @@ ListFacet.prototype.render = function() {
};
ListFacet.prototype._doEdit = function() {
- new FacetBasedEditDialog(this._config.columnName, this._config.expression);
+ new ClusteringDialog(this._config.columnName, this._config.expression);
};
ListFacet.prototype._editChoice = function(choice, choiceDiv) {
diff --git a/src/main/webapp/scripts/facets/text-search-facet.js b/src/main/webapp/scripts/facets/text-search-facet.js
index 009d36e7c..8ea4820c5 100644
--- a/src/main/webapp/scripts/facets/text-search-facet.js
+++ b/src/main/webapp/scripts/facets/text-search-facet.js
@@ -45,10 +45,14 @@ TextSearchFacet.prototype._initializeUI = function() {
var headerDiv = $('
').addClass("facet-title").appendTo(container);
$('
').text(this._config.name).appendTo(headerDiv);
- var removeButton = $('
').addClass("facet-choice-link").text("remove").click(function() {
- self._remove();
- }).prependTo(headerDiv);
-
+ var removeButton = $('
')
+ .attr("src", "images/close.png")
+ .attr("title", "Remove this facet")
+ .addClass("facet-choice-link")
+ .click(function() {
+ self._remove();
+ }).prependTo(headerDiv);
+
var bodyDiv = $('
').addClass("facet-text-body").appendTo(container);
var input = $('
').appendTo(bodyDiv);
diff --git a/src/main/webapp/scripts/views/data-table-column-header-ui.js b/src/main/webapp/scripts/views/data-table-column-header-ui.js
index df34dea9e..941ec6119 100644
--- a/src/main/webapp/scripts/views/data-table-column-header-ui.js
+++ b/src/main/webapp/scripts/views/data-table-column-header-ui.js
@@ -263,7 +263,7 @@ DataTableColumnHeaderUI.prototype._createMenuForColumnHeader = function(elmt) {
{},
{
label: "Cluster & Edit ...",
- click: function() { new FacetBasedEditDialog(self._column.name, "value"); }
+ click: function() { new ClusteringDialog(self._column.name, "value"); }
}
]
},
diff --git a/src/main/webapp/styles/dialogs/clustering-dialog.css b/src/main/webapp/styles/dialogs/clustering-dialog.css
new file mode 100644
index 000000000..285f1c755
--- /dev/null
+++ b/src/main/webapp/styles/dialogs/clustering-dialog.css
@@ -0,0 +1,72 @@
+.clustering-dialog-table-container {
+ height: 500px;
+ overflow: auto;
+ border: 1px solid #aaa;
+}
+
+table.clustering-dialog-entry-table {
+ border-collapse: collapse;
+ width: 100%;
+}
+
+table.clustering-dialog-entry-table > tbody > tr.header {
+ background: #ccc;
+ font-weight: bold;
+}
+
+table.clustering-dialog-entry-table > tbody > tr > td {
+ padding: 2px 5px;
+}
+
+table.clustering-dialog-entry-table > tbody > tr.odd > td {
+ background: #eee;
+}
+
+table.clustering-dialog-entry-table > tbody > tr.even > td {
+ background: white;
+}
+
+table.clustering-dialog-entry-table input {
+ border: 1px solid #ccc;
+ padding: 0 0.1em;
+}
+
+table.clustering-dialog-entry-table a {
+ text-decoration: none;
+}
+
+table.clustering-dialog-entry-table a:hover {
+ text-decoration: underline
+}
+
+.clustering-dialog-entry-count {
+ color: #aaa;
+ margin-left: 0.5em;
+}
+
+.clustering-dialog-controls {
+ margin-bottom: 0.5em;
+}
+
+.clustering-dialog-controls td {
+ padding-right: 0.5em;
+}
+
+
+.clustering-dialog-facet {
+ margin-bottom: 1em;
+}
+.clustering-dialog-facet-header {
+ font-weight: bold;
+}
+.clustering-dialog-facet-histogram {
+ margin: 10px 8px 5px 8px;
+ height: 52px;
+}
+.clustering-dialog-facet-slider {
+ margin: 5px;
+}
+.clustering-dialog-facet-selection {
+ text-align: center;
+ color: #888;
+}
\ No newline at end of file
diff --git a/src/main/webapp/styles/dialogs/facet-based-edit-dialog.css b/src/main/webapp/styles/dialogs/facet-based-edit-dialog.css
deleted file mode 100644
index 6749045af..000000000
--- a/src/main/webapp/styles/dialogs/facet-based-edit-dialog.css
+++ /dev/null
@@ -1,72 +0,0 @@
-.facet-based-edit-dialog-table-container {
- height: 500px;
- overflow: auto;
- border: 1px solid #aaa;
-}
-
-table.facet-based-edit-dialog-entry-table {
- border-collapse: collapse;
- width: 100%;
-}
-
-table.facet-based-edit-dialog-entry-table > tbody > tr.header {
- background: #ccc;
- font-weight: bold;
-}
-
-table.facet-based-edit-dialog-entry-table > tbody > tr > td {
- padding: 2px 5px;
-}
-
-table.facet-based-edit-dialog-entry-table > tbody > tr.odd > td {
- background: #eee;
-}
-
-table.facet-based-edit-dialog-entry-table > tbody > tr.even > td {
- background: white;
-}
-
-table.facet-based-edit-dialog-entry-table input {
- border: 1px solid #ccc;
- padding: 0 0.1em;
-}
-
-table.facet-based-edit-dialog-entry-table a {
- text-decoration: none;
-}
-
-table.facet-based-edit-dialog-entry-table a:hover {
- text-decoration: underline
-}
-
-.facet-based-edit-dialog-entry-count {
- color: #aaa;
- margin-left: 0.5em;
-}
-
-.facet-based-edit-dialog-controls {
- margin-bottom: 0.5em;
-}
-
-.facet-based-edit-dialog-controls td {
- padding-right: 0.5em;
-}
-
-
-.facet-based-edit-dialog-facet {
- margin-bottom: 1em;
-}
-.facet-based-edit-dialog-facet-header {
- font-weight: bold;
-}
-.facet-based-edit-dialog-facet-histogram {
- margin: 10px 8px 5px 8px;
- height: 52px;
-}
-.facet-based-edit-dialog-facet-slider {
- margin: 5px;
-}
-.facet-based-edit-dialog-facet-selection {
- text-align: center;
- color: #888;
-}
\ No newline at end of file