Upgrade to jq 3.3.1 / jq-ui 1.12.1

Uses jquery-migrate-3.0.1.min.js to keep things working.
This commit is contained in:
Nick O'Leary
2019-04-29 11:50:15 +01:00
parent 7ec999475e
commit b5da6f9c74
99 changed files with 1257 additions and 404 deletions

View File

@@ -247,7 +247,7 @@
types:['flow','global','str','num','bool','json','bin','date','env']
});
$("#inject-time-type-select").change(function() {
$("#inject-time-type-select").on("change", function() {
$("#node-input-crontab").val('');
var id = $("#inject-time-type-select").val();
$(".inject-time-row").hide();
@@ -261,7 +261,7 @@
}
});
$("#node-input-once").change(function() {
$("#node-input-once").on("change", function() {
$("#node-input-onceDelay").attr('disabled', !$("#node-input-once").prop('checked'));
})
@@ -272,7 +272,7 @@
}
});
$("<option></option>").val(24).text("00:00").appendTo("#inject-time-interval-time-end");
$("#inject-time-interval-time-start").change(function() {
$("#inject-time-interval-time-start").on("change", function() {
var start = Number($("#inject-time-interval-time-start").val());
var end = Number($("#inject-time-interval-time-end").val());
$("#inject-time-interval-time-end option").remove();
@@ -380,8 +380,8 @@
$("#node-input-payload").typedInput('type',this.payloadType);
$("#inject-time-type-select").change();
$("#inject-time-interval-time-start").change();
$("#inject-time-type-select").trigger("change");
$("#inject-time-interval-time-start").trigger("change");
},
oneditsave: function() {

View File

@@ -92,7 +92,7 @@
this.resize = function() {
var rows = $("#dialog-form>div:not(.node-input-target-row)");
var height = $("#dialog-form").height();
for (var i=0;i<rows.size();i++) {
for (var i=0;i<rows.length;i++) {
height -= $(rows[i]).outerHeight(true);
}
var editorRow = $("#dialog-form>div.node-input-target-row");
@@ -156,7 +156,7 @@
container.appendTo(nodeList);
});
$(".node-input-target-node-checkbox").change(function() {
$(".node-input-target-node-checkbox").on("change", function() {
if (!this.checked) {
$("#node-input-target-node-checkbox-all").prop('checked',false);
}
@@ -201,22 +201,22 @@
nodeList.append(li);
});
}
$("#node-input-target-sort-label").click(function(e) {
$("#node-input-target-sort-label").on("click", function(e) {
e.preventDefault();
sortNodeList('label');
});
$("#node-input-target-sort-type").click(function(e) {
$("#node-input-target-sort-type").on("click", function(e) {
e.preventDefault();
sortNodeList('sublabel');
});
$("#node-input-target-node-checkbox-all").change(function() {
$("#node-input-target-node-checkbox-all").on("change", function() {
$(".node-input-target-node-checkbox").prop('checked',this.checked);
});
$("#node-input-scope-select").change(function(e) {
$("#node-input-scope-select").on("change", function(e) {
var scope = $(this).val();
if (scope === "target") {
createNodeList();
@@ -233,7 +233,7 @@
} else {
$("#node-input-scope-select").val("target");
}
$("#node-input-scope-select").change();
$("#node-input-scope-select").trigger("change");
},
oneditsave: function() {
var scope = $("#node-input-scope-select").val();

View File

@@ -81,7 +81,7 @@
this.resize = function() {
var rows = $("#dialog-form>div:not(.node-input-target-row)");
var height = $("#dialog-form").height();
for (var i=0;i<rows.size();i++) {
for (var i=0;i<rows.length;i++) {
height -= $(rows[i]).outerHeight(true);
}
var editorRow = $("#dialog-form>div.node-input-target-row");
@@ -145,7 +145,7 @@
container.appendTo(nodeList);
});
$(".node-input-target-node-checkbox").change(function() {
$(".node-input-target-node-checkbox").on("change", function() {
if (!this.checked) {
$("#node-input-target-node-checkbox-all").prop('checked',false);
}
@@ -190,20 +190,20 @@
nodeList.append(li);
});
}
$("#node-input-target-sort-label").click(function(e) {
$("#node-input-target-sort-label").on("click", function(e) {
e.preventDefault();
sortNodeList('label');
});
$("#node-input-target-sort-type").click(function(e) {
$("#node-input-target-sort-type").on("click", function(e) {
e.preventDefault();
sortNodeList('sublabel');
});
$("#node-input-target-node-checkbox-all").change(function() {
$("#node-input-target-node-checkbox-all").on("change", function() {
$(".node-input-target-node-checkbox").prop('checked',this.checked);
});
$("#node-input-scope-select").change(function(e) {
$("#node-input-scope-select").on("change", function(e) {
var scope = $(this).val();
if (scope === "target") {
createNodeList();
@@ -218,7 +218,7 @@
} else {
$("#node-input-scope-select").val("target");
}
$("#node-input-scope-select").change();
$("#node-input-scope-select").trigger("change");
},
oneditsave: function() {
var scope = $("#node-input-scope-select").val();

View File

@@ -206,7 +206,7 @@
};
RED.events.on("project:change", this.clearMessageList);
$("#debug-tab-open").click(function(e) {
$("#debug-tab-open").on("click", function(e) {
e.preventDefault();
subWindow = window.open(document.location.toString().replace(/[?#].*$/,"")+"debug/view/view.html"+document.location.search,"nodeREDDebugView","menubar=no,location=no,toolbar=no,chrome,height=500,width=600");
subWindow.onload = function() {
@@ -217,7 +217,7 @@
$(window).unload(function() {
$(window).on('beforeunload',function() {
if (subWindow) {
try {
subWindow.close();

View File

@@ -97,7 +97,7 @@
function resizeNodeList() {
var rows = $("#dialog-form>div:not(.node-input-link-row)");
var height = $("#dialog-form").height();
for (var i=0;i<rows.size();i++) {
for (var i=0;i<rows.length;i++) {
height -= $(rows[i]).outerHeight(true);
}
var editorRow = $("#dialog-form>div.node-input-link-row");

View File

@@ -79,7 +79,7 @@
});
this.editor.focus();
$("#node-function-expand-js").click(function(e) {
$("#node-function-expand-js").on("click", function(e) {
e.preventDefault();
var value = that.editor.getValue();
RED.editor.editJavaScript({
@@ -119,7 +119,7 @@
oneditresize: function(size) {
var rows = $("#dialog-form>div:not(.node-text-editor-row)");
var height = $("#dialog-form").height();
for (var i=0; i<rows.size(); i++) {
for (var i=0; i<rows.length; i++) {
height -= $(rows[i]).outerHeight(true);
}
var editorRow = $("#dialog-form>div.node-text-editor-row");

View File

@@ -102,7 +102,7 @@
});
this.editor.focus();
$("#node-input-format").change(function() {
$("#node-input-format").on("change", function() {
var mod = "ace/mode/"+$("#node-input-format").val();
that.editor.getSession().setMode({
path: mod,
@@ -122,7 +122,7 @@
oneditresize: function(size) {
var rows = $("#dialog-form>div:not(.node-text-editor-row)");
var height = $("#dialog-form").height();
for (var i=0; i<rows.size(); i++) {
for (var i=0; i<rows.length; i++) {
height -= $(rows[i]).outerHeight(true);
}
var editorRow = $("#dialog-form>div.node-text-editor-row");

View File

@@ -161,8 +161,8 @@
$( "#node-input-randomFirst" ).spinner({min:0});
$( "#node-input-randomLast" ).spinner({min:1});
$('.ui-spinner-button').click(function() {
$(this).siblings('input').change();
$('.ui-spinner-button').on("click", function() {
$(this).siblings('input').trigger("change");
});
$( "#node-input-nbRateUnits" ).on('change keyup', function() {
@@ -226,7 +226,7 @@
$("#delay-details").hide();
$("#rate-details").show();
}
}).change();
}).trigger("change");
$("#node-input-delay-type").on("change", function() {
if (this.value === "delay") {
@@ -239,7 +239,7 @@
$("#delay-details-for").hide();
$("#random-details").show();
}
}).change();
}).trigger("change");
$("#node-input-rate-type").on("change", function() {
if (this.value === "all") {
@@ -249,7 +249,7 @@
$("#node-input-drop").prop('checked',true).attr('disabled',true).next().css("opacity",0.5)
$("#rate-details-per-topic").show();
}
}).change();
}).trigger("change");
},
oneditsave: function() {
var action = $("#node-input-delay-action").val();

View File

@@ -103,7 +103,7 @@
return this.name?"node_label_italic":"";
},
oneditprepare: function() {
$("#node-then-type").change(function() {
$("#node-then-type").on("change", function() {
if ($(this).val() == "block") {
$(".node-type-wait").hide();
$(".node-type-duration").hide();
@@ -160,7 +160,7 @@
} else {
$("#node-then-type").val("wait");
}
$("#node-then-type").change();
$("#node-then-type").trigger("change");
if (this.extend === "true" || this.extend === true) {
$("#node-input-extend").prop("checked",true);

View File

@@ -51,7 +51,7 @@
oneditresize: function(size) {
var rows = $("#dialog-form>div:not(.node-text-editor-row)");
var height = $("#dialog-form").height();
for (var i=0; i<rows.size(); i++) {
for (var i=0; i<rows.length; i++) {
height -= $(rows[i]).outerHeight(true);
}
var editorRow = $("#dialog-form>div.node-text-editor-row");

View File

@@ -92,7 +92,7 @@ RED.debug = (function() {
parent: headerCheckbox
});
flowCheckboxes[node.id] = muteControl;
row.click(function(e) {
row.on("click", function(e) {
e.stopPropagation();
debugNodeListExpandedFlows[node.id] = !debugNodeListExpandedFlows[node.id];
row.toggleClass('expanded',debugNodeListExpandedFlows[node.id]);
@@ -116,7 +116,7 @@ RED.debug = (function() {
var muteControl = $('<input type="checkbox">').prop('checked',!filteredNodes[node.id]).appendTo($('<span class="meta">').appendTo(row));
muteControl.checkboxSet({
parent: flowCheckboxes[node.z]
}).change(function(e) {
}).on("change", function(e) {
filteredNodes[node.id] = !$(this).prop('checked');
$(".debug-message-node-"+node.id.replace(/\./g,"_")).toggleClass('hide',filteredNodes[node.id]);
});
@@ -218,7 +218,7 @@ RED.debug = (function() {
});
RED.popover.tooltip(toolbar.find('#debug-tab-filter'),RED._('node-red:debug.sidebar.filterLog'));
toolbar.find("#debug-tab-clear").click(function(e) {
toolbar.find("#debug-tab-clear").on("click", function(e) {
e.preventDefault();
clearMessageList(false);
});
@@ -351,11 +351,11 @@ RED.debug = (function() {
filteredNodes[n.id] = true;
});
delete filteredNodes[sourceId];
$("#debug-tab-filterSelected").click();
$("#debug-tab-filterSelected").trigger("click");
refreshMessageList();
}},
{id:"debug-message-menu-item-clear-filter",label:RED._("node-red:debug.messageMenu.clearFilter"),onselect:function(){
$("#debug-tab-filterAll").click();
$("#debug-tab-filterAll").trigger("click");
refreshMessageList();
}}
]
@@ -451,7 +451,7 @@ RED.debug = (function() {
if (sourceNode) {
$('<a>',{href:"#",class:"debug-message-name"}).text('node: '+(sourceNode.name||sourceNode.id))
.appendTo(metaRow)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
config.messageSourceClick(sourceNode.id);
});
@@ -486,7 +486,7 @@ RED.debug = (function() {
} else {
var tools = $('<span class="debug-message-tools button-group"></span>').appendTo(metaRow);
var filterMessage = $('<button class="editor-button editor-button-small"><i class="fa fa-caret-down"></i></button>').appendTo(tools);
filterMessage.click(function(e) {
filterMessage.on("click", function(e) {
e.preventDefault();
e.stopPropagation();
showMessageMenu(filterMessage,debugMessage,sourceNode&&sourceNode.id);

View File

@@ -218,7 +218,7 @@
pinsInUse = data || {};
$('#pin-tip').html(pintip + Object.keys(data));
});
$("#node-input-pin").change(function() {
$("#node-input-pin").on("change", function() {
if ($("#node-input-pin").val()) {
$("#pinform input[value="+$("#node-input-pin").val()+"]").prop('checked', true);
}
@@ -230,7 +230,7 @@
pinnow = pinnew;
}
});
$("#node-input-intype").change(function() {
$("#node-input-intype").on("change", function() {
var newtype = $("#node-input-intype").val();
if ((pinsInUse.hasOwnProperty(pinnow)) && (pinsInUse[pinnow] !== newtype)) {
RED.notify(pinname+" "+pinnow+" "+alreadyset+" "+pinsInUse[pinnow],"error");
@@ -419,7 +419,7 @@
$('#pin-tip').html(pintip + Object.keys(data));
});
$("#node-input-pin").change(function() {
$("#node-input-pin").on("change", function() {
if ($("#node-input-pin").val()) {
$("#pinform input[value="+$("#node-input-pin").val()+"]").prop('checked', true);
}
@@ -432,7 +432,7 @@
}
});
$("#node-input-out").change(function() {
$("#node-input-out").on("change", function() {
var newtype = $("#node-input-out").val();
if ((pinsInUse.hasOwnProperty(pinnow)) && (pinsInUse[pinnow] !== newtype)) {
RED.notify(pinname+" "+pinnow+" "+alreadyset+" "+pinsInUse[pinnow],"error");
@@ -455,7 +455,7 @@
$('#node-set-freq').hide();
}
};
$("#node-input-out").change(function () { hidestate(); });
$("#node-input-out").on("change", function () { hidestate(); });
hidestate();
var setstate = function () {
@@ -465,7 +465,7 @@
$("#node-set-state").hide();
}
};
$("#node-input-set").change(function () { setstate(); });
$("#node-input-set").on("change", function () { setstate(); });
setstate();
$('#pinform input').on('change', function() {

View File

@@ -138,13 +138,13 @@
}
reader.readAsText(file,"UTF-8");
}
$("#node-config-input-certfile" ).change(function() {
$("#node-config-input-certfile" ).on("change", function() {
saveFile("cert", this.files[0]);
});
$("#node-config-input-keyfile" ).change(function() {
$("#node-config-input-keyfile" ).on("change", function() {
saveFile("key", this.files[0]);
});
$("#node-config-input-cafile" ).change(function() {
$("#node-config-input-cafile" ).on("change", function() {
saveFile("ca", this.files[0]);
});
@@ -153,13 +153,13 @@
$("#node-config-input-"+prop+"data").val("");
$("#node-config-input-"+prop+"name").val("");
}
$("#tls-config-button-cert-clear").click(function() {
$("#tls-config-button-cert-clear").on("click", function() {
clearNameData("cert");
});
$("#tls-config-button-key-clear").click(function() {
$("#tls-config-button-key-clear").on("click", function() {
clearNameData("key");
});
$("#tls-config-button-ca-clear").click(function() {
$("#tls-config-button-ca-clear").on("click", function() {
clearNameData("ca");
});

View File

@@ -61,7 +61,7 @@
return this.name || this.url || ('http proxy:' + this.id);
},
oneditprepare: function() {
$('#node-config-input-useAuth').change(function() {
$('#node-config-input-useAuth').on("change", function() {
if ($(this).is(":checked")) {
$('.node-config-input-useAuth-row').show();
} else {
@@ -117,7 +117,7 @@
oneditresize: function(size) {
var rows = $('#node-config-dialog-edit-form>div:not(.node-config-input-noproxy-container-row)');
var height = size.height;
for (var i = 0; i < rows.size(); i++) {
for (var i = 0; i < rows.length; i++) {
height -= $(rows[i]).outerHeight(true);
}

View File

@@ -344,7 +344,7 @@
twistie.toggleClass('expanded', expanded);
sectionContent.toggle(expanded);
}
paletteHeader.click(function(e) {
paletteHeader.on("click", function(e) {
e.preventDefault();
var isExpanded = twistie.hasClass('expanded');
toggleSection(!isExpanded);
@@ -429,7 +429,7 @@
}
}
}
$("#node-config-input-broker").change(function() {
$("#node-config-input-broker").on("change", function() {
updatePortEntry();
});
$("#node-config-input-broker").on( "keyup", function() {

View File

@@ -113,7 +113,7 @@
if(!RED.nodes.getType("swagger-doc")){
$('.row-swagger-doc').hide();
}
$("#node-input-method").change(function() {
$("#node-input-method").on("change", function() {
if ($(this).val() === "post") {
$(".form-row-http-in-upload").show();
} else {
@@ -267,7 +267,7 @@
oneditresize: function(size) {
var rows = $("#dialog-form>div:not(.node-input-headers-container-row)");
var height = size.height;
for (var i=0; i<rows.size(); i++) {
for (var i=0; i<rows.length; i++) {
height -= $(rows[i]).outerHeight(true);
}
var editorRow = $("#dialog-form>div.node-input-headers-container-row");

View File

@@ -125,7 +125,7 @@
return this.name?"node_label_italic":"";
},
oneditprepare: function() {
$("#node-input-useAuth").change(function() {
$("#node-input-useAuth").on("change", function() {
if ($(this).is(":checked")) {
$(".node-input-useAuth-row").show();
// Nodes (< version 0.20.x) with credentials but without authentication type, need type 'basic'
@@ -139,7 +139,7 @@
$('#node-input-password').val('');
}
});
$("#node-input-authType").change(function() {
$("#node-input-authType").on("change", function() {
if ($(this).val() == "basic" || $(this).val() == "digest") {
$(".node-input-basic-row").show();
$('#node-span-password').show();
@@ -151,7 +151,7 @@
$('#node-input-user').val('');
}
});
$("#node-input-method").change(function() {
$("#node-input-method").on("change", function() {
if ($(this).val() == "GET") {
$(".node-input-paytoqs-row").show();
} else {
@@ -199,7 +199,7 @@
updateProxyOptions();
});
$("#node-input-ret").change(function() {
$("#node-input-ret").on("change", function() {
if ($("#node-input-ret").val() === "obj") {
$("#tip-json").show();
} else {

View File

@@ -42,7 +42,7 @@
function ws_oneditprepare() {
$("#websocket-client-row").hide();
$("#node-input-mode").change(function() {
$("#node-input-mode").on("change", function() {
if ( $("#node-input-mode").val() === 'client') {
$("#websocket-server-row").hide();
$("#websocket-client-row").show();

View File

@@ -235,7 +235,7 @@
},
oneditprepare: function() {
var previous = null;
$("#node-input-out").on('focus', function () { previous = this.value; }).change(function() {
$("#node-input-out").on('focus', function () { previous = this.value; }).on("change", function() {
if (previous === null) { previous = $("#node-input-out").val(); }
if ($("#node-input-out").val() == "char") {
if (previous != "char") { $("#node-input-splitc").val("\\n"); }

View File

@@ -33,7 +33,7 @@ module.exports = function(RED) {
*/
const enqueue = (queue, item) => {
// drop msgs from front of queue if size is going to be exceeded
if (queue.size() === msgQueueSize) { queue.shift(); }
if (queue.length === msgQueueSize) { queue.shift(); }
queue.push(item);
return queue;
};

View File

@@ -83,7 +83,7 @@
return this.name?"node_label_italic":"";
},
oneditprepare: function() {
$("#node-input-multicast").change(function() {
$("#node-input-multicast").on("change", function() {
var id = $("#node-input-multicast").val();
if (id == "false") {
$(".node-input-group").hide();
@@ -103,7 +103,7 @@
portsInUse = data || {};
$('#udpporttip').html(porttip + data);
});
$("#node-input-port").change(function() {
$("#node-input-port").on("change", function() {
var portnew = $("#node-input-port").val();
if (portsInUse.hasOwnProperty($("#node-input-port").val())) {
RED.notify(alreadyused+" "+$("#node-input-port").val(),"warn");
@@ -191,7 +191,7 @@
var type = this.outport===""?"random":"fixed";
$("#node-input-outport-type").val(type);
$("#node-input-outport-type").change(function() {
$("#node-input-outport-type").on("change", function() {
var type = $(this).val();
if (type == "random") {
$("#node-input-outport").val("").hide();
@@ -201,7 +201,7 @@
});
$("#node-input-outport-type").change();
$("#node-input-multicast").change(function() {
$("#node-input-multicast").on("change", function() {
var id = $("#node-input-multicast").val();
if (id === "multi") {
$(".node-input-iface").show();

View File

@@ -230,7 +230,7 @@
finalspan.append(' &#8594; <span class="node-input-rule-index">'+(i+1)+'</span> ');
var caseSensitive = $('<input/>',{id:"node-input-rule-case-"+i,class:"node-input-rule-case",type:"checkbox",style:"width:auto;vertical-align:top"}).appendTo(row2);
$('<label/>',{for:"node-input-rule-case-"+i,style:"margin-left: 3px;"}).text(caseLabel).appendTo(row2);
selectField.change(function() {
selectField.on("change", function() {
resizeRule(container);
var type = selectField.val();
if ((type === "btwn") || (type === "index")) {
@@ -390,7 +390,7 @@
oneditresize: function(size) {
var rows = $("#dialog-form>div:not(.node-input-rule-container-row)");
var height = size.height;
for (var i=0;i<rows.size();i++) {
for (var i=0;i<rows.length;i++) {
height -= $(rows[i]).outerHeight(true);
}
var editorRow = $("#dialog-form>div.node-input-rule-container-row");

View File

@@ -151,7 +151,7 @@
.appendTo(row4)
.typedInput({default:'msg',types:['msg','flow','global']});
selectField.change(function() {
selectField.on("change", function() {
var width = $("#node-input-rule-container").width();
var type = $(this).val();
if (type == "set") {
@@ -255,7 +255,7 @@
oneditresize: function(size) {
var rows = $("#dialog-form>div:not(.node-input-rule-container-row)");
var height = size.height;
for (var i=0; i<rows.size(); i++) {
for (var i=0; i<rows.length; i++) {
height -= $(rows[i]).outerHeight(true);
}
var editorRow = $("#dialog-form>div.node-input-rule-container-row");

View File

@@ -93,7 +93,7 @@
types:['msg']
});
$("#node-input-addname-cb").change(function() {
$("#node-input-addname-cb").on("change", function() {
$("#node-input-addname").prop('disabled',!this.checked);
})
if (this.addname === "") {
@@ -228,7 +228,7 @@
oneditprepare: function() {
var node = this;
$("#node-input-mode").change(function(e) {
$("#node-input-mode").on("change", function(e) {
var val = $(this).val();
$(".node-row-custom").toggle(val==='custom');
$(".node-row-reduce").toggle(val==='reduce');
@@ -275,7 +275,7 @@
}
});
$("#node-input-build").change(function(e) {
$("#node-input-build").on("change", function(e) {
var val = $(this).val();
$(".node-row-key").toggle(val==='object');
$(".node-row-accumulate").toggle(val==='object' || val==='merged');

View File

@@ -108,7 +108,7 @@
typeField: $("#node-input-seqKeyType"),
types:['msg', 'jsonata']
});
$("#node-input-target").change(function(e) {
$("#node-input-target").on("change", function(e) {
var val = $("#node-input-target").typedInput('type');
$(".node-row-sort-msg-key").toggle(val === "msg");
$(".node-row-sort-seq-key").toggle(val === "seq");

View File

@@ -125,7 +125,7 @@
$("#node-input-count").spinner({min:1});
$("#node-input-overlap").spinner({min:0});
$("#node-input-interval").spinner({min:1});
$("#node-input-mode").change(function(e) {
$("#node-input-mode").on("change", function(e) {
var val = $(this).val();
$(".node-row-msg-count").toggle(val==="count");
$(".node-row-msg-overlap").toggle(val==="count");
@@ -159,7 +159,7 @@
oneditresize: function(size) {
var rows = $("#dialog-form>div:not(.node-input-topics-container-row)");
var height = size.height;
for (var i = 0; i < rows.size(); i++) {
for (var i = 0; i < rows.length; i++) {
height -= $(rows[i]).outerHeight(true);
}
var editorRow = $("#dialog-form>div.node-input-topics-container-row");

View File

@@ -94,7 +94,7 @@
$("#node-input-sep").val(this.sep);
$("#node-input-sep").show();
}
$("#node-input-select-sep").change(function() {
$("#node-input-select-sep").on("change", function() {
var v = $("#node-input-select-sep").val();
$("#node-input-sep").val(v);
if (v == "") {

View File

@@ -49,7 +49,7 @@
$("#node-input-property").val("payload");
}
$("#node-input-property").typedInput({default:'msg',types:['msg']});
$("#node-input-action").change(function() {
$("#node-input-action").on("change", function() {
if (this.value === "" || this.value === "str") {
$(".node-json-to-json-options").show();
} else {