From b5da6f9c74613e5abfad3ece42d1aab32524a0dd Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 29 Apr 2019 11:50:15 +0100 Subject: [PATCH] Upgrade to jq 3.3.1 / jq-ui 1.12.1 Uses jquery-migrate-3.0.1.min.js to keep things working. --- Gruntfile.js | 7 +- .../@node-red/editor-client/src/js/comms.js | 2 +- .../editor-client/src/js/settings.js | 6 + .../editor-client/src/js/ui/clipboard.js | 42 +- .../src/js/ui/common/checkboxSet.js | 4 +- .../src/js/ui/common/editableList.js | 4 +- .../editor-client/src/js/ui/common/menu.js | 4 +- .../editor-client/src/js/ui/common/popover.js | 2 +- .../src/js/ui/common/searchBox.js | 2 +- .../editor-client/src/js/ui/common/stack.js | 6 +- .../editor-client/src/js/ui/common/tabs.js | 18 +- .../src/js/ui/common/treeList.js | 4 +- .../src/js/ui/common/typedInput.js | 26 +- .../editor-client/src/js/ui/deploy.js | 2 +- .../@node-red/editor-client/src/js/ui/diff.js | 22 +- .../editor-client/src/js/ui/editor.js | 40 +- .../editor-client/src/js/ui/editors/buffer.js | 2 +- .../src/js/ui/editors/expression.js | 12 +- .../editor-client/src/js/ui/editors/json.js | 2 +- .../src/js/ui/editors/markdown.js | 4 +- .../editor-client/src/js/ui/keyboard.js | 10 +- .../editor-client/src/js/ui/library.js | 12 +- .../editor-client/src/js/ui/notifications.js | 8 +- .../editor-client/src/js/ui/palette-editor.js | 30 +- .../editor-client/src/js/ui/palette.js | 8 +- .../src/js/ui/projects/projectSettings.js | 64 +- .../src/js/ui/projects/projectUserSettings.js | 18 +- .../src/js/ui/projects/projects.js | 84 +-- .../src/js/ui/projects/tab-versionControl.js | 52 +- .../editor-client/src/js/ui/search.js | 4 +- .../editor-client/src/js/ui/sidebar.js | 2 +- .../editor-client/src/js/ui/subflow.js | 14 +- .../editor-client/src/js/ui/tab-config.js | 8 +- .../editor-client/src/js/ui/tab-context.js | 18 +- .../editor-client/src/js/ui/tab-info.js | 10 +- .../@node-red/editor-client/src/js/ui/tray.js | 10 +- .../editor-client/src/js/ui/typeSearch.js | 6 +- .../editor-client/src/js/ui/utils.js | 14 +- .../editor-client/src/js/ui/view-navigator.js | 4 +- .../@node-red/editor-client/src/js/ui/view.js | 14 +- .../editor-client/src/js/ui/workspaces.js | 6 +- .../@node-red/editor-client/src/js/user.js | 8 +- .../base/images/ui-icons_444444_256x240.png | Bin 0 -> 7006 bytes .../base/images/ui-icons_555555_256x240.png | Bin 0 -> 7074 bytes .../base/images/ui-icons_777620_256x240.png | Bin 0 -> 4676 bytes .../base/images/ui-icons_777777_256x240.png | Bin 0 -> 7013 bytes .../base/images/ui-icons_cc0000_256x240.png | Bin 0 -> 4632 bytes .../base/images/ui-icons_ffffff_256x240.png | Bin 0 -> 6313 bytes .../vendor/jquery/css/base/jquery-ui.min.css | 7 + .../smoothness/images/animated-overlay.gif | Bin 1738 -> 0 bytes .../images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 212 -> 0 bytes .../images/ui-bg_flat_75_ffffff_40x100.png | Bin 208 -> 0 bytes .../images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 335 -> 0 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 207 -> 0 bytes .../images/ui-bg_glass_75_dadada_1x400.png | Bin 262 -> 0 bytes .../images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 262 -> 0 bytes .../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 332 -> 0 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 280 -> 0 bytes .../images/ui-icons_222222_256x240.png | Bin 6922 -> 0 bytes .../images/ui-icons_2e83ff_256x240.png | Bin 4549 -> 0 bytes .../images/ui-icons_454545_256x240.png | Bin 6992 -> 0 bytes .../images/ui-icons_888888_256x240.png | Bin 6999 -> 0 bytes .../images/ui-icons_cd0a0a_256x240.png | Bin 4549 -> 0 bytes .../jquery-ui-1.10.3.custom.min.css | 5 - .../src/vendor/jquery/js/jquery-1.11.3.min.js | 5 - .../src/vendor/jquery/js/jquery-3.3.1.min.js | 2 + .../vendor/jquery/js/jquery-migrate-3.0.1.js | 626 ++++++++++++++++++ .../jquery/js/jquery-migrate-3.0.1.min.js | 215 ++++++ .../jquery/js/jquery-ui-1.10.3.custom.min.js | 7 - .../src/vendor/jquery/js/jquery-ui.min.js | 13 + .../editor-client/templates/index.mst | 2 +- .../@node-red/nodes/core/core/20-inject.html | 10 +- .../@node-red/nodes/core/core/25-catch.html | 14 +- .../@node-red/nodes/core/core/25-status.html | 14 +- .../@node-red/nodes/core/core/58-debug.html | 4 +- .../@node-red/nodes/core/core/60-link.html | 2 +- .../nodes/core/core/80-function.html | 4 +- .../nodes/core/core/80-template.html | 4 +- .../@node-red/nodes/core/core/89-delay.html | 10 +- .../@node-red/nodes/core/core/89-trigger.html | 4 +- .../@node-red/nodes/core/core/90-comment.html | 2 +- .../nodes/core/core/lib/debug/debug-utils.js | 14 +- .../nodes/core/hardware/36-rpi-gpio.html | 12 +- .../@node-red/nodes/core/io/05-tls.html | 12 +- .../@node-red/nodes/core/io/06-httpproxy.html | 4 +- .../@node-red/nodes/core/io/10-mqtt.html | 4 +- .../@node-red/nodes/core/io/21-httpin.html | 4 +- .../nodes/core/io/21-httprequest.html | 8 +- .../@node-red/nodes/core/io/22-websocket.html | 2 +- .../@node-red/nodes/core/io/31-tcpin.html | 2 +- .../@node-red/nodes/core/io/31-tcpin.js | 2 +- .../@node-red/nodes/core/io/32-udp.html | 8 +- .../@node-red/nodes/core/logic/10-switch.html | 4 +- .../@node-red/nodes/core/logic/15-change.html | 4 +- .../@node-red/nodes/core/logic/17-split.html | 6 +- .../@node-red/nodes/core/logic/18-sort.html | 2 +- .../@node-red/nodes/core/logic/19-batch.html | 4 +- .../@node-red/nodes/core/parsers/70-CSV.html | 2 +- .../@node-red/nodes/core/parsers/70-JSON.html | 2 +- 99 files changed, 1257 insertions(+), 404 deletions(-) create mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/base/images/ui-icons_444444_256x240.png create mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/base/images/ui-icons_555555_256x240.png create mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/base/images/ui-icons_777620_256x240.png create mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/base/images/ui-icons_777777_256x240.png create mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/base/images/ui-icons_cc0000_256x240.png create mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/base/images/ui-icons_ffffff_256x240.png create mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/base/jquery-ui.min.css delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/smoothness/images/animated-overlay.gif delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/smoothness/images/ui-icons_222222_256x240.png delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/smoothness/images/ui-icons_454545_256x240.png delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/smoothness/images/ui-icons_888888_256x240.png delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-1.11.3.min.js create mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-3.3.1.min.js create mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-migrate-3.0.1.js create mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-migrate-3.0.1.min.js delete mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-ui-1.10.3.custom.min.js create mode 100644 packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-ui.min.js diff --git a/Gruntfile.js b/Gruntfile.js index e11caabbc..6a8a4002f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -181,9 +181,10 @@ module.exports = function(grunt) { vendor: { files: { "packages/node_modules/@node-red/editor-client/public/vendor/vendor.js": [ - "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-1.11.3.min.js", + "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-3.3.1.min.js", + "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-migrate-3.0.1.min.js", "packages/node_modules/@node-red/editor-client/src/vendor/bootstrap/js/bootstrap.min.js", - "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-ui-1.10.3.custom.min.js", + "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-ui.min.js", "packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery.ui.touch-punch.min.js", "packages/node_modules/@node-red/editor-client/src/vendor/marked/marked.min.js", "packages/node_modules/@node-red/editor-client/src/vendor/d3/d3.v3.min.js", @@ -354,7 +355,7 @@ module.exports = function(grunt) { 'ace/**', //'bootstrap/css/**', 'bootstrap/img/**', - 'jquery/css/**', + 'jquery/css/base/**', 'font-awesome/**' ], expand: true, diff --git a/packages/node_modules/@node-red/editor-client/src/js/comms.js b/packages/node_modules/@node-red/editor-client/src/js/comms.js index ea128424b..75a018a56 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/comms.js +++ b/packages/node_modules/@node-red/editor-client/src/js/comms.js @@ -143,7 +143,7 @@ RED.comms = (function() { } else { var msg = RED._("notification.errors.lostConnectionReconnect",{time: connectCountdown})+' '+ RED._("notification.errors.lostConnectionTry")+''; errornotification.update(msg,{silent:true}); - $(errornotification).find("a").click(function(e) { + $(errornotification).find("a").on("click", function(e) { e.preventDefault(); errornotification.update(RED._("notification.errors.lostConnection"),{silent:true}); clearInterval(connectCountdownTimer); diff --git a/packages/node_modules/@node-red/editor-client/src/js/settings.js b/packages/node_modules/@node-red/editor-client/src/js/settings.js index faf80c083..1be00f851 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/settings.js +++ b/packages/node_modules/@node-red/editor-client/src/js/settings.js @@ -131,6 +131,12 @@ RED.settings = (function () { RED.settings.remove("auth-tokens"); } console.log("Node-RED: " + data.version); + console.group("Versions"); + console.log("jQuery",$().jquery) + console.log("jQuery UI",$.ui.version); + console.log("ACE",ace.version); + console.log("D3",d3.version); + console.groupEnd(); loadUserSettings(done); }, error: function(jqXHR,textStatus,errorThrown) { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js b/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js index ac14e2689..07eb2c414 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js @@ -53,7 +53,7 @@ RED.clipboard = (function() { element.setAttribute('download', "flows.json"); element.style.display = 'none'; document.body.appendChild(element); - element.click(); + element.trigger("click"); document.body.removeChild(element); $( this ).dialog( "close" ); } @@ -369,7 +369,7 @@ RED.clipboard = (function() { currentPopoverError = null; } if (tab.id === "clipboard-dialog-import-tab-clipboard") { - $("#clipboard-import").focus(); + $("#clipboard-import").trigger("focus"); } else { libraryBrowser.focus(); } @@ -388,12 +388,12 @@ RED.clipboard = (function() { tabs.activateTab("clipboard-dialog-import-tab-"+mode); if (mode === 'clipboard') { setTimeout(function() { - $("#clipboard-import").focus(); + $("#clipboard-import").trigger("focus"); },100) } - $("#clipboard-dialog-tab-library-name").keyup(validateExportFilename); + $("#clipboard-dialog-tab-library-name").on("keyup", validateExportFilename); $("#clipboard-dialog-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)}); $("#clipboard-dialog-export").button("enable"); @@ -416,10 +416,10 @@ RED.clipboard = (function() { $("#clipboard-dialog-export").hide(); $("#clipboard-dialog-download").hide(); $("#clipboard-dialog-ok").button("disable"); - $("#clipboard-import").keyup(validateImport); + $("#clipboard-import").on("keyup", validateImport); $("#clipboard-import").on('paste',function() { setTimeout(validateImport,10)}); - $("#import-tab > a").click(function(evt) { + $("#import-tab > a").on("click", function(evt) { evt.preventDefault(); if ($(this).hasClass('disabled') || $(this).hasClass('selected')) { return; @@ -428,7 +428,7 @@ RED.clipboard = (function() { $(this).addClass('selected'); }); - $("#import-file-upload").change(function() { + $("#import-file-upload").on("change", function() { var fileReader = new FileReader(); fileReader.onload = function () { $("#clipboard-import").val(fileReader.result); @@ -436,9 +436,9 @@ RED.clipboard = (function() { }; fileReader.readAsText($(this).prop('files')[0]); }) - $("#import-file-upload-btn").click(function(evt) { + $("#import-file-upload-btn").on("click", function(evt) { evt.preventDefault(); - $("#import-file-upload").click(); + $("#import-file-upload").trigger("click"); }) dialog.dialog("option","title",RED._("clipboard.importNodes")).dialog("open"); @@ -489,7 +489,7 @@ RED.clipboard = (function() { tabs.activateTab("clipboard-dialog-export-tab-"+mode); - $("#clipboard-dialog-tab-library-name").keyup(validateExportFilename); + $("#clipboard-dialog-tab-library-name").on("keyup", validateExportFilename); $("#clipboard-dialog-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)}); $("#clipboard-dialog-export").button("enable"); @@ -509,10 +509,10 @@ RED.clipboard = (function() { dialogContainer.i18n(); var format = RED.settings.flowFilePretty ? "export-format-full" : "export-format-mini"; - $("#export-format-group > a").click(function(evt) { + $("#export-format-group > a").on("click", function(evt) { evt.preventDefault(); if ($(this).hasClass('disabled') || $(this).hasClass('selected')) { - $("#clipboard-export").focus(); + $("#clipboard-export").trigger("focus"); return; } $(this).parent().children().removeClass('selected'); @@ -531,11 +531,11 @@ RED.clipboard = (function() { $("#clipboard-export").val(flow); setTimeout(function() { $("#clipboard-export").scrollTop(0); },50); - $("#clipboard-export").focus(); + $("#clipboard-export").trigger("focus"); } }); - $("#export-range-group > a").click(function(evt) { + $("#export-range-group > a").on("click", function(evt) { evt.preventDefault(); if ($(this).hasClass('disabled') || $(this).hasClass('selected')) { return; @@ -581,7 +581,7 @@ RED.clipboard = (function() { } $("#clipboard-export").val(flow); setTimeout(function() { $("#clipboard-export").scrollTop(0); },50); - $("#clipboard-export").focus(); + $("#clipboard-export").trigger("focus"); }) $("#clipboard-dialog-ok").hide(); @@ -589,24 +589,24 @@ RED.clipboard = (function() { $("#clipboard-dialog-export").hide(); var selection = RED.workspaces.selection(); if (selection.length > 0) { - $("#export-range-selected").click(); + $("#export-range-selected").trigger("click"); } else { selection = RED.view.selection(); if (selection.nodes) { - $("#export-range-selected").click(); + $("#export-range-selected").trigger("click"); } else { $("#export-range-selected").addClass('disabled').removeClass('selected'); - $("#export-range-flow").click(); + $("#export-range-flow").trigger("click"); } } if (format === "export-format-full") { - $("#export-format-full").click(); + $("#export-format-full").trigger("click"); } else { - $("#export-format-mini").click(); + $("#export-format-mini").trigger("click"); } dialog.dialog("option","title",RED._("clipboard.exportNodes")).dialog( "open" ); - $("#clipboard-export").focus(); + $("#clipboard-export").trigger("focus"); $("#clipboard-dialog-cancel").show(); $("#clipboard-dialog-export").show(); $("#clipboard-dialog-download").show(); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/checkboxSet.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/checkboxSet.js index be7d2d4cd..157c1e495 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/checkboxSet.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/checkboxSet.js @@ -38,7 +38,7 @@ this.options[0].show(); } - this.element.change(function() { + this.element.on("change", function() { if (this.checked) { that.options[0].hide(); that.options[1].show(); @@ -53,7 +53,7 @@ child.checkboxSet('state',isChecked,false,true); }) }) - this.uiElement.click(function(e) { + this.uiElement.on("click", function(e) { e.stopPropagation(); // state returns null for a partial state. Clicking on that should // result in false. diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js index ee29a6a35..ddede026b 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js @@ -77,7 +77,7 @@ } $(' '+addLabel+'') .appendTo(this.topContainer) - .click(function(evt) { + .on("click", function(evt) { evt.preventDefault(); that.addItem({}); }); @@ -260,7 +260,7 @@ var deleteButton = $('',{href:"#",class:"red-ui-editableList-item-remove editor-button editor-button-small"}).appendTo(li); $('',{class:"fa fa-remove"}).appendTo(deleteButton); li.addClass("red-ui-editableList-item-removable"); - deleteButton.click(function(evt) { + deleteButton.on("click", function(evt) { evt.preventDefault(); var data = row.data('data'); li.addClass("red-ui-editableList-item-deleting") diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js index adac42463..6e88aeade 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js @@ -92,7 +92,7 @@ RED.menu = (function() { menuItems[opt.id] = opt; if (opt.onselect) { - link.click(function(e) { + link.on("click", function(e) { e.preventDefault(); if ($(this).parent().hasClass("disabled")) { return; @@ -125,7 +125,7 @@ RED.menu = (function() { link.attr("target","_blank").attr("href",opt.href); } else if (!opt.options) { item.addClass("disabled"); - link.click(function(event) { + link.on("click", function(event) { event.preventDefault(); }); } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js index 50aa5eb83..e3a10664c 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js @@ -162,7 +162,7 @@ RED.popover = (function() { } }); } else if (trigger === 'click') { - target.click(function(e) { + target.on("click", function(e) { e.preventDefault(); e.stopPropagation(); active = !active; diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js index 1c6aad8d2..8f98862c7 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js @@ -44,7 +44,7 @@ e.preventDefault(); that.element.val(""); that._change("",true); - that.element.focus(); + that.element.trigger("focus"); }); this.resultCount = $('',{class:"red-ui-searchBox-resultCount hide"}).appendTo(this.uiContainer); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js index d31753a31..0cb410b29 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js @@ -39,8 +39,8 @@ RED.stack = (function() { } } if (options.fill && options.singleExpanded) { - $(window).resize(resizeStack); - $(window).focus(resizeStack); + $(window).on("resize", resizeStack); + $(window).on("focus", resizeStack); } return { add: function(entry) { @@ -57,7 +57,7 @@ RED.stack = (function() { } entry.content = $('
').appendTo(entry.contentWrap); if (entry.collapsible !== false) { - header.click(function() { + header.on("click", function() { if (options.singleExpanded) { if (!entry.isExpanded()) { for (var i=0;i
').appendTo(wrapper); - addButton.find('a').click(function(evt) { + addButton.find('a').on("click", function(evt) { evt.preventDefault(); if (typeof options.addButton === 'function') { options.addButton(); @@ -73,7 +73,7 @@ RED.tabs = (function() { if (options.searchButton) { wrapper.addClass("red-ui-tabs-search"); var searchButton = $('').appendTo(wrapper); - searchButton.find('a').click(function(evt) { + searchButton.find('a').on("click", function(evt) { evt.preventDefault(); if (typeof options.searchButton === 'function') { options.searchButton() @@ -96,7 +96,7 @@ RED.tabs = (function() { if (options.scrollable) { wrapper.addClass("red-ui-tabs-scrollable"); scrollContainer.addClass("red-ui-tabs-scroll-container"); - scrollContainer.scroll(updateScroll); + scrollContainer.on("scroll",updateScroll); scrollLeft = $('
').appendTo(wrapper).find("a"); scrollLeft.on('mousedown',function(evt) { scrollEventHandler(evt,'-=150') }).on('click',function(evt){ evt.preventDefault();}); scrollRight = $('
').appendTo(wrapper).find("a"); @@ -113,7 +113,7 @@ RED.tabs = (function() { if (options.menu !== false) { var selectButton = $('').appendTo(collapsedButtonsRow); selectButton.addClass("red-ui-tab-link-button-menu") - selectButton.click(function(evt) { + selectButton.on("click", function(evt) { evt.stopPropagation(); evt.preventDefault(); if (!collapsibleMenu) { @@ -348,7 +348,7 @@ RED.tabs = (function() { } var tabs = ul.find("li.red-ui-tab"); var width = wrapper.width(); - var tabCount = tabs.size(); + var tabCount = tabs.length; var tabWidth; if (options.collapsible) { @@ -434,7 +434,7 @@ RED.tabs = (function() { var li = ul.find("a[href='#"+id+"']").parent(); if (li.hasClass("active")) { var tab = li.prev(); - if (tab.size() === 0) { + if (tab.length === 0) { tab = li.next(); } activateTab(tab.find("a")); @@ -509,7 +509,7 @@ RED.tabs = (function() { } else { $('',{class:defaultTabIcon}).appendTo(pinnedLink); } - pinnedLink.click(function(evt) { + pinnedLink.on("click", function(evt) { evt.preventDefault(); activateTab(tab.id); }); @@ -543,7 +543,7 @@ RED.tabs = (function() { options.onadd(tab); } link.attr("title",tab.label); - if (ul.find("li.red-ui-tab").size() == 1) { + if (ul.find("li.red-ui-tab").length == 1) { activateTab(link); } if (options.onreorder) { @@ -634,7 +634,7 @@ RED.tabs = (function() { previousTab: activatePreviousTab, resize: updateTabWidths, count: function() { - return ul.find("li.red-ui-tab").size(); + return ul.find("li.red-ui-tab").length; }, contains: function(id) { return ul.find("a[href='#"+id+"']").length > 0; diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js index 0b21ca146..30137b3e7 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js @@ -262,7 +262,7 @@ $('').appendTo(label); // $('').appendTo(label); - label.click(function(e) { + label.on("click", function(e) { if (container.hasClass("expanded")) { if (item.hasOwnProperty('selected') || label.hasClass("selected")) { item.treeList.collapse(); @@ -285,7 +285,7 @@ that._trigger("select",e,item); }) } else { - label.click(function(e) { + label.on("click", function(e) { that._topList.find(".selected").removeClass("selected"); label.addClass("selected"); that._trigger("select",e,item) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js index accfff6dd..2de2c4f47 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js @@ -159,11 +159,11 @@ that.uiSelect.css("margin"+d,m); that.input.css("margin"+d,0); }); - + ["type","placeholder"].forEach(function(d) { var m = that.element.attr(d); that.input.attr(d,m); - }); + }); this.uiSelect.addClass("red-ui-typedInput-container"); @@ -199,7 +199,7 @@ that.element.val(that.value()); that.element.trigger('change',that.propertyType,that.value()); }) - this.selectTrigger.click(function(event) { + this.selectTrigger.on("click", function(event) { event.preventDefault(); that._showTypeMenu(); }); @@ -218,7 +218,7 @@ RED.popover.tooltip(this.optionSelectLabel,function() { return that.optionValue; }); - this.optionSelectTrigger.click(function(event) { + this.optionSelectTrigger.on("click", function(event) { event.preventDefault(); that._showOptionSelectMenu(); }).on('keydown', function(evt) { @@ -241,9 +241,9 @@ _showTypeMenu: function() { if (this.typeList.length > 1) { this._showMenu(this.menu,this.selectTrigger); - this.menu.find("[value='"+this.propertyType+"']").focus(); + this.menu.find("[value='"+this.propertyType+"']").trigger("focus"); } else { - this.input.focus(); + this.input.trigger("focus"); } }, _showOptionSelectMenu: function() { @@ -257,7 +257,7 @@ if (selectedOption.length === 0) { selectedOption = this.optionMenu.children(":first"); } - selectedOption.focus(); + selectedOption.trigger("focus"); } }, @@ -265,11 +265,11 @@ $(document).off("mousedown.close-property-select"); menu.hide(); if (this.elementDiv.is(":visible")) { - this.input.focus(); + this.input.trigger("focus"); } else if (this.optionSelectTrigger.is(":visible")){ - this.optionSelectTrigger.focus(); + this.optionSelectTrigger.trigger("focus"); } else { - this.selectTrigger.focus(); + this.selectTrigger.trigger("focus"); } }, _createMenu: function(opts,callback) { @@ -298,7 +298,7 @@ op.text(opt.value); } - op.click(function(event) { + op.on("click", function(event) { event.preventDefault(); callback(opt.value); that._hideMenu(menu); @@ -312,10 +312,10 @@ menu.on('keydown', function(evt) { if (evt.keyCode === 40) { // DOWN - $(this).children(":focus").next().focus(); + $(this).children(":focus").next().trigger("focus"); } else if (evt.keyCode === 38) { // UP - $(this).children(":focus").prev().focus(); + $(this).children(":focus").prev().trigger("focus"); } else if (evt.keyCode === 27) { that._hideMenu(menu); } diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js index 96363e21b..5fe8be1e3 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js @@ -93,7 +93,7 @@ RED.deploy = (function() { '').prependTo(".header-toolbar"); } - $('#btn-deploy').click(function(event) { + $('#btn-deploy').on("click", function(event) { event.preventDefault(); save(); }); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js b/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js index bef2ffc69..e73dc7ec1 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js @@ -133,7 +133,7 @@ RED.diff = (function() { $('').appendTo(originalNodeDiv); $('').text(RED._("diff.flowProperties")).appendTo(originalNodeDiv); - row.click(function(evt) { + row.on("click", function(evt) { evt.preventDefault(); $(this).parent().toggleClass('collapsed'); }); @@ -182,7 +182,7 @@ RED.diff = (function() { } }); } - titleRow.click(function(evt) { + titleRow.on("click", function(evt) { // if (titleRow.parent().find(".node-diff-node-entry:not(.hide)").length > 0) { titleRow.parent().toggleClass('collapsed'); if ($(this).parent().hasClass('collapsed')) { @@ -704,7 +704,7 @@ RED.diff = (function() { } // Node row createNodeConflictRadioBoxes(node,div,localNodeDiv,remoteNodeDiv,false,!conflicted,selectState,CurrentDiff); - row.click(function(evt) { + row.on("click", function(evt) { $(this).parent().toggleClass('collapsed'); if($(this).siblings('.node-diff-node-entry-properties').length === 0) { @@ -979,7 +979,7 @@ RED.diff = (function() { } if (localNode && remoteNode && typeof localNode[d] === "string") { if (/\n/.test(localNode[d]) || /\n/.test(remoteNode[d])) { - $('').click(function() { + $('').on("click", function() { showTextDiff(localNode[d],remoteNode[d]); }).appendTo(propertyNameCell); } @@ -1029,10 +1029,10 @@ RED.diff = (function() { refreshConflictHeader(diff); } - var localSelectDiv = $('