diff --git a/src/main/webapp/scripts/dialogs/expression-preview-dialog.js b/src/main/webapp/scripts/dialogs/expression-preview-dialog.js index 70fbf4a17..5caebf840 100644 --- a/src/main/webapp/scripts/dialogs/expression-preview-dialog.js +++ b/src/main/webapp/scripts/dialogs/expression-preview-dialog.js @@ -274,7 +274,7 @@ ExpressionPreviewDialog.Widget.prototype._renderExpressionHistory = function(dat }; ExpressionPreviewDialog.Widget.prototype._scheduleUpdate = function() { - if (this._timerID != null) { + if (this._timerID !== null) { window.clearTimeout(this._timerID); } var self = this; @@ -332,7 +332,7 @@ ExpressionPreviewDialog.Widget.prototype._renderPreview = function(expression, d } }; - if (this._results != null) { + if (this._results !== null) { this._elmts.expressionPreviewErrorContainer.empty(); } else { var message = (data.type == "parser") ? data.message : "Internal error"; @@ -347,7 +347,7 @@ ExpressionPreviewDialog.Widget.prototype._renderPreview = function(expression, d renderValue($(tr.insertCell(1)), this._values[i]); var tdValue = $(tr.insertCell(2)); - if (this._results != null) { + if (this._results !== null) { var v = this._results[i]; renderValue(tdValue, v); } diff --git a/src/main/webapp/scripts/dialogs/extend-data-preview-dialog.js b/src/main/webapp/scripts/dialogs/extend-data-preview-dialog.js index 158d350e3..075f70dc4 100644 --- a/src/main/webapp/scripts/dialogs/extend-data-preview-dialog.js +++ b/src/main/webapp/scripts/dialogs/extend-data-preview-dialog.js @@ -351,7 +351,7 @@ ExtendDataPreviewDialog.prototype._renderPreview = function(data) { for (var c = 0; c < row.length; c++) { var td = tr.insertCell(tr.cells.length); var cell = row[c]; - if (cell != null) { + if (cell !== null) { if ($.isPlainObject(cell)) { $('').attr("href", "http://www.freebase.com/view" + cell.id).text(cell.name).appendTo(td); } else { diff --git a/src/main/webapp/scripts/dialogs/recon-dialog.js b/src/main/webapp/scripts/dialogs/recon-dialog.js index 362c6c714..9f68e88ec 100644 --- a/src/main/webapp/scripts/dialogs/recon-dialog.js +++ b/src/main/webapp/scripts/dialogs/recon-dialog.js @@ -224,7 +224,7 @@ ReconDialog.prototype._onDoHeuristic = function() { var type = this._elmts.heuristicTypeInput.data("data.suggest"); var choices = $('input[name="recon-dialog-type-choice"]:checked'); - if (choices != null && choices.length > 0 && choices[0].value != "") { + if (choices !== null && choices.length > 0 && choices[0].value != "") { type = { id: choices[0].value, name: choices.attr("typeName") @@ -238,7 +238,7 @@ ReconDialog.prototype._onDoHeuristic = function() { var propertyInputs = $('input[name="recon-dialog-heuristic-property"]'); $.each(propertyInputs, function() { var property = $(this).data("data.suggest"); - if (property != null) { + if (property !== null) { columnDetails.push({ column: this.getAttribute("columnName"), property: { diff --git a/src/main/webapp/scripts/facets/list-facet.js b/src/main/webapp/scripts/facets/list-facet.js index e9b15b69b..bb96e5458 100644 --- a/src/main/webapp/scripts/facets/list-facet.js +++ b/src/main/webapp/scripts/facets/list-facet.js @@ -47,8 +47,8 @@ ListFacet.prototype.getJSON = function() { omitBlank: "omitBlank" in this._config ? this._config.omitBlank : false, omitError: "omitError" in this._config ? this._config.omitError : false, selection: [], - selectBlank: this._blankChoice != null && this._blankChoice.s, - selectError: this._errorChoice != null && this._errorChoice.s + selectBlank: this._blankChoice !== null && this._blankChoice.s, + selectError: this._errorChoice !== null && this._errorChoice.s }; for (var i = 0; i < this._selection.length; i++) { var choice = { @@ -61,8 +61,8 @@ ListFacet.prototype.getJSON = function() { ListFacet.prototype.hasSelection = function() { return this._selection.length > 0 || - (this._blankChoice != null && this._blankChoice.s) || - (this._errorChoice != null && this._errorChoice.s); + (this._blankChoice !== null && this._blankChoice.s) || + (this._errorChoice !== null && this._errorChoice.s); }; ListFacet.prototype.updateState = function(data) { @@ -132,8 +132,8 @@ ListFacet.prototype.render = function() { bodyDiv.appendTo(container); } else { var selectionCount = this._selection.length - + (this._blankChoice != null && this._blankChoice.s ? 1 : 0) - + (this._errorChoice != null && this._errorChoice.s ? 1 : 0); + + (this._blankChoice !== null && this._blankChoice.s ? 1 : 0) + + (this._errorChoice !== null && this._errorChoice.s ? 1 : 0); if (selectionCount > 0) { var reset = function() { @@ -207,10 +207,10 @@ ListFacet.prototype.render = function() { for (var i = 0; i < choices.length; i++) { renderChoice(choices[i]); } - if (this._blankChoice != null) { + if (this._blankChoice !== null) { renderChoice(this._blankChoice, "(blank)"); } - if (this._errorChoice != null) { + if (this._errorChoice !== null) { renderChoice(this._errorChoice, "(error)"); } @@ -342,10 +342,10 @@ ListFacet.prototype._editChoice = function(choice, choiceDiv) { ListFacet.prototype._select = function(choice, only) { if (only) { this._selection = []; - if (this._blankChoice != null) { + if (this._blankChoice !== null) { this._blankChoice.s = false; } - if (this._errorChoice != null) { + if (this._errorChoice !== null) { this._errorChoice.s = false; } } diff --git a/src/main/webapp/scripts/facets/range-facet.js b/src/main/webapp/scripts/facets/range-facet.js index 45070281e..6d2094a5a 100644 --- a/src/main/webapp/scripts/facets/range-facet.js +++ b/src/main/webapp/scripts/facets/range-facet.js @@ -72,12 +72,12 @@ RangeFacet.prototype.getJSON = function() { }; if (this._config.mode == "min" || this._config.mode == "range") { - if (this._from != null) { + if (this._from !== null) { o.from = this._from; } } if (this._config.mode == "max" || this._config.mode == "range") { - if (this._to != null) { + if (this._to !== null) { o.to = this._to; } } @@ -92,12 +92,12 @@ RangeFacet.prototype.hasSelection = function() { switch (this._config.mode) { case "min": - return this._from != null && (!this._initializedUI || this._from > this._config.min); + return this._from !== null && (!this._initializedUI || this._from > this._config.min); case "max": - return this._to != null && (!this._initializedUI || this._to < this._config.max); + return this._to !== null && (!this._initializedUI || this._to < this._config.max); default: - return (this._from != null && (!this._initializedUI || this._from > this._config.min)) || - (this._to != null && (!this._initializedUI || this._to < this._config.max)); + return (this._from !== null && (!this._initializedUI || this._from > this._config.min)) || + (this._to !== null && (!this._initializedUI || this._to < this._config.max)); } }; diff --git a/src/main/webapp/scripts/facets/text-search-facet.js b/src/main/webapp/scripts/facets/text-search-facet.js index da1125640..3a190bcfe 100644 --- a/src/main/webapp/scripts/facets/text-search-facet.js +++ b/src/main/webapp/scripts/facets/text-search-facet.js @@ -40,7 +40,7 @@ TextSearchFacet.prototype.getJSON = function() { }; TextSearchFacet.prototype.hasSelection = function() { - return this._query != null; + return this._query !== null; }; TextSearchFacet.prototype._initializeUI = function() { @@ -70,13 +70,13 @@ TextSearchFacet.prototype._initializeUI = function() { elmts.caseSensitiveCheckbox.bind("change", function() { self._config.caseSensitive = this.checked; - if (self._query != null && self._query.length > 0) { + if (self._query !== null && self._query.length > 0) { self._scheduleUpdate(); } }); elmts.regexCheckbox.bind("change", function() { self._config.mode = this.checked ? "regex" : "text"; - if (self._query != null && self._query.length > 0) { + if (self._query !== null && self._query.length > 0) { self._scheduleUpdate(); } }); diff --git a/src/main/webapp/scripts/project/process-widget.js b/src/main/webapp/scripts/project/process-widget.js index a8489419f..a9311a197 100644 --- a/src/main/webapp/scripts/project/process-widget.js +++ b/src/main/webapp/scripts/project/process-widget.js @@ -39,7 +39,7 @@ ProcessWidget.prototype.update = function(updateOptions, onDone) { this._onDones.push(onDone); } - if (this._timerID != null) { + if (this._timerID !== null) { return; } @@ -71,7 +71,7 @@ ProcessWidget.prototype.showUndo = function(historyEntry) { }; ProcessWidget.prototype.undo = function() { - if (this._latestHistoryEntry != null) { + if (this._latestHistoryEntry !== null) { Gridworks.postProcess( "undo-redo", { undoID: this._latestHistoryEntry.id }, diff --git a/src/main/webapp/scripts/protograph/schema-alignment-ui-link.js b/src/main/webapp/scripts/protograph/schema-alignment-ui-link.js index 947393dc5..6d6180f94 100644 --- a/src/main/webapp/scripts/protograph/schema-alignment-ui-link.js +++ b/src/main/webapp/scripts/protograph/schema-alignment-ui-link.js @@ -46,7 +46,7 @@ SchemaAlignmentDialog.UILink = function(dialog, link, table, options, parentUINo SchemaAlignmentDialog.UILink.prototype._renderMain = function() { $(this._tdMain).empty(); - var label = this._link.property != null ? this._link.property.id : "property?"; + var label = this._link.property !== null ? this._link.property.id : "property?"; var self = this; @@ -93,10 +93,10 @@ SchemaAlignmentDialog.UILink.prototype._renderDetails = function() { SchemaAlignmentDialog.UILink.prototype._startEditProperty = function(elmt) { var sourceTypeID = this._parentUINode.getExpectedType(); - var targetTypeID = "type" in this._link.target && this._link.target.type != null ? this._link.target.type.id : null; + var targetTypeID = "type" in this._link.target && this._link.target.type !== null ? this._link.target.type.id : null; var targetTypeName = "columnName" in this._link.target ? this._link.target.columnName : null; - if (sourceTypeID != null) { + if (sourceTypeID !== null) { var self = this; var dismissBusy = DialogSystem.showBusy(); @@ -299,7 +299,7 @@ SchemaAlignmentDialog.UILink.prototype._showPropertySuggestPopup = function(elmt var suggestOptions = { type : '/type/property' }; - if (this._link.target != null && "type" in this._link.target && this._link.target.type != null) { + if (this._link.target !== null && "type" in this._link.target && this._link.target.type !== null) { /* suggestOptions.mql_filter = [{ "/type/property/expected_type" : { @@ -309,7 +309,7 @@ SchemaAlignmentDialog.UILink.prototype._showPropertySuggestPopup = function(elmt */ } else { var sourceTypeID = this._parentUINode.getExpectedType(); - if (sourceTypeID != null) { + if (sourceTypeID !== null) { suggestOptions.schema = sourceTypeID; } } @@ -319,11 +319,11 @@ SchemaAlignmentDialog.UILink.prototype._showPropertySuggestPopup = function(elmt }; SchemaAlignmentDialog.UILink.prototype.getJSON = function() { - if ("property" in this._link && this._link.property != null && - "target" in this._link && this._link.target != null) { + if ("property" in this._link && this._link.property !== null && + "target" in this._link && this._link.target !== null) { var targetJSON = this._targetUI.getJSON(); - if (targetJSON != null) { + if (targetJSON !== null) { return { property: cloneDeep(this._link.property), target: targetJSON diff --git a/src/main/webapp/scripts/protograph/schema-alignment-ui-node.js b/src/main/webapp/scripts/protograph/schema-alignment-ui-node.js index e5c96d7d5..f2c0da273 100644 --- a/src/main/webapp/scripts/protograph/schema-alignment-ui-node.js +++ b/src/main/webapp/scripts/protograph/schema-alignment-ui-node.js @@ -152,7 +152,7 @@ SchemaAlignmentDialog.UINode.prototype._renderDetails = function() { this._tableLinks = $('
').addClass("schema-alignment-table-layout").appendTo(this._expandedDetailDiv)[0]; - if ("links" in this._node && this._node.links != null) { + if ("links" in this._node && this._node.links !== null) { for (var i = 0; i < this._node.links.length; i++) { this._linkUIs.push(new SchemaAlignmentDialog.UILink( this._dialog, @@ -614,7 +614,7 @@ SchemaAlignmentDialog.UINode.prototype._showNodeConfigDialog = function() { $('').html("  OK  ").click(function() { var node = getResultJSON(); - if (node != null) { + if (node !== null) { DialogSystem.dismissUntil(level - 1); self._node = node; @@ -701,7 +701,7 @@ SchemaAlignmentDialog.UINode.prototype.getJSON = function() { var links = []; for (var i = 0; i < this._linkUIs.length; i++) { var link = this._linkUIs[i].getJSON(); - if (link != null) { + if (link !== null) { links.push(link); } } diff --git a/src/main/webapp/scripts/protograph/schema-alignment.js b/src/main/webapp/scripts/protograph/schema-alignment.js index b17ff926c..16d555d9f 100644 --- a/src/main/webapp/scripts/protograph/schema-alignment.js +++ b/src/main/webapp/scripts/protograph/schema-alignment.js @@ -10,7 +10,7 @@ SchemaAlignment.autoAlign = function() { for (var c = 0; c < columns.length; c++) { var column = columns[c]; - var typed = "reconConfig" in column && column.reconConfig != null; + var typed = "reconConfig" in column && column.reconConfig !== null; var candidate = { status: "unbound", typed: typed, @@ -101,7 +101,7 @@ SchemaAlignment.createNewRootNode = function() { columnName: column.name, createForNoReconMatch: true }; - if ("reconConfig" in column && column.reconConfig != null) { + if ("reconConfig" in column && column.reconConfig !== null) { target.type = { id: column.reconConfig.type.id, name: column.reconConfig.type.name @@ -239,7 +239,7 @@ SchemaAlignmentDialog.prototype.getJSON = function() { var rootNodes = []; for (var i = 0; i < this._nodeUIs.length; i++) { var node = this._nodeUIs[i].getJSON(); - if (node != null) { + if (node !== null) { rootNodes.push(node); } } diff --git a/src/main/webapp/scripts/util/dom.js b/src/main/webapp/scripts/util/dom.js index 0e397f67d..e1dc9045e 100644 --- a/src/main/webapp/scripts/util/dom.js +++ b/src/main/webapp/scripts/util/dom.js @@ -12,7 +12,7 @@ DOM.bind = function(elmt) { DOM._bindDOMElement = function(elmt, map) { var bind = elmt.getAttribute("bind"); - if (bind != null && bind.length > 0) { + if (bind !== null && bind.length > 0) { map[bind] = $(elmt); elmt.removeAttribute("bind"); } @@ -24,7 +24,7 @@ DOM._bindDOMElement = function(elmt, map) { DOM._bindDOMChildren = function(elmt, map) { var node = elmt.firstChild; - while (node != null) { + while (node !== null) { var node2 = node.nextSibling; if (node.nodeType == 1) { DOM._bindDOMElement(node, map); diff --git a/src/main/webapp/scripts/util/histogram-widget.js b/src/main/webapp/scripts/util/histogram-widget.js index e9b54571e..b927da4e5 100644 --- a/src/main/webapp/scripts/util/histogram-widget.js +++ b/src/main/webapp/scripts/util/histogram-widget.js @@ -42,8 +42,8 @@ HistogramWidget.prototype.update = function(min, max, step, binMatrix, from, to) }; HistogramWidget.prototype._update = function() { - if (this._binMatrix != null) { - if (this._highlight != null) { + if (this._binMatrix !== null) { + if (this._highlight !== null) { this._highlight.from = Math.max(this._highlight.from, this._range.min); this._highlight.to = Math.min(this._highlight.to, this._range.max); } @@ -135,7 +135,7 @@ HistogramWidget.prototype._render = function() { /* * Draw highlight */ - if (this._highlight != null) { + if (this._highlight !== null) { ctx.fillStyle = "rgba(192,192,192, 0.5)"; ctx.globalCompositeOperation = "source-over"; if (this._highlight.from > this._range.min) { diff --git a/src/main/webapp/scripts/util/menu.js b/src/main/webapp/scripts/util/menu.js index d9f9f29c3..07f7814e5 100644 --- a/src/main/webapp/scripts/util/menu.js +++ b/src/main/webapp/scripts/util/menu.js @@ -26,7 +26,7 @@ MenuSystem.showMenu = function(elmt, onDismiss) { MenuSystem.dismissAll = function() { MenuSystem.dismissUntil(0); - if (MenuSystem._overlay != null) { + if (MenuSystem._overlay !== null) { MenuSystem._overlay.remove(); MenuSystem._overlay = null; } 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 08f5e4ec3..b593c9cbf 100644 --- a/src/main/webapp/scripts/views/data-table-cell-ui.js +++ b/src/main/webapp/scripts/views/data-table-cell-ui.js @@ -43,7 +43,7 @@ DataTableCellUI.prototype._render = function() { .appendTo(divContent).click(function(evt) { self._doRematch(); }); - } else if (r.j == "matched" && "m" in r && r.m != null) { + } else if (r.j == "matched" && "m" in r && r.m !== null) { var match = cell.r.m; $('
') .text(match.name) @@ -207,7 +207,7 @@ DataTableCellUI.prototype._searchForMatch = function() { var match = null; var commit = function() { - if (match != null) { + if (match !== null) { var query = { "id" : match.id, "type" : [] 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 56b57d69f..fdc0e49c3 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 @@ -895,7 +895,7 @@ DataTableColumnHeaderUI.prototype._doRemoveColumn = function() { DataTableColumnHeaderUI.prototype._doRenameColumn = function() { var newColumnName = window.prompt("Enter new column name", this._column.name); - if (newColumnName != null) { + if (newColumnName !== null) { Gridworks.postProcess( "rename-column", { @@ -910,7 +910,7 @@ DataTableColumnHeaderUI.prototype._doRenameColumn = function() { DataTableColumnHeaderUI.prototype._doJoinMultiValueCells = function() { var separator = window.prompt("Enter separator to use between values", ", "); - if (separator != null) { + if (separator !== null) { Gridworks.postProcess( "join-multi-value-cells", { @@ -926,7 +926,7 @@ DataTableColumnHeaderUI.prototype._doJoinMultiValueCells = function() { DataTableColumnHeaderUI.prototype._doSplitMultiValueCells = function() { var separator = window.prompt("What separator currently separates the values?", ","); - if (separator != null) { + if (separator !== null) { Gridworks.postProcess( "split-multi-value-cells", { diff --git a/src/main/webapp/scripts/views/data-table-view.js b/src/main/webapp/scripts/views/data-table-view.js index 402d36ae1..63702447a 100644 --- a/src/main/webapp/scripts/views/data-table-view.js +++ b/src/main/webapp/scripts/views/data-table-view.js @@ -399,7 +399,7 @@ DataTableView.sampleVisibleRows = function(column) { var v = null; if (column.cellIndex < row.cells.length) { var cell = row.cells[column.cellIndex]; - if (cell != null) { + if (cell !== null) { v = cell.v; } }