diff --git a/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js b/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js
index 4b3951f81..5f08a4793 100644
--- a/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js
+++ b/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js
@@ -23,8 +23,8 @@ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -37,9 +37,9 @@ function ClusteringDialog(columnName, expression) {
this._method = "binning";
this._function = "fingerprint";
this._params = {};
-
+
this._facets = [];
-
+
this._createDialog();
this._cluster();
}
@@ -50,7 +50,7 @@ ClusteringDialog.prototype._createDialog = function() {
this._elmts = DOM.bind(dialog);
this._elmts.dialogHeader.text($.i18n._('core-dialogs')["cluster-edit"]+' "' + this._columnName + '"');
-
+
this._elmts.or_dialog_descr.html($.i18n._('core-dialogs')["cluster-descr"]);
this._elmts.or_dialog_findMore.html($.i18n._('core-dialogs')["find-more"]);
this._elmts.or_dialog_method.html($.i18n._('core-dialogs')["method"]);
@@ -66,13 +66,13 @@ ClusteringDialog.prototype._createDialog = function() {
this._elmts.or_dialog_ppm.html($.i18n._('core-dialogs')["ppm"]);
this._elmts.or_dialog_ngramSize.html($.i18n._('core-dialogs')["ngram-size"]);
this._elmts.or_dialog_radius.html($.i18n._('core-dialogs')["ngram-radius"]);
- this._elmts.or_dialog_blockChars.html($.i18n._('core-dialogs')["block-chars"]);
+ this._elmts.or_dialog_blockChars.html($.i18n._('core-dialogs')["block-chars"]);
this._elmts.selectAllButton.html($.i18n._('core-buttons')["select-all"]);
this._elmts.deselectAllButton.html($.i18n._('core-buttons')["unselect-all"]);
this._elmts.applyReClusterButton.html($.i18n._('core-buttons')["merge-cluster"]);
this._elmts.applyCloseButton.html($.i18n._('core-buttons')["merge-close"]);
this._elmts.closeButton.html($.i18n._('core-buttons')["close"]);
-
+
this._elmts.methodSelector.change(function() {
var selection = $(this).find("option:selected").text();
if (selection == $.i18n._('core-dialogs')["key-collision"]) {
@@ -87,55 +87,55 @@ ClusteringDialog.prototype._createDialog = function() {
self._elmts.distanceFunctionSelector.change();
}
});
-
+
var changer = function() {
- self._function = $(this).find("option:selected").text();
+ self._function = $(this).find("option:selected").val();
$(".function-params").hide();
$("#" + self._function + "-params").show();
params_changer();
};
-
+
this._elmts.keyingFunctionSelector.change(changer);
this._elmts.distanceFunctionSelector.change(changer);
-
+
var params_changer = function() {
self._params = {};
$(".dialog-body input.param:visible").each(function() {
var e = $(this);
var name = e.attr('name');
var datatype = e.attr('datatype') || 'string';
- var value = e.val();
+ var value = e.val();
if (datatype == 'int') {
value = parseInt(value,10);
} else if (datatype == 'float') {
value = parseFloat(value);
- }
+ }
self._params[name] = value;
});
self._cluster();
};
-
+
this._elmts.ngramSize.change(params_changer);
this._elmts.radius.change(params_changer);
this._elmts.ngramBlock.change(params_changer);
-
+
this._elmts.selectAllButton.click(function() { self._selectAll(); });
this._elmts.deselectAllButton.click(function() { self._deselectAll(); });
this._elmts.applyReClusterButton.click(function() { self._onApplyReCluster(); });
this._elmts.applyCloseButton.click(function() { self._onApplyClose(); });
this._elmts.closeButton.click(function() { self._dismiss(); });
-
+
this._level = DialogSystem.showDialog(dialog);
};
ClusteringDialog.prototype._renderTable = function(clusters) {
var self = this;
-
+
var container = this._elmts.tableContainer;
-
+
if (clusters.length > 0) {
var table = $('