1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
99 changed files with 1257 additions and 404 deletions

View File

@ -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,

View File

@ -143,7 +143,7 @@ RED.comms = (function() {
} else {
var msg = RED._("notification.errors.lostConnectionReconnect",{time: connectCountdown})+' <a href="#">'+ RED._("notification.errors.lostConnectionTry")+'</a>';
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);

View File

@ -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) {

View File

@ -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();

View File

@ -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.

View File

@ -77,7 +77,7 @@
}
$('<a href="#" class="editor-button editor-button-small red-ui-editableList-addButton" style="margin-top: 4px;"><i class="fa fa-plus"></i> '+addLabel+'</a>')
.appendTo(this.topContainer)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
that.addItem({});
});
@ -260,7 +260,7 @@
var deleteButton = $('<a/>',{href:"#",class:"red-ui-editableList-item-remove editor-button editor-button-small"}).appendTo(li);
$('<i/>',{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")

View File

@ -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();
});
}

View File

@ -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;

View File

@ -44,7 +44,7 @@
e.preventDefault();
that.element.val("");
that._change("",true);
that.element.focus();
that.element.trigger("focus");
});
this.resultCount = $('<span>',{class:"red-ui-searchBox-resultCount hide"}).appendTo(this.uiContainer);

View File

@ -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 = $('<div></div>').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<entries.length;i++) {

View File

@ -37,7 +37,7 @@ RED.tabs = (function() {
if (options.addButton) {
wrapper.addClass("red-ui-tabs-add");
var addButton = $('<div class="red-ui-tab-button red-ui-tabs-add"><a href="#"><i class="fa fa-plus"></i></a></div>').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 = $('<div class="red-ui-tab-button red-ui-tabs-search"><a href="#"><i class="fa fa-list-ul"></i></a></div>').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 = $('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-left"><a href="#" style="display:none;"><i class="fa fa-caret-left"></i></a></div>').appendTo(wrapper).find("a");
scrollLeft.on('mousedown',function(evt) { scrollEventHandler(evt,'-=150') }).on('click',function(evt){ evt.preventDefault();});
scrollRight = $('<div class="red-ui-tab-button red-ui-tab-scroll red-ui-tab-scroll-right"><a href="#" style="display:none;"><i class="fa fa-caret-right"></i></a></div>').appendTo(wrapper).find("a");
@ -113,7 +113,7 @@ RED.tabs = (function() {
if (options.menu !== false) {
var selectButton = $('<a href="#"><i class="fa fa-caret-down"></i></a>').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 {
$('<i>',{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;

View File

@ -262,7 +262,7 @@
$('<span class="red-ui-treeList-icon"><i class="fa fa-angle-right" /></span>').appendTo(label);
// $('<span class="red-ui-treeList-icon"><i class="fa fa-folder-o" /></span>').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)

View File

@ -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);
}

View File

@ -93,7 +93,7 @@ RED.deploy = (function() {
'</span></li>').prependTo(".header-toolbar");
}
$('#btn-deploy').click(function(event) {
$('#btn-deploy').on("click", function(event) {
event.preventDefault();
save();
});

View File

@ -133,7 +133,7 @@ RED.diff = (function() {
$('<span class="node-diff-chevron"><i class="fa fa-angle-down"></i></span>').appendTo(originalNodeDiv);
$('<span>').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])) {
$('<button class="editor-button editor-button-small node-diff-text-diff-button"><i class="fa fa-file-o"> <i class="fa fa-caret-left"></i> <i class="fa fa-caret-right"></i> <i class="fa fa-file-o"></i></button>').click(function() {
$('<button class="editor-button editor-button-small node-diff-text-diff-button"><i class="fa fa-file-o"> <i class="fa fa-caret-left"></i> <i class="fa fa-caret-right"></i> <i class="fa fa-file-o"></i></button>').on("click", function() {
showTextDiff(localNode[d],remoteNode[d]);
}).appendTo(propertyNameCell);
}
@ -1029,10 +1029,10 @@ RED.diff = (function() {
refreshConflictHeader(diff);
}
var localSelectDiv = $('<label>',{class:"node-diff-selectbox",for:safeNodeId+"-local"}).click(function(e) { e.stopPropagation();}).appendTo(localDiv);
var localRadio = $('<input>',{id:safeNodeId+"-local",type:'radio',value:"local",name:safeNodeId,class:className+"-local"+(titleRow?"":" node-diff-select-node")}).data('node-id',node.id).change(changeHandler).appendTo(localSelectDiv);
var remoteSelectDiv = $('<label>',{class:"node-diff-selectbox",for:safeNodeId+"-remote"}).click(function(e) { e.stopPropagation();}).appendTo(remoteDiv);
var remoteRadio = $('<input>',{id:safeNodeId+"-remote",type:'radio',value:"remote",name:safeNodeId,class:className+"-remote"+(titleRow?"":" node-diff-select-node")}).data('node-id',node.id).change(changeHandler).appendTo(remoteSelectDiv);
var localSelectDiv = $('<label>',{class:"node-diff-selectbox",for:safeNodeId+"-local"}).on("click", function(e) { e.stopPropagation();}).appendTo(localDiv);
var localRadio = $('<input>',{id:safeNodeId+"-local",type:'radio',value:"local",name:safeNodeId,class:className+"-local"+(titleRow?"":" node-diff-select-node")}).data('node-id',node.id).on("change", changeHandler).appendTo(localSelectDiv);
var remoteSelectDiv = $('<label>',{class:"node-diff-selectbox",for:safeNodeId+"-remote"}).on("click", function(e) { e.stopPropagation();}).appendTo(remoteDiv);
var remoteRadio = $('<input>',{id:safeNodeId+"-remote",type:'radio',value:"remote",name:safeNodeId,class:className+"-remote"+(titleRow?"":" node-diff-select-node")}).data('node-id',node.id).on("change", changeHandler).appendTo(remoteSelectDiv);
if (state === 'local') {
localRadio.prop('checked',true);
} else if (state === 'remote') {
@ -1587,7 +1587,7 @@ RED.diff = (function() {
if (end < diffLines.length-1) {
label.text("@@ -"+(diffLines[end-1].a.i+1)+" +"+(diffLines[end-1].b.i+1));
}
diffRow.click(function(evt) {
diffRow.on("click", function(evt) {
// console.log(start,end,diffLines.length);
if (end - start > 20) {
var startPos = $(this).offset();
@ -1738,7 +1738,7 @@ RED.diff = (function() {
var content = $('<td colspan="3"></td>').appendTo(diffFileRow);
var chevron = $('<i class="node-diff-chevron fa fa-angle-down"></i>').appendTo(content);
diffFileRow.click(function(e) {
diffFileRow.on("click", function(e) {
diffFileRow.toggleClass("collapsed");
var isCollapsed = diffFileRow.hasClass("collapsed");
diffFileRow.nextUntil(".node-text-diff-file-header").toggle(!isCollapsed);
@ -1926,7 +1926,7 @@ RED.diff = (function() {
diffRow.addClass("mergeHeader-"+(isOurs?"ours":"theirs"));
$('<button class="editor-button editor-button-small" style="float: right; margin-right: 20px;"><i class="fa fa-angle-double-'+(isOurs?"down":"up")+'"></i> use '+(isOurs?"local":"remote")+' changes</button>')
.appendTo(line)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
resolvedConflicts++;
var addedRows;

View File

@ -267,7 +267,7 @@ RED.editor = (function() {
$('<a id="'+prefix+'-lookup-'+property+'" class="editor-button"><i class="fa fa-pencil"></i></a>')
.css({position:'absolute',right:0,top:0})
.appendTo(outerWrap);
$('#'+prefix+'-lookup-'+property).click(function(e) {
$('#'+prefix+'-lookup-'+property).on("click", function(e) {
showEditConfigNodeDialog(property,type,select.find(":selected").val(),prefix);
e.preventDefault();
});
@ -301,7 +301,7 @@ RED.editor = (function() {
button.text(RED._("editor.configAdd"));
}
button.click(function(e) {
button.on("click", function(e) {
showEditConfigNodeDialog(property,type,input.val()||"_ADD_",prefix);
e.preventDefault();
});
@ -355,7 +355,7 @@ RED.editor = (function() {
}
});
} else {
$("#"+prefix+"-"+property).change(function(event,skipValidation) {
$("#"+prefix+"-"+property).on("change", function(event,skipValidation) {
if (!skipValidation) {
validateNodeEditor(node,prefix);
}
@ -583,7 +583,7 @@ RED.editor = (function() {
actionButton.hide();
}
var restoreTip = RED.popover.tooltip(actionButton,RED._("subflow.env.restore"));
valueField.change(function(evt) {
valueField.on("change", function(evt) {
var newType = valueField.typedInput('type');
var newValue = valueField.typedInput('value');
if (newType === opt.parent.type && newValue === opt.parent.value) {
@ -592,7 +592,7 @@ RED.editor = (function() {
actionButton.show();
}
})
actionButton.click(function(evt) {
actionButton.on("click", function(evt) {
evt.preventDefault();
restoreTip.close();
valueField.typedInput('type', opt.parent.type);
@ -600,7 +600,7 @@ RED.editor = (function() {
})
} else {
var removeTip = RED.popover.tooltip(actionButton,RED._("subflow.env.remove"));
actionButton.click(function(evt) {
actionButton.on("click", function(evt) {
evt.preventDefault();
removeTip.close();
container.parent().addClass("red-ui-editableList-item-deleting")
@ -711,7 +711,7 @@ RED.editor = (function() {
// Add in reverse order as they are prepended...
$('<input type="password" style="display: none;" />').prependTo(dialogForm);
$('<input type="text" style="display: none;" />').prependTo(dialogForm);
dialogForm.submit(function(e) { e.preventDefault();});
dialogForm.on("submit", function(e) { e.preventDefault();});
return dialogForm;
}
@ -838,7 +838,7 @@ RED.editor = (function() {
$('<label>',{for:id}).text((index+1)+".").appendTo(result);
var input = $('<input>',{type:"text",id:id, placeholder: placeHolder}).val(value).appendTo(result);
var clear = $('<button type="button" class="editor-button editor-button-small"><i class="fa fa-times"></i></button>').appendTo(result);
clear.click(function(evt) {
clear.on("click", function(evt) {
evt.preventDefault();
input.val("");
})
@ -894,7 +894,7 @@ RED.editor = (function() {
var iconList = $('<div class="red-ui-icon-list">').appendTo(picker);
var metaRow = $('<div class="red-ui-icon-meta"></div>').appendTo(picker);
var summary = $('<span>').appendTo(metaRow);
var resetButton = $('<button type="button" class="editor-button editor-button-small">'+RED._("editor.useDefault")+'</button>').appendTo(metaRow).click(function(e) {
var resetButton = $('<button type="button" class="editor-button editor-button-small">'+RED._("editor.useDefault")+'</button>').appendTo(metaRow).on("click", function(e) {
e.preventDefault();
hide();
done(null);
@ -925,7 +925,7 @@ RED.editor = (function() {
iconDiv.on("mouseout", function() {
summary.html("&nbsp;");
})
iconDiv.click(function() {
iconDiv.on("click", function() {
hide();
done(moduleName+"/"+icon);
})
@ -933,7 +933,7 @@ RED.editor = (function() {
}
});
picker.slideDown(100);
searchInput.focus();
searchInput.trigger("focus");
}
function buildAppearanceForm(container,node) {
@ -986,7 +986,7 @@ RED.editor = (function() {
var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv);
RED.utils.createIconElement(icon_url, iconContainer, true);
iconButton.click(function(e) {
iconButton.on("click", function(e) {
e.preventDefault();
var iconPath;
var icon = $("#node-settings-icon").text()||"";
@ -1597,7 +1597,7 @@ RED.editor = (function() {
text: RED._("subflow.edit"),
click: function() {
RED.workspaces.show(id);
$("#node-dialog-ok").click();
$("#node-dialog-ok").trigger("click");
}
});
}
@ -2069,7 +2069,7 @@ RED.editor = (function() {
});
select.append('<option value="_ADD_"'+(value===""?" selected":"")+'>'+RED._("editor.addNewType", {type:type})+'</option>');
window.setTimeout(function() { select.change();},50);
window.setTimeout(function() { select.trigger("change");},50);
}
}
}
@ -2281,7 +2281,7 @@ RED.editor = (function() {
$("#subflow-input-category").append($("<option></option>").val("_custom_").text(RED._("palette.addCategory")));
$("#subflow-input-category").change(function() {
$("#subflow-input-category").on("change", function() {
var val = $(this).val();
if (val === "_custom_") {
$("#subflow-input-category").width(120);
@ -2397,7 +2397,7 @@ RED.editor = (function() {
if (options.expandable !== false) {
var expandButton = $('<button type="button" class="editor-button" style="float: right;"><i class="fa fa-expand"></i></button>').appendTo(editor.toolbar);
expandButton.click(function(e) {
expandButton.on("click", function(e) {
e.preventDefault();
var value = editor.getValue();
RED.editor.editMarkdown({
@ -2432,13 +2432,13 @@ RED.editor = (function() {
RED.tray.init();
RED.actions.add("core:confirm-edit-tray", function() {
$(document.activeElement).blur();
$("#node-dialog-ok").click();
$("#node-config-dialog-ok").click();
$("#node-dialog-ok").trigger("click");
$("#node-config-dialog-ok").trigger("click");
});
RED.actions.add("core:cancel-edit-tray", function() {
$(document.activeElement).blur();
$("#node-dialog-cancel").click();
$("#node-config-dialog-cancel").click();
$("#node-dialog-cancel").trigger("click");
$("#node-config-dialog-cancel").trigger("click");
});
},
edit: showEditDialog,

View File

@ -182,7 +182,7 @@
}
});
$(".node-input-buffer-type").click(function(e) {
$(".node-input-buffer-type").on("click", function(e) {
e.preventDefault();
RED.sidebar.info.set(RED._("bufferEditor.modeDesc"));
RED.sidebar.info.show();

View File

@ -95,7 +95,7 @@
Object.keys(jsonata.functions).forEach(function(f) {
funcSelect.append($("<option></option>").val(f).text(f));
})
funcSelect.change(function(e) {
funcSelect.on("change", function(e) {
var f = $(this).val();
var args = RED._('jsonata:'+f+".args",{defaultValue:''});
var title = "<h5>"+f+"("+args+")</h5>";
@ -180,13 +180,13 @@
expressionEditor.session.removeMarker(currentFunctionMarker);
if (scopedFunction) {
//console.log(token,.map(function(t) { return t.type}));
funcSelect.val(scopedFunction.value).change();
funcSelect.val(scopedFunction.value).trigger("change");
}
}
});
dialogForm.i18n();
$("#node-input-expression-func-insert").click(function(e) {
$("#node-input-expression-func-insert").on("click", function(e) {
e.preventDefault();
var pos = expressionEditor.getCursorPosition();
var f = funcSelect.val();
@ -194,7 +194,7 @@
expressionEditor.insertSnippet(snippet);
expressionEditor.focus();
});
$("#node-input-expression-reformat").click(function(evt) {
$("#node-input-expression-reformat").on("click", function(evt) {
evt.preventDefault();
var v = expressionEditor.getValue()||"";
try {
@ -231,7 +231,7 @@
lineNumbers: false
});
var changeTimer;
$(".node-input-expression-legacy").click(function(e) {
$(".node-input-expression-legacy").on("click", function(e) {
e.preventDefault();
RED.sidebar.info.set(RED._("expressionEditor.compatModeDesc"));
RED.sidebar.info.show();
@ -321,7 +321,7 @@
}
});
$("#node-input-example-reformat").click(function(evt) {
$("#node-input-example-reformat").on("click", function(evt) {
evt.preventDefault();
var v = testDataEditor.getValue()||"";
try {

View File

@ -89,7 +89,7 @@
});
checkValid();
}
$("#node-input-json-reformat").click(function(evt) {
$("#node-input-json-reformat").on("click", function(evt) {
evt.preventDefault();
var v = expressionEditor.getValue()||"";
try {

View File

@ -126,7 +126,7 @@
'<button type="button" id="node-btn-markdown-preview" class="editor-button toggle single"><i class="fa fa-eye"></i></button>'+
'</span>').appendTo(expressionEditor.toolbar);
$("#node-btn-markdown-preview").click(function(e) {
$("#node-btn-markdown-preview").on("click", function(e) {
e.preventDefault();
if ($(this).hasClass("selected")) {
$(this).removeClass("selected");
@ -172,7 +172,7 @@
var toolbar = $(toolbarTemplate).appendTo(container);
toolbar.find('button[data-style]').each(function(el) {
var style = styleActions[$(this).data('style')];
$(this).click(function(e) {
$(this).on("click", function(e) {
e.preventDefault();
var current = editor.getSelectedText();
var range = editor.selection.getRange();

View File

@ -109,7 +109,7 @@ RED.h = handlers;
get: getSettingsPane,
focus: function() {
setTimeout(function() {
$("#user-settings-tab-keyboard-filter").focus();
$("#user-settings-tab-keyboard-filter").trigger("focus");
},200);
}
})
@ -399,11 +399,11 @@ RED.h = handlers;
var okButton = $('<button class="editor-button editor-button-small"><i class="fa fa-check"></i></button>').appendTo(div);
var revertButton = $('<button class="editor-button editor-button-small"><i class="fa fa-reply"></i></button>').appendTo(div);
okButton.click(function(e) {
okButton.on("click", function(e) {
e.stopPropagation();
endEditShortcut();
});
revertButton.click(function(e) {
revertButton.on("click", function(e) {
e.stopPropagation();
RED.keyboard.revertToDefault(object.id);
container.empty();
@ -426,7 +426,7 @@ RED.h = handlers;
buildShortcutRow(container,obj);
})
keyInput.focus();
keyInput.trigger("focus");
}
}
@ -510,7 +510,7 @@ RED.h = handlers;
var scope = $('<div class="keyboard-shortcut-entry-scope">').appendTo(item);
$("<span>").text(object.scope === '*'?'global':object.scope||"").appendTo(scope);
container.click(editShortcut);
container.on("click", editShortcut);
}
function getSettingsPane() {

View File

@ -209,7 +209,7 @@ RED.library = (function() {
'</ul></div>'
);
$('#node-input-'+options.type+'-menu-open-library').click(function(e) {
$('#node-input-'+options.type+'-menu-open-library').on("click", function(e) {
activeLibrary = options;
loadLibraryFolder("local",options.url, "", function(items) {
var listing = [{
@ -249,7 +249,7 @@ RED.library = (function() {
e.preventDefault();
});
$('#node-input-'+options.type+'-menu-save-library').click(function(e) {
$('#node-input-'+options.type+'-menu-save-library').on("click", function(e) {
activeLibrary = options;
//var found = false;
var name = $("#"+elementPrefix+"name").val().replace(/(^\s*)|(\s*$)/g,"");
@ -299,7 +299,7 @@ RED.library = (function() {
});
var itemTools = $("<div>").css({position: "absolute",bottom:"6px",right:"8px"});
var menuButton = $('<button class="editor-button editor-button-small" type="button"><i class="fa fa-ellipsis-h"></i></button>')
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
evt.stopPropagation();
var elementPos = menuButton.offset();
@ -368,12 +368,12 @@ RED.library = (function() {
cancelAdd();
}
})
input.blur(function() {
input.on("blur", function() {
confirmAdd();
})
selected.treeList.addChild(newItem);
setTimeout(function() {
input.focus();
input.trigger("focus");
input.select();
},400);
}
@ -469,7 +469,7 @@ RED.library = (function() {
}
}
});
$("#node-dialog-library-save-filename").keyup(function() { validateExportFilename($(this))});
$("#node-dialog-library-save-filename").on("keyup", function() { validateExportFilename($(this))});
$("#node-dialog-library-save-filename").on('paste',function() { var input = $(this); setTimeout(function() { validateExportFilename(input)},10)});
$( "#node-dialog-library-load" ).dialog({

View File

@ -105,7 +105,7 @@ RED.notifications = (function() {
if (options.buttons) {
var buttonSet = $('<div style="margin-top: 20px;" class="ui-dialog-buttonset"></div>').appendTo(n)
options.buttons.forEach(function(buttonDef) {
var b = $('<button>').html(buttonDef.text).click(buttonDef.click).appendTo(buttonSet);
var b = $('<button>').html(buttonDef.text).on("click", buttonDef.click).appendTo(buttonSet);
if (buttonDef.id) {
b.attr('id',buttonDef.id);
}
@ -192,7 +192,7 @@ RED.notifications = (function() {
if (options.buttons) {
var buttonSet = $('<div style="margin-top: 20px;" class="ui-dialog-buttonset"></div>').appendTo(nn)
options.buttons.forEach(function(buttonDef) {
var b = $('<button>').text(buttonDef.text).click(buttonDef.click).appendTo(buttonSet);
var b = $('<button>').text(buttonDef.text).on("click", buttonDef.click).appendTo(buttonSet);
if (buttonDef.id) {
b.attr('id',buttonDef.id);
}
@ -221,7 +221,7 @@ RED.notifications = (function() {
})();
if (!fixed) {
$(n).click((function() {
$(n).on("click", (function() {
var nn = n;
return function() {
nn.close();
@ -268,7 +268,7 @@ RED.notifications = (function() {
'<i class="fa fa-warning"></i>'+
'</a>'+
'</li>').prependTo(".header-toolbar").hide();
$('#btn-notifications').click(function() {
$('#btn-notifications').on("click", function() {
showPersistent();
})
},

View File

@ -451,7 +451,7 @@ RED.palette.editor = (function() {
focus: function() {
editorTabs.resize();
setTimeout(function() {
filterInput.focus();
filterInput.trigger("focus");
},200);
}
})
@ -560,11 +560,11 @@ RED.palette.editor = (function() {
}
if (tab.id === 'install') {
if (searchInput) {
searchInput.focus();
searchInput.trigger("focus");
}
} else {
if (filterInput) {
filterInput.focus();
filterInput.trigger("focus");
}
}
},
@ -622,7 +622,7 @@ RED.palette.editor = (function() {
var updateButton = $('<a href="#" class="editor-button editor-button-small"></a>').text(RED._('palette.editor.update')).appendTo(buttonGroup);
updateButton.attr('id','up_'+Math.floor(Math.random()*1000000000));
updateButton.click(function(evt) {
updateButton.on("click", function(evt) {
evt.preventDefault();
if ($(this).hasClass('disabled')) {
return;
@ -633,7 +633,7 @@ RED.palette.editor = (function() {
var removeButton = $('<a href="#" class="editor-button editor-button-small"></a>').text(RED._('palette.editor.remove')).appendTo(buttonGroup);
removeButton.attr('id','up_'+Math.floor(Math.random()*1000000000));
removeButton.click(function(evt) {
removeButton.on("click", function(evt) {
evt.preventDefault();
remove(entry,container,function(err){});
})
@ -657,7 +657,7 @@ RED.palette.editor = (function() {
versionSpan: versionSpan,
sets: {}
}
setButton.click(function(evt) {
setButton.on("click", function(evt) {
evt.preventDefault();
if (container.hasClass('expanded')) {
container.removeClass('expanded');
@ -683,7 +683,7 @@ RED.palette.editor = (function() {
$('<span>',{class:"palette-module-type-node"}).text(t).appendTo(typeDiv);
})
var enableButton = $('<a href="#" class="editor-button editor-button-small"></a>').appendTo(buttonGroup);
enableButton.click(function(evt) {
enableButton.on("click", function(evt) {
evt.preventDefault();
if (object.setUseCount[setName] === 0) {
var currentSet = RED.nodes.registry.getNodeSet(set.id);
@ -705,7 +705,7 @@ RED.palette.editor = (function() {
swatches: typeSwatches
};
});
enableButton.click(function(evt) {
enableButton.on("click", function(evt) {
evt.preventDefault();
if (object.totalUseCount === 0) {
changeNodeState(entry.name,(container.hasClass('disabled')),shade,function(xhr){
@ -772,7 +772,7 @@ RED.palette.editor = (function() {
{button: sortRecent, func: sortModulesRecent}
]
sortOpts.forEach(function(opt) {
opt.button.click(function(e) {
opt.button.on("click", function(e) {
e.preventDefault();
if ($(this).hasClass("selected")) {
return;
@ -786,7 +786,7 @@ RED.palette.editor = (function() {
var refreshSpan = $('<span>').appendTo(toolBar);
var refreshButton = $('<a href="#" class="sidebar-header-button"><i class="fa fa-refresh"></i></a>').appendTo(refreshSpan);
refreshButton.click(function(e) {
refreshButton.on("click", function(e) {
e.preventDefault();
loadedList = [];
loadedIndex = {};
@ -805,7 +805,7 @@ RED.palette.editor = (function() {
container.addClass('palette-module-more');
var moreRow = $('<div>',{class:"palette-module-header palette-module"}).appendTo(container);
var moreLink = $('<a href="#"></a>').text(RED._('palette.editor.more',{count:object.more})).appendTo(moreRow);
moreLink.click(function(e) {
moreLink.on("click", function(e) {
e.preventDefault();
packageList.editableList('removeItem',object);
for (var i=object.start;i<Math.min(object.start+10,object.start+object.more);i++) {
@ -845,7 +845,7 @@ RED.palette.editor = (function() {
var buttonRow = $('<div>',{class:"palette-module-meta"}).appendTo(headerRow);
var buttonGroup = $('<div>',{class:"palette-module-button-group"}).appendTo(buttonRow);
var installButton = $('<a href="#" class="editor-button editor-button-small"></a>').text(RED._('palette.editor.install')).appendTo(buttonGroup);
installButton.click(function(e) {
installButton.on("click", function(e) {
e.preventDefault();
if (!$(this).hasClass('disabled')) {
install(entry,container,function(xhr) {});
@ -898,7 +898,7 @@ RED.palette.editor = (function() {
click: function() {
var spinner = RED.utils.addSpinnerOverlay(container, true);
var buttonRow = $('<div style="position: relative;bottom: calc(50% + 17px); padding-right: 10px;text-align: right;"></div>').appendTo(spinner);
$('<button class="editor-button"></button>').text(RED._("eventLog.view")).appendTo(buttonRow).click(function(evt) {
$('<button class="editor-button"></button>').text(RED._("eventLog.view")).appendTo(buttonRow).on("click", function(evt) {
evt.preventDefault();
RED.actions.invoke("core:show-event-log");
});
@ -957,7 +957,7 @@ RED.palette.editor = (function() {
click: function() {
var spinner = RED.utils.addSpinnerOverlay(container, true);
var buttonRow = $('<div style="position: relative;bottom: calc(50% + 17px); padding-right: 10px;text-align: right;"></div>').appendTo(spinner);
$('<button class="editor-button"></button>').text(RED._("eventLog.view")).appendTo(buttonRow).click(function(evt) {
$('<button class="editor-button"></button>').text(RED._("eventLog.view")).appendTo(buttonRow).on("click", function(evt) {
evt.preventDefault();
RED.actions.invoke("core:show-event-log");
});
@ -1023,7 +1023,7 @@ RED.palette.editor = (function() {
var spinner = RED.utils.addSpinnerOverlay(container, true);
var buttonRow = $('<div style="position: relative;bottom: calc(50% + 17px); padding-right: 10px;text-align: right;"></div>').appendTo(spinner);
$('<button class="editor-button"></button>').text(RED._("eventLog.view")).appendTo(buttonRow).click(function(evt) {
$('<button class="editor-button"></button>').text(RED._("eventLog.view")).appendTo(buttonRow).on("click", function(evt) {
evt.preventDefault();
RED.actions.invoke("core:show-event-log");
});

View File

@ -232,7 +232,7 @@ RED.palette = (function() {
// html: true,
// container:'body'
// });
$(d).click(function() {
$(d).on("click", function() {
RED.view.focus();
var helpText;
if (nt.indexOf("subflow:") === 0) {
@ -330,7 +330,7 @@ RED.palette = (function() {
var nodeInfo = null;
if (nt.indexOf("subflow:") === 0) {
$(d).dblclick(function(e) {
$(d).on("dblclick", function(e) {
RED.workspaces.show(nt.substring(8));
e.preventDefault();
});
@ -520,7 +520,7 @@ RED.palette = (function() {
sidebarControls = $('<div class="sidebar-control-left"><i class="fa fa-chevron-left"</div>').appendTo($("#palette"));
RED.popover.tooltip(sidebarControls,RED._("keyboard.togglePalette"),"core:toggle-palette");
sidebarControls.click(function() {
sidebarControls.on("click", function() {
RED.menu.toggleSelected("menu-item-palette");
})
$("#palette").on("mouseenter", function() {
@ -583,7 +583,7 @@ RED.palette = (function() {
$("#main-container").removeClass("palette-closed");
sidebarControls.find("i").removeClass("fa-chevron-right").addClass("fa-chevron-left");
}
setTimeout(function() { $(window).resize(); } ,200);
setTimeout(function() { $(window).trigger("resize"); } ,200);
}

View File

@ -175,14 +175,14 @@ RED.projects.settings = (function() {
var input = $('<input type="text" style="width: calc(100% - 150px); margin-right: 10px;">').val(summary||"").appendTo(container);
$('<button class="editor-button">' + RED._("common.label.cancel") + '</button>')
.appendTo(bg)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
updateProjectSummary(activeProject.summary, container);
editButton.show();
});
$('<button class="editor-button">' + RED._("common.label.save") + '</button>')
.appendTo(bg)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
var v = input.val();
updateProjectSummary(v, container);
@ -237,7 +237,7 @@ RED.projects.settings = (function() {
if (RED.user.hasPermission("projects.write")) {
$('<button class="editor-button editor-button-small" style="float: right;">' + RED._('sidebar.project.editDescription') + '</button>')
.prependTo(summary)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
editSummary(activeProject, activeProject.summary, summaryContent);
});
@ -252,7 +252,7 @@ RED.projects.settings = (function() {
if (RED.user.hasPermission("projects.write")) {
$('<button class="editor-button editor-button-small" style="float: right;">' + RED._('sidebar.project.editReadme') + '</button>')
.prependTo(description)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
editDescription(activeProject, descriptionContent);
});
@ -383,7 +383,7 @@ RED.projects.settings = (function() {
if (RED.user.hasPermission("projects.write")) {
$('<button class="editor-button editor-button-small" style="margin-top:10px;float: right;">' + RED._("sidebar.project.projectSettings.edit") + '</button>')
.appendTo(pane)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
editDependencies(activeProject,null,pane,depsList)
});
@ -403,7 +403,7 @@ RED.projects.settings = (function() {
headerRow.text(entry.label);
// if (RED.user.hasPermission("projects.write")) {
// if (entry.index === 1) {
// var addButton = $('<button class="editor-button editor-button-small palette-module-button">add to project</button>').appendTo(headerRow).click(function(evt) {
// var addButton = $('<button class="editor-button editor-button-small palette-module-button">add to project</button>').appendTo(headerRow).on("click", function(evt) {
// evt.preventDefault();
// var deps = $.extend(true, {}, activeProject.dependencies);
// for (var m in modulesInUse) {
@ -414,7 +414,7 @@ RED.projects.settings = (function() {
// editDependencies(activeProject,JSON.stringify(deps,"",4),pane,depsList);
// });
// } else if (entry.index === 3) {
// var removeButton = $('<button class="editor-button editor-button-small palette-module-button">remove from project</button>').appendTo(headerRow).click(function(evt) {
// var removeButton = $('<button class="editor-button editor-button-small palette-module-button">remove from project</button>').appendTo(headerRow).on("click", function(evt) {
// evt.preventDefault();
// var deps = $.extend(true, {}, activeProject.dependencies);
// for (var m in activeProject.dependencies) {
@ -452,7 +452,7 @@ RED.projects.settings = (function() {
if (RED.user.hasPermission("projects.write")) {
if (!entry.installed && RED.settings.theme('palette.editable') !== false) {
$('<a href="#" class="editor-button editor-button-small">' + RED._("sidebar.project.projectSettings.install") + '</a>').appendTo(buttons)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
RED.palette.editor.install(entry,row,function(err) {
if (!err) {
@ -473,7 +473,7 @@ RED.projects.settings = (function() {
})
} else if (entry.known && entry.count === 0) {
$('<a href="#" class="editor-button editor-button-small">' + RED._("sidebar.project.projectSettings.removeFromProject") + '</a>').appendTo(buttons)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
var deps = $.extend(true, {}, activeProject.dependencies);
delete deps[entry.id];
@ -489,7 +489,7 @@ RED.projects.settings = (function() {
});
} else if (!entry.known) {
$('<a href="#" class="editor-button editor-button-small">' + RED._("sidebar.project.projectSettings.addToProject") + '</a>').appendTo(buttons)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
var deps = $.extend(true, {}, activeProject.dependencies);
deps[entry.id] = modulesInUse[entry.id].version;
@ -595,7 +595,7 @@ RED.projects.settings = (function() {
}
createFileSubList(children,entry.children,current,selectFilter,onselect);
header.addClass("selectable");
header.click(function(e) {
header.on("click", function(e) {
if ($(this).hasClass("expanded")) {
$(this).removeClass("expanded");
children.slideUp(200);
@ -624,12 +624,12 @@ RED.projects.settings = (function() {
if (entry.path === current) {
header.addClass("selected");
}
header.click(function(e) {
header.on("click", function(e) {
$(".projects-dialog-file-list-entry.selected").removeClass("selected");
$(this).addClass("selected");
onselect(entry.path,true);
})
header.dblclick(function(e) {
header.on("dblclick", function(e) {
e.preventDefault();
onselect(entry.path,true);
})
@ -656,7 +656,7 @@ RED.projects.settings = (function() {
//
// var flowFileInputSearch = $('<button class="editor-button" style="margin-left: 10px"><i class="fa fa-folder-open-o"></i></button>')
// .insertAfter(flowFileInput)
// .click(function(e) {
// .on("click", function(e) {
// showProjectFileListing(activeProject,'Select flow file',flowFileInput.val(),function(result) {
// flowFileInput.val(result);
// checkFiles();
@ -673,7 +673,7 @@ RED.projects.settings = (function() {
// var bg = $('<span class="button-group" style="position: relative; float: right; margin-right:0;"></span>').prependTo(container);
// $('<button class="editor-button">Cancel</button>')
// .appendTo(bg)
// .click(function(evt) {
// .on("click", function(evt) {
// evt.preventDefault();
//
// flowFileLabel.show();
@ -684,7 +684,7 @@ RED.projects.settings = (function() {
// });
// var saveButton = $('<button class="editor-button">Save</button>')
// .appendTo(bg)
// .click(function(evt) {
// .on("click", function(evt) {
// evt.preventDefault();
// var newFlowFile = flowFileInput.val();
// var newCredsFile = credentialsFileInput.val();
@ -733,7 +733,7 @@ RED.projects.settings = (function() {
if (RED.user.hasPermission("projects.write")) {
var editFilesButton = $('<button type="button" id="project-settings-tab-settings-file-edit" class="editor-button editor-button-small" style="float: right;">' + RED._('sidebar.project.projectSettings.edit') + '</button>')
.appendTo(title)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
formButtons.show();
editFilesButton.hide();
@ -772,7 +772,7 @@ RED.projects.settings = (function() {
var packageFileInputSearch = $('<button type="button" class="editor-button toggle single" style="border-top-right-radius: 4px; border-bottom-right-radius: 4px; width: 36px; height: 34px; position: absolute; top: -1px; right: -1px;"><i class="fa fa-folder-open-o"></i></button>')
.hide()
.appendTo(packageFileLabel)
.click(function(e) {
.on("click", function(e) {
if ($(this).hasClass('selected')) {
$(this).removeClass('selected');
packageFileLabel.find('.project-file-listing-container').slideUp(200,function() {
@ -796,7 +796,7 @@ RED.projects.settings = (function() {
packageFileSubLabel.hide();
}
if (close) {
$(packageFileInputSearch).click();
$(packageFileInputSearch).trigger("click");
}
checkFiles();
});
@ -841,7 +841,7 @@ RED.projects.settings = (function() {
var flowFileInputSearch = $('<button type="button" class="editor-button toggle single" style="border-top-right-radius: 4px; border-bottom-right-radius: 4px; width: 36px; height: 34px; position: absolute; top: -1px; right: -1px;"><i class="fa fa-folder-open-o"></i></button>')
.hide()
.appendTo(flowFileLabel)
.click(function(e) {
.on("click", function(e) {
if ($(this).hasClass('selected')) {
$(this).removeClass('selected');
flowFileLabel.find('.project-file-listing-container').slideUp(200,function() {
@ -865,7 +865,7 @@ RED.projects.settings = (function() {
}
if (isDblClick) {
$(flowFileInputSearch).click();
$(flowFileInputSearch).trigger("click");
}
checkFiles();
}
@ -952,7 +952,7 @@ RED.projects.settings = (function() {
credentialSecretButtons.css('vertical-align','top');
var credentialSecretResetButton = $('<button type="button" class="editor-button" style="vertical-align: top; width: 36px; margin-bottom: 10px"><i class="fa fa-trash-o"></i></button>')
.appendTo(credentialSecretButtons)
.click(function(e) {
.on("click", function(e) {
e.preventDefault();
if (!$(this).hasClass('selected')) {
credentialSecretNewInput.val("");
@ -976,7 +976,7 @@ RED.projects.settings = (function() {
var credentialSecretEditButton = $('<button type="button" class="editor-button" style="border-top-right-radius: 4px; border-bottom-right-radius: 4px; vertical-align: top; width: 36px; margin-bottom: 10px"><i class="fa fa-pencil"></i></button>')
.appendTo(credentialSecretButtons)
.click(function(e) {
.on("click", function(e) {
e.preventDefault();
if (!$(this).hasClass('selected')) {
credentialSecretExistingInput.val("");
@ -1067,7 +1067,7 @@ RED.projects.settings = (function() {
var formButtons = $('<span class="button-row" style="position: relative; float: right; margin-right:0;"></span>').hide().appendTo(filesContainer);
$('<button type="button" class="editor-button">' + RED._("common.label.cancel") + '</button>')
.appendTo(formButtons)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
var projectPackage = activeProject.files.package||"package.json";
var projectRoot = projectPackage.substring(0,projectPackage.length - 12);
@ -1086,7 +1086,7 @@ RED.projects.settings = (function() {
});
var saveButton = $('<button type="button" class="editor-button">' + RED._("common.label.save") + '</button>')
.appendTo(formButtons)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
var spinner = utils.addSpinnerOverlay(filesContainer);
var done = function(err) {
@ -1222,7 +1222,7 @@ RED.projects.settings = (function() {
var tools = $('<span class="entry-tools">').appendTo(container);
$('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>')
.appendTo(tools)
.click(function(e) {
.on("click", function(e) {
e.preventDefault();
var spinner = utils.addSpinnerOverlay(row).addClass('projects-dialog-spinner-contain');
var notification = RED.notify(RED._("sidebar.project.projectSettings.deleteConfirm", { name: entry.name }), {
@ -1322,15 +1322,15 @@ RED.projects.settings = (function() {
var editRepoButton = $('<button class="editor-button editor-button-small" style="float: right; margin-right: 10px;">' + RED._("sidebar.project.projectSettings.addRemote") + '</button>')
.appendTo(title)
.click(function(evt) {
.on("click", function(evt) {
editRepoButton.attr('disabled',true);
addRemoteDialog.slideDown(200, function() {
addRemoteDialog[0].scrollIntoView();
if (isEmpty) {
remoteNameInput.val('origin');
remoteURLInput.focus();
remoteURLInput.trigger("focus");
} else {
remoteNameInput.focus();
remoteNameInput.trigger("focus");
}
validateForm();
});
@ -1367,7 +1367,7 @@ RED.projects.settings = (function() {
var tools = $('<span class="entry-tools">').appendTo(container);
$('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>')
.appendTo(tools)
.click(function(e) {
.on("click", function(e) {
e.preventDefault();
var spinner = utils.addSpinnerOverlay(row).addClass('projects-dialog-spinner-contain');
var notification = RED.notify(RED._("sidebar.project.projectSettings.deleteRemoteConfrim", { name: entry.name }), {
@ -1493,13 +1493,13 @@ RED.projects.settings = (function() {
.appendTo(addRemoteDialog);
$('<button class="editor-button">' + RED._("common.label.cancel") + '</button>')
.appendTo(formButtons)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
hideEditForm();
});
var saveButton = $('<button class="editor-button">' + RED._("sidebar.project.projectSettings.addRemote2") + '</button>')
.appendTo(formButtons)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
var spinner = utils.addSpinnerOverlay(addRemoteDialog).addClass('projects-dialog-spinner-contain');

View File

@ -49,13 +49,13 @@ RED.projects.userSettings = (function() {
var addKeyButton = $('<button id="user-settings-gitconfig-add-key" class="editor-button editor-button-small" style="float: right; margin-right: 10px;">'+RED._("editor:sidebar.project.userSettings.add")+'</button>')
.appendTo(subtitle)
.click(function(evt) {
.on("click", function(evt) {
addKeyButton.attr('disabled',true);
saveButton.attr('disabled',true);
// bg.children().removeClass("selected");
// addLocalButton.click();
// addLocalButton.trigger("click");
addKeyDialog.slideDown(200);
keyNameInput.focus();
keyNameInput.trigger("focus");
});
var validateForm = function() {
@ -100,7 +100,7 @@ RED.projects.userSettings = (function() {
// var addLocalButton = $('<button class="editor-button toggle selected">use local key</button>').appendTo(bg);
// var uploadButton = $('<button class="editor-button toggle">upload key</button>').appendTo(bg);
// var generateButton = $('<button class="editor-button toggle">generate key</button>').appendTo(bg);
// bg.children().click(function(e) {
// bg.children().on("click", function(e) {
// e.preventDefault();
// if ($(this).hasClass("selected")) {
// return;
@ -181,13 +181,13 @@ RED.projects.userSettings = (function() {
var formButtons = $('<span class="button-row" style="position: relative; float: right; margin: 10px;"></span>').appendTo(addKeyDialog);
$('<button class="editor-button">'+RED._("editor:sidebar.project.userSettings.cancel")+'</button>')
.appendTo(formButtons)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
hideEditForm();
});
var saveButton = $('<button class="editor-button">'+RED._("editor:sidebar.project.userSettings.generate")+'</button>')
.appendTo(formButtons)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
var spinner = utils.addSpinnerOverlay(addKeyDialog).addClass('projects-dialog-spinner-contain');
var payload = {
@ -266,7 +266,7 @@ RED.projects.userSettings = (function() {
var formButtons = $('<span class="button-row" style="position: relative; float: right; margin: 10px;"></span>').appendTo(row);
$('<button class="editor-button editor-button-small">'+RED._("editor:sidebar.project.userSettings.copyPublicKey")+'</button>')
.appendTo(formButtons)
.click(function(evt) {
.on("click", function(evt) {
try {
evt.stopPropagation();
evt.preventDefault();
@ -297,7 +297,7 @@ RED.projects.userSettings = (function() {
$('<span class="entry-name">').text(entry.name).appendTo(topRow);
var tools = $('<span class="button-row entry-tools">').appendTo(topRow);
var expandedRow;
topRow.click(function(e) {
topRow.on("click", function(e) {
if (expandedRow) {
expandedRow.slideUp(200,function() {
expandedRow.remove();
@ -310,7 +310,7 @@ RED.projects.userSettings = (function() {
if (!entry.system) {
$('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>')
.appendTo(tools)
.click(function(e) {
.on("click", function(e) {
e.stopPropagation();
var spinner = utils.addSpinnerOverlay(row).addClass('projects-dialog-spinner-contain');
var notification = RED.notify(RED._("editor:sidebar.project.userSettings.deleteConfirm", {name:entry.name}), {

View File

@ -84,7 +84,7 @@ RED.projects = (function() {
var createAsEmpty = $('<button data-type="empty" class="editor-button projects-dialog-screen-create-type"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-asterisk"></i><br/>'+RED._("projects.welcome.create")+'</button>').appendTo(row);
var createAsClone = $('<button data-type="clone" class="editor-button projects-dialog-screen-create-type"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-git"></i><br/>'+RED._("projects.welcome.clone")+'</button>').appendTo(row);
createAsEmpty.click(function(e) {
createAsEmpty.on("click", function(e) {
e.preventDefault();
createProjectOptions = {
action: "create"
@ -92,7 +92,7 @@ RED.projects = (function() {
show('git-config');
})
createAsClone.click(function(e) {
createAsClone.on("click", function(e) {
e.preventDefault();
createProjectOptions = {
action: "clone"
@ -172,7 +172,7 @@ RED.projects = (function() {
gitEmailInput.on("change keyup paste",validateForm);
// $('<div style="position:relative;"></div>').text("Something something email").appendTo(row);
setTimeout(function() {
gitUsernameInput.focus();
gitUsernameInput.trigger("focus");
validateForm();
},50);
return container;
@ -306,8 +306,8 @@ RED.projects = (function() {
$('<label class="projects-edit-form-sublabel"><small>'+RED._("projects.project-details.opt")+'</small></label>').appendTo(row);
setTimeout(function() {
projectNameInput.focus();
projectNameInput.change();
projectNameInput.trigger("focus");
projectNameInput.trigger("change");
},50);
return container;
},
@ -492,7 +492,7 @@ RED.projects = (function() {
if (projectName === "" || projectName === autoInsertedName) {
autoInsertedName = m[1];
projectNameInput.val(autoInsertedName);
projectNameInput.change();
projectNameInput.trigger("change");
}
}
validateForm();
@ -544,12 +544,12 @@ RED.projects = (function() {
var sshwarningRow = $('<div class="projects-dialog-screen-create-row-auth-error-no-keys"></div>').hide().appendTo(subrow);
$('<div class="form-row"><i class="fa fa-warning"></i> '+RED._("projects.clone-project.ssh-key-desc")+'</div>').appendTo(sshwarningRow);
subrow = $('<div style="text-align: center">').appendTo(sshwarningRow);
$('<button class="editor-button">'+RED._("projects.clone-project.ssh-key-add")+'</button>').appendTo(subrow).click(function(e) {
$('<button class="editor-button">'+RED._("projects.clone-project.ssh-key-add")+'</button>').appendTo(subrow).on("click", function(e) {
e.preventDefault();
dialog.dialog( "close" );
RED.userSettings.show('gitconfig');
setTimeout(function() {
$("#user-settings-gitconfig-add-key").click();
$("#user-settings-gitconfig-add-key").trigger("click");
},500);
});
// -----------------------------------------------------
@ -760,7 +760,7 @@ RED.projects = (function() {
$('<div class="projects-dialog-screen-input-status"></div>').appendTo(subrow);
setTimeout(function() {
projectFlowFileInput.focus();
projectFlowFileInput.trigger("focus");
validateForm();
},50);
@ -861,7 +861,7 @@ RED.projects = (function() {
var credentialsDisabledBox = $('<div class="form-row" style="padding: 7px 8px 3px 8px;border: 1px solid white;border-radius: 4px;border-top-right-radius: 0;border-bottom-right-radius: 0;border-right-color: #ccc; "></div>').appendTo(credentialsLeftBox);
$('<label class="projects-edit-form-inline-label" style="margin-left: 5px"><input type="radio" style="vertical-align: middle; margin-top:0; margin-right: 10px;" name="projects-encryption-type" value="disabled"> <i style="font-size: 1.4em; margin-right: 8px; vertical-align: middle; color: #888;" class="fa fa-unlock"></i> <span style="vertical-align: middle;">'+RED._("projects.encryption-config.disable")+'</span></label>').appendTo(credentialsDisabledBox);
credentialsLeftBox.find("input[name=projects-encryption-type]").click(function(e) {
credentialsLeftBox.find("input[name=projects-encryption-type]").on("click", function(e) {
var val = $(this).val();
var toEnable;
var toDisable;
@ -871,7 +871,7 @@ RED.projects = (function() {
$(".projects-encryption-enabled-row").show();
$(".projects-encryption-disabled-row").hide();
if ($("input[name=projects-encryption-key]:checked").val() === 'custom') {
emptyProjectCredentialInput.focus();
emptyProjectCredentialInput.trigger("focus");
}
} else {
@ -904,21 +904,21 @@ RED.projects = (function() {
row = $('<div class="form-row projects-encryption-disabled-row"></div>').hide().appendTo(credentialsRightBox);
$('<div class="" style="padding: 5px 20px;"><i class="fa fa-warning"></i> '+RED._("projects.encryption-config.desc8")+'</div>').appendTo(row);
credentialsRightBox.find("input[name=projects-encryption-key]").click(function() {
credentialsRightBox.find("input[name=projects-encryption-key]").on("click", function() {
var val = $(this).val();
emptyProjectCredentialInput.attr("disabled",val === 'default');
if (val === "custom") {
emptyProjectCredentialInput.focus();
emptyProjectCredentialInput.trigger("focus");
}
validateForm();
});
setTimeout(function() {
credentialsLeftBox.find("input[name=projects-encryption-type][value=enabled]").click();
credentialsLeftBox.find("input[name=projects-encryption-type][value=enabled]").trigger("click");
if (RED.settings.flowEncryptionType !== 'user') {
credentialsRightBox.find("input[name=projects-encryption-key][value=custom]").click();
credentialsRightBox.find("input[name=projects-encryption-key][value=custom]").trigger("click");
} else {
credentialsRightBox.find("input[name=projects-encryption-key][value=default]").click();
credentialsRightBox.find("input[name=projects-encryption-key][value=default]").trigger("click");
}
validateForm();
},100);
@ -1179,14 +1179,14 @@ RED.projects = (function() {
// var createAsCopy = $('<button data-type="copy" class="editor-button projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i class="fa fa-long-arrow-right fa-2x"></i><i class="fa fa-archive fa-2x"></i><br/>Copy existing</button>').appendTo(row);
var createAsClone = $('<button data-type="clone" class="editor-button projects-dialog-screen-create-type toggle"><i class="fa fa-archive fa-2x"></i><i style="position: absolute;" class="fa fa-git"></i><br/>'+RED._("projects.create.clone")+'</button>').appendTo(row);
// var createAsClone = $('<button data-type="clone" class="editor-button projects-dialog-screen-create-type toggle"><i class="fa fa-git fa-2x"></i><i class="fa fa-arrows-h fa-2x"></i><i class="fa fa-archive fa-2x"></i><br/>Clone Repository</button>').appendTo(row);
row.find(".projects-dialog-screen-create-type").click(function(evt) {
row.find(".projects-dialog-screen-create-type").on("click", function(evt) {
evt.preventDefault();
container.find(".projects-dialog-screen-create-type").removeClass('selected');
$(this).addClass('selected');
container.find(".projects-dialog-screen-create-row").hide();
container.find(".projects-dialog-screen-create-row-"+$(this).data('type')).show();
validateForm();
projectNameInput.focus();
projectNameInput.trigger("focus");
switch ($(this).data('type')) {
case "open": $("#projects-dialog-create").text(RED._("projects.create.open")); break;
case "empty": $("#projects-dialog-create").text(RED._("projects.create.create")); break;
@ -1199,7 +1199,7 @@ RED.projects = (function() {
canSelectActive: false,
dblclick: function(project) {
selectedProject = project;
$("#projects-dialog-create").click();
$("#projects-dialog-create").trigger("click");
},
select: function(project) {
selectedProject = project;
@ -1275,7 +1275,7 @@ RED.projects = (function() {
var credentialsDisabledBox = $('<div class="form-row" style="padding: 7px 8px 3px 8px;border: 1px solid white;border-radius: 4px;border-top-right-radius: 0;border-bottom-right-radius: 0;border-right-color: #ccc; "></div>').appendTo(credentialsLeftBox);
$('<label class="projects-edit-form-inline-label" style="margin-left: 5px"><input type="radio" style="vertical-align: middle; margin-top:0; margin-right: 10px;" name="projects-encryption-type" value="disabled"> <i style="font-size: 1.4em; margin-right: 8px; vertical-align: middle; color: #888;" class="fa fa-unlock"></i> <span style="vertical-align: middle;">'+RED._("projects.create.disable-encryption")+'</span></label>').appendTo(credentialsDisabledBox);
credentialsLeftBox.find("input[name=projects-encryption-type]").click(function(e) {
credentialsLeftBox.find("input[name=projects-encryption-type]").on("click", function(e) {
var val = $(this).val();
var toEnable;
var toDisable;
@ -1285,7 +1285,7 @@ RED.projects = (function() {
$(".projects-encryption-enabled-row").show();
$(".projects-encryption-disabled-row").hide();
if ($("input[name=projects-encryption-key]:checked").val() === 'custom') {
emptyProjectCredentialInput.focus();
emptyProjectCredentialInput.trigger("focus");
}
} else {
toDisable = credentialsEnabledBox;
@ -1317,11 +1317,11 @@ RED.projects = (function() {
row = $('<div class="form-row projects-encryption-disabled-row"></div>').hide().appendTo(credentialsRightBox);
$('<div class="" style="padding: 5px 20px;"><i class="fa fa-warning"></i> '+RED._("projects.create.desc1")+'</div>').appendTo(row);
credentialsRightBox.find("input[name=projects-encryption-key]").click(function() {
credentialsRightBox.find("input[name=projects-encryption-key]").on("click", function() {
var val = $(this).val();
emptyProjectCredentialInput.attr("disabled",val === 'default');
if (val === "custom") {
emptyProjectCredentialInput.focus();
emptyProjectCredentialInput.trigger("focus");
}
validateForm();
})
@ -1348,7 +1348,7 @@ RED.projects = (function() {
if (projectName === "" || projectName === autoInsertedName) {
autoInsertedName = m[1];
projectNameInput.val(autoInsertedName);
projectNameInput.change();
projectNameInput.trigger("change");
}
}
validateForm();
@ -1401,12 +1401,12 @@ RED.projects = (function() {
var sshwarningRow = $('<div class="projects-dialog-screen-create-row-auth-error-no-keys"></div>').hide().appendTo(subrow);
$('<div class="form-row"><i class="fa fa-warning"></i> '+RED._("projects.create.desc2")+'</div>').appendTo(sshwarningRow);
subrow = $('<div style="text-align: center">').appendTo(sshwarningRow);
$('<button class="editor-button">'+RED._("projects.create.add-ssh-key")+'</button>').appendTo(subrow).click(function(e) {
$('<button class="editor-button">'+RED._("projects.create.add-ssh-key")+'</button>').appendTo(subrow).on("click", function(e) {
e.preventDefault();
$('#projects-dialog-cancel').click();
$('#projects-dialog-cancel').trigger("click");
RED.userSettings.show('gitconfig');
setTimeout(function() {
$("#user-settings-gitconfig-add-key").click();
$("#user-settings-gitconfig-add-key").trigger("click");
},500);
});
// -----------------------------------------------------
@ -1419,16 +1419,16 @@ RED.projects = (function() {
switch(options.screen||"empty") {
case "empty": createAsEmpty.click(); break;
case "open": openProject.click(); break;
case "clone": createAsClone.click(); break;
case "empty": createAsEmpty.trigger("click"); break;
case "open": openProject.trigger("click"); break;
case "clone": createAsClone.trigger("click"); break;
}
setTimeout(function() {
if ((options.screen||"empty") !== "open") {
projectNameInput.focus();
projectNameInput.trigger("focus");
} else {
$("#projects-dialog-project-list-search").focus();
$("#projects-dialog-project-list-search").trigger("focus");
}
},50);
return container;
@ -1636,18 +1636,18 @@ RED.projects = (function() {
transition: "left 0.4s",
whitespace: "nowrap",
width:"1000px"
}).click(function(evt) { evt.stopPropagation(); }).appendTo(row);
}).on("click", function(evt) { evt.stopPropagation(); }).appendTo(row);
$('<span>').css({"lineHeight":"40px"}).text(RED._("projects.delete.confirm")).appendTo(cover);
$('<button style="margin-left:20px" class="editor-button">'+RED._("common.label.cancel")+'</button>')
.appendTo(cover)
.click(function(e) {
.on("click", function(e) {
e.stopPropagation();
cover.remove();
done(true);
});
$('<button style="margin-left:20px" class="editor-button primary">'+RED._("common.label.delete")+'</button>')
.appendTo(cover)
.click(function(e) {
.on("click", function(e) {
e.stopPropagation();
cover.remove();
sendRequest({
@ -1820,7 +1820,7 @@ RED.projects = (function() {
var tools = $('<div class="projects-dialog-project-list-entry-tools"></div>').appendTo(header);
$('<button class="editor-button editor-button-small" style="float: right;"><i class="fa fa-trash"></i></button>')
.appendTo(tools)
.click(function(e) {
.on("click", function(e) {
e.stopPropagation();
e.preventDefault();
deleteProject(row,entry.name, function(cancelled) {
@ -1836,7 +1836,7 @@ RED.projects = (function() {
});
row.click(function(evt) {
row.on("click", function(evt) {
$('.projects-dialog-project-list-entry').removeClass('selected');
header.addClass('selected');
selectedListItem = row.parent();
@ -1844,10 +1844,10 @@ RED.projects = (function() {
options.select(entry);
}
ensureSelectedIsVisible();
searchInput.focus();
searchInput.trigger("focus");
})
if (options.dblclick) {
row.dblclick(function(evt) {
row.on("dblclick", function(evt) {
evt.preventDefault();
options.dblclick(entry);
})
@ -2121,7 +2121,7 @@ RED.projects = (function() {
$('<span class="current"></span>').text(options.currentLabel||RED._("projects.create-branch-list.current")).appendTo(container);
}
}
container.click(function(evt) {
container.on("click", function(evt) {
evt.preventDefault();
if ($(this).hasClass('input-error')) {
return;
@ -2207,7 +2207,7 @@ RED.projects = (function() {
},
// addItem: function(data) { branchList.editableList('addItem',data) },
filter: function() { branchList.editableList('filter') },
focus: function() { branchFilter.focus() }
focus: function() { branchFilter.trigger("focus") }
}
}
@ -2389,7 +2389,7 @@ RED.projects = (function() {
}
RED.projects.settings.show('settings');
setTimeout(function() {
$("#project-settings-tab-settings-file-edit").click();
$("#project-settings-tab-settings-file-edit").trigger("click");
},200)
},
showProjectDependencies: function() {

View File

@ -130,7 +130,7 @@ RED.sidebar.versionControl = (function() {
$('<button class="editor-button editor-button-small"></button>').text(entry.button.label)
.appendTo(toolbar)
.click(entry.button.click);
.on("click", entry.button.click);
}
return;
}
@ -139,7 +139,7 @@ RED.sidebar.versionControl = (function() {
var icon = $('<i class=""></i>').appendTo(container);
var entryLink = $('<a href="#">')
.appendTo(container)
.click(function(e) {
.on("click", function(e) {
e.preventDefault();
viewFileDiff(entry,state);
});
@ -152,7 +152,7 @@ RED.sidebar.versionControl = (function() {
bg = $('<span class="button-group" style="margin-right: 5px;"></span>').appendTo(entryTools);
revertButton = $('<button class="editor-button editor-button-small"><i class="fa fa-reply"></i></button>')
.appendTo(bg)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
var spinner = utils.addSpinnerOverlay(container).addClass('projects-dialog-spinner-contain');
@ -207,7 +207,7 @@ RED.sidebar.versionControl = (function() {
if (state !== 'unmerged') {
var stageButton = $('<button class="editor-button editor-button-small"><i class="fa fa-'+((state==='unstaged')?"plus":"minus")+'"></i></button>')
.appendTo(bg)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
var activeProject = RED.projects.getActiveProject();
entry.spinner = utils.addSpinnerOverlay(row).addClass('projects-version-control-spinner-sidebar');
@ -324,7 +324,7 @@ RED.sidebar.versionControl = (function() {
var bg = $('<div style="float: right"></div>').appendTo(localChanges.header);
var refreshButton = $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
.appendTo(bg)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
evt.stopPropagation();
refresh(true);
@ -338,7 +338,7 @@ RED.sidebar.versionControl = (function() {
var header = $('<div class="sidebar-version-control-change-header">'+RED._("sidebar.project.versionControl.localFiles")+'</div>').appendTo(unstagedContent);
stageAllButton = $('<button class="editor-button editor-button-small" style="float: right"><i class="fa fa-plus"></i> '+RED._("sidebar.project.versionControl.all")+'</button>')
.appendTo(header)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
evt.stopPropagation();
var toStage = Object.keys(allChanges).filter(function(fn) {
@ -371,7 +371,7 @@ RED.sidebar.versionControl = (function() {
bg = $('<div style="float: right"></div>').appendTo(header);
var abortMergeButton = $('<button class="editor-button editor-button-small" style="margin-right: 5px;">'+RED._("sidebar.project.versionControl.abortMerge")+'</button>')
.appendTo(bg)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
evt.stopPropagation();
var spinner = utils.addSpinnerOverlay(unmergedContent);
@ -452,11 +452,11 @@ RED.sidebar.versionControl = (function() {
unstageAllButton.prop("disabled",true);
commitButton.prop("disabled",true);
abortMergeButton.prop("disabled",true);
commitMessage.focus();
commitMessage.trigger("focus");
}
commitButton = $('<button class="editor-button editor-button-small" style="margin-right: 5px;">'+RED._("sidebar.project.versionControl.commit")+'</button>')
.appendTo(bg)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
evt.stopPropagation();
showCommitBox();
@ -464,7 +464,7 @@ RED.sidebar.versionControl = (function() {
RED.popover.tooltip(commitButton,RED._("sidebar.project.versionControl.commitChanges"));
unstageAllButton = $('<button class="editor-button editor-button-small"><i class="fa fa-minus"></i> '+RED._("sidebar.project.versionControl.all")+'</button>')
.appendTo(bg)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
evt.stopPropagation();
var toUnstage = Object.keys(allChanges).filter(function(fn) {
@ -499,7 +499,7 @@ RED.sidebar.versionControl = (function() {
var cancelCommitButton = $('<button class="editor-button">'+RED._("sidebar.project.versionControl.cancelCapital")+'</button>')
.appendTo(commitToolbar)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
commitMessage.val("");
unstagedContent.css("height","");
@ -517,7 +517,7 @@ RED.sidebar.versionControl = (function() {
})
var submitCommitButton = $('<button class="editor-button">'+RED._("sidebar.project.versionControl.commitCapital")+'</button>')
.appendTo(commitToolbar)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
var spinner = utils.addSpinnerOverlay(submitCommitButton).addClass('projects-dialog-spinner-sidebar');
var activeProject = RED.projects.getActiveProject();
@ -531,7 +531,7 @@ RED.sidebar.versionControl = (function() {
},
200: function(data) {
spinner.remove();
cancelCommitButton.click();
cancelCommitButton.trigger("click");
refresh(true);
},
400: {
@ -558,7 +558,7 @@ RED.sidebar.versionControl = (function() {
bg = $('<div style="float: right"></div>').appendTo(localHistory.header);
refreshButton = $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
.appendTo(bg)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
evt.stopPropagation();
refresh(true,true);
@ -569,7 +569,7 @@ RED.sidebar.versionControl = (function() {
var localBranchButton = $('<button class="editor-button editor-button-small"><i class="fa fa-code-fork"></i> '+RED._("sidebar.project.versionControl.branch")+' <span id="sidebar-version-control-local-branch"></span></button>')
.appendTo(localBranchToolbar)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
if ($(this).hasClass('selected')) {
closeBranchBox();
@ -582,7 +582,7 @@ RED.sidebar.versionControl = (function() {
localBranchBox.show();
setTimeout(function() {
localBranchBox.css("height","215px");
localBranchList.focus();
localBranchList.trigger("focus");
},100);
}
})
@ -597,7 +597,7 @@ RED.sidebar.versionControl = (function() {
'</span>'+
'</button>')
.appendTo(localBranchToolbar)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
if ($(this).hasClass('selected')) {
closeRemoteBox();
@ -627,12 +627,12 @@ RED.sidebar.versionControl = (function() {
if (entry.url) {
row.addClass('sidebar-version-control-commit-more');
row.text("+ "+(entry.total-entry.totalKnown)+RED._("sidebar.project.versionControl.moreCommits"));
row.click(function(e) {
row.on("click", function(e) {
e.preventDefault();
getCommits(entry.url,localCommitList,row,entry.limit,entry.before);
})
} else {
row.click(function(e) {
row.on("click", function(e) {
var activeProject = RED.projects.getActiveProject();
if (activeProject) {
$.getJSON("projects/"+activeProject.name+"/commits/"+entry.sha,function(result) {
@ -763,7 +763,7 @@ RED.sidebar.versionControl = (function() {
var remoteBranchRow = $('<div style="margin-bottom: 5px;"></div>').appendTo(remoteBox);
var remoteBranchButton = $('<button id="sidebar-version-control-repo-branch" class="sidebar-version-control-repo-action editor-button"><i class="fa fa-code-fork"></i> '+RED._("sidebar.project.versionControl.remote")+': <span id="sidebar-version-control-remote-branch"></span></button>')
.appendTo(remoteBranchRow)
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
if ($(this).hasClass('selected')) {
closeRemoteBranchBox();
@ -775,7 +775,7 @@ RED.sidebar.versionControl = (function() {
setTimeout(function() {
remoteBranchSubRow.height(180);
remoteBox.css("height","445px");
remoteBranchList.focus();
remoteBranchList.trigger("focus");
},100);
}
});
@ -788,7 +788,7 @@ RED.sidebar.versionControl = (function() {
var buttonRow = $('<div style="margin: 10px 30px; text-align: center"></div>').appendTo(errorMessage);
$('<button class="editor-button" style="width: 80%;"><i class="fa fa-refresh"></i> '+RED._("sidebar.project.versionControl.retry")+'</button>')
.appendTo(buttonRow)
.click(function(e) {
.on("click", function(e) {
e.preventDefault();
var activeProject = RED.projects.getActiveProject();
var spinner = utils.addSpinnerOverlay(remoteBox).addClass("projects-dialog-spinner-contain");
@ -877,11 +877,11 @@ RED.sidebar.versionControl = (function() {
$('<button id="sidebar-version-control-repo-push" class="sidebar-version-control-repo-sub-action editor-button"><i class="fa fa-long-arrow-up"></i> <span data-i18n="sidebar.project.versionControl.push"></span></button>')
.appendTo(row)
.click(function(e) {
.on("click", function(e) {
e.preventDefault();
var spinner = utils.addSpinnerOverlay(remoteBox).addClass("projects-dialog-spinner-contain");
var buttonRow = $('<div style="position: relative; bottom: 60px;"></div>').appendTo(spinner);
$('<button class="editor-button"></button>').text(RED._("eventLog.view")).appendTo(buttonRow).click(function(evt) {
$('<button class="editor-button"></button>').text(RED._("eventLog.view")).appendTo(buttonRow).on("click", function(evt) {
evt.preventDefault();
RED.actions.invoke("core:show-event-log");
});
@ -931,7 +931,7 @@ RED.sidebar.versionControl = (function() {
options = options || {};
var spinner = utils.addSpinnerOverlay(remoteBox).addClass("projects-dialog-spinner-contain");
var buttonRow = $('<div style="position: relative; bottom: 60px;"></div>').appendTo(spinner);
$('<button class="editor-button"></button>').text(RED._("eventLog.view")).appendTo(buttonRow).click(function(evt) {
$('<button class="editor-button"></button>').text(RED._("eventLog.view")).appendTo(buttonRow).on("click", function(evt) {
evt.preventDefault();
RED.actions.invoke("core:show-event-log");
});
@ -1014,7 +1014,7 @@ RED.sidebar.versionControl = (function() {
}
$('<button id="sidebar-version-control-repo-pull" class="sidebar-version-control-repo-sub-action editor-button"><i class="fa fa-long-arrow-down"></i> <span data-i18n="sidebar.project.versionControl.pull"></span></button>')
.appendTo(row)
.click(function(e) {
.on("click", function(e) {
e.preventDefault();
pullRemote({
setUpstream: $("#sidebar-version-control-repo-toolbar-set-upstream").prop('checked')

View File

@ -232,7 +232,7 @@ RED.search = (function() {
$('<div>',{class:"red-ui-search-result-node-type"}).text(node.type).appendTo(contentDiv);
$('<div>',{class:"red-ui-search-result-node-id"}).text(node.id).appendTo(contentDiv);
div.click(function(evt) {
div.on("click", function(evt) {
evt.preventDefault();
reveal(node);
});
@ -268,7 +268,7 @@ RED.search = (function() {
RED.events.emit("search:open");
visible = true;
}
searchInput.focus();
searchInput.trigger("focus");
}
function hide() {

View File

@ -186,7 +186,7 @@ RED.sidebar = (function() {
});
var sidebarControls = $('<div class="sidebar-control-right"><i class="fa fa-chevron-right"</div>').appendTo($("#sidebar-separator"));
sidebarControls.click(function() {
sidebarControls.on("click", function() {
sidebarControls.hide();
RED.menu.toggleSelected("menu-item-sidebar");
})

View File

@ -326,7 +326,7 @@ RED.subflow = (function() {
toolbar.i18n();
$("#workspace-subflow-output-remove").click(function(event) {
$("#workspace-subflow-output-remove").on("click", function(event) {
event.preventDefault();
var wasDirty = RED.nodes.dirty();
var wasChanged = activeSubflow.changed;
@ -350,17 +350,17 @@ RED.subflow = (function() {
}
});
$("#workspace-subflow-output-add").click(function(event) {
$("#workspace-subflow-output-add").on("click", function(event) {
event.preventDefault();
addSubflowOutput();
});
$("#workspace-subflow-input-add").click(function(event) {
$("#workspace-subflow-input-add").on("click", function(event) {
event.preventDefault();
addSubflowInput();
});
$("#workspace-subflow-input-remove").click(function(event) {
$("#workspace-subflow-input-remove").on("click", function(event) {
event.preventDefault();
var wasDirty = RED.nodes.dirty();
var wasChanged = activeSubflow.changed;
@ -384,7 +384,7 @@ RED.subflow = (function() {
}
});
$("#workspace-subflow-status").change(function(evt) {
$("#workspace-subflow-status").on("change", function(evt) {
if (this.checked) {
addSubflowStatus();
} else {
@ -411,12 +411,12 @@ RED.subflow = (function() {
}
})
$("#workspace-subflow-edit").click(function(event) {
$("#workspace-subflow-edit").on("click", function(event) {
RED.editor.editSubflow(RED.nodes.subflow(RED.workspaces.active()));
event.preventDefault();
});
$("#workspace-subflow-delete").click(function(event) {
$("#workspace-subflow-delete").on("click", function(event) {
event.preventDefault();
var startDirty = RED.nodes.dirty();
var historyEvent = removeSubflow(RED.workspaces.active());

View File

@ -147,7 +147,7 @@ RED.sidebar.config = (function() {
if (node.users.length === 0) {
iconContainer.text(0);
} else {
$('<a href="#"/>').click(function(e) {
$('<a href="#"/>').on("click", function(e) {
e.stopPropagation();
e.preventDefault();
RED.search.show(node.id);
@ -342,14 +342,14 @@ RED.sidebar.config = (function() {
function show(id) {
if (typeof id === 'boolean') {
if (id) {
$('#workspace-config-node-filter-unused').click();
$('#workspace-config-node-filter-unused').trigger("click");
} else {
$('#workspace-config-node-filter-all').click();
$('#workspace-config-node-filter-all').trigger("click");
}
}
refreshConfigNodeList();
if (typeof id === "string") {
$('#workspace-config-node-filter-all').click();
$('#workspace-config-node-filter-all').trigger("click");
id = id.replace(/\./g,"-");
setTimeout(function() {
var node = $(".palette_node_id_"+id);

View File

@ -62,7 +62,7 @@ RED.sidebar.context = (function() {
var bg = $('<div style="float: right"></div>').appendTo(nodeSection.header);
$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
.appendTo(bg)
.click(function(evt) {
.on("click", function(evt) {
evt.stopPropagation();
evt.preventDefault();
updateNode(currentNode, true);
@ -77,7 +77,7 @@ RED.sidebar.context = (function() {
// bg = $('<div style="float: right"></div>').appendTo(subflowSection.header);
// $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
// .appendTo(bg)
// .click(function(evt) {
// .on("click", function(evt) {
// evt.stopPropagation();
// evt.preventDefault();
// })
@ -96,7 +96,7 @@ RED.sidebar.context = (function() {
bg = $('<div style="float: right"></div>').appendTo(flowSection.header);
$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
.appendTo(bg)
.click(function(evt) {
.on("click", function(evt) {
evt.stopPropagation();
evt.preventDefault();
updateFlow(currentFlow);
@ -115,7 +115,7 @@ RED.sidebar.context = (function() {
bg = $('<div style="float: right"></div>').appendTo(globalSection.header);
$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
.appendTo(bg)
.click(function(evt) {
.on("click", function(evt) {
evt.stopPropagation();
evt.preventDefault();
updateEntry(globalSection,"context/global","global");
@ -137,7 +137,7 @@ RED.sidebar.context = (function() {
});
// var toggleLiveButton = $("#sidebar-context-toggle-live");
// toggleLiveButton.click(function(evt) {
// toggleLiveButton.on("click", function(evt) {
// evt.preventDefault();
// if ($(this).hasClass("selected")) {
// $(this).removeClass("selected");
@ -239,7 +239,7 @@ RED.sidebar.context = (function() {
obj.text(k);
var tools = $('<span class="button-group"></span>');
var refreshItem = $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>').appendTo(tools).click(function(e) {
var refreshItem = $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>').appendTo(tools).on("click", function(e) {
e.preventDefault();
e.stopPropagation();
$.getJSON(baseUrl+"/"+k+"?store="+v.store, function(data) {
@ -256,7 +256,7 @@ RED.sidebar.context = (function() {
}
})
});
var deleteItem = $('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>').appendTo(tools).click(function(e) {
var deleteItem = $('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>').appendTo(tools).on("click", function(e) {
e.preventDefault();
e.stopPropagation();
var popover = RED.popover.create({
@ -268,12 +268,12 @@ RED.sidebar.context = (function() {
$('<p data-i18n="sidebar.context.deleteConfirm"></p>').appendTo(content);
var row = $('<p>').appendTo(content);
var bg = $('<span class="button-group"></span>').appendTo(row);
$('<button class="editor-button" data-i18n="common.label.cancel"></button>').appendTo(bg).click(function(e) {
$('<button class="editor-button" data-i18n="common.label.cancel"></button>').appendTo(bg).on("click", function(e) {
e.preventDefault();
popover.close();
});
bg = $('<span class="button-group"></span>').appendTo(row);
$('<button class="editor-button primary" data-i18n="common.label.delete"></button>').appendTo(bg).click(function(e) {
$('<button class="editor-button primary" data-i18n="common.label.delete"></button>').appendTo(bg).on("click", function(e) {
e.preventDefault();
popover.close();
$.ajax({

View File

@ -75,13 +75,13 @@ RED.sidebar.info = (function() {
var tipButtons = $('<div class="node-info-tips-buttons"></div>').appendTo(tipContainer);
var tipRefresh = $('<a href="#" class="workspace-footer-button"><i class="fa fa-refresh"></a>').appendTo(tipButtons);
tipRefresh.click(function(e) {
tipRefresh.on("click", function(e) {
e.preventDefault();
tips.next();
})
var tipClose = $('<a href="#" class="workspace-footer-button"><i class="fa fa-times"></a>').appendTo(tipButtons);
tipClose.click(function(e) {
tipClose.on("click", function(e) {
e.preventDefault();
RED.actions.invoke("core:toggle-show-tips");
RED.notify(RED._("sidebar.info.showTips"));
@ -144,7 +144,7 @@ RED.sidebar.info = (function() {
$('<tr class="node-info-property-expand blank"><td colspan="2"></td></tr>').appendTo(tableBody);
var editProjectButton = $('<button class="editor-button editor-button-small" style="position:absolute;right:2px;"><i class="fa fa-ellipsis-h"></i></button>')
.appendTo(propRow.children()[1])
.click(function(evt) {
.on("click", function(evt) {
evt.preventDefault();
RED.projects.editProject();
});
@ -333,7 +333,7 @@ RED.sidebar.info = (function() {
setInfoText(infoText, infoSection.content);
$(".sidebar-node-info-stack").scrollTop(0);
$(".node-info-property-header").click(function(e) {
$(".node-info-property-header").on("click", function(e) {
e.preventDefault();
expandedSections["property"] = !expandedSections["property"];
$(this).toggleClass("expanded",expandedSections["property"]);
@ -360,7 +360,7 @@ RED.sidebar.info = (function() {
info.find(".bidiAware").contents().filter(function() { return this.nodeType === 3 && this.textContent.trim() !== "" }).wrap( "<span></span>" );
var foldingHeader = "H3";
info.find(foldingHeader).wrapInner('<a class="node-info-header expanded" href="#"></a>')
.find("a").prepend('<i class="fa fa-angle-right">').click(function(e) {
.find("a").prepend('<i class="fa fa-angle-right">').on("click", function(e) {
e.preventDefault();
var isExpanded = $(this).hasClass('expanded');
var el = $(this).parent().next();

View File

@ -55,7 +55,7 @@ RED.tray = (function() {
b.text(button.text);
}
if (button.click) {
b.click((function(action) {
b.on("click", (function(action) {
return function(evt) {
if (!$(this).hasClass('disabled')) {
action(evt);
@ -163,7 +163,7 @@ RED.tray = (function() {
// Delay resetting the flag, so we don't close prematurely
openingTray = false;
},200);
body.find(":focusable:first").focus();
body.find(":focusable:first").trigger("focus");
},150);
el.css({right:0});
@ -203,13 +203,13 @@ RED.tray = (function() {
return {
init: function init() {
$(window).resize(handleWindowResize);
$(window).on("resize", handleWindowResize);
RED.events.on("sidebar:resize",handleWindowResize);
$("#editor-shade").click(function() {
$("#editor-shade").on("click", function() {
if (!openingTray) {
var tray = stack[stack.length-1];
if (tray && tray.primaryButton) {
tray.primaryButton.click();
tray.primaryButton.trigger("click");
}
}
});

View File

@ -90,7 +90,7 @@ RED.typeSearch = (function() {
} else {
addCallback(n.type,true);
}
$("#red-ui-type-search-input").val("").keyup();
$("#red-ui-type-search-input").val("").trigger("keyup");
}
} else if (evt.keyCode === 13) {
// Enter
@ -162,7 +162,7 @@ RED.typeSearch = (function() {
$('<div>',{class:"red-ui-search-result-node-label"}).text(label).appendTo(contentDiv);
div.click(function(evt) {
div.on("click", function(evt) {
evt.preventDefault();
confirm(object);
});
@ -229,7 +229,7 @@ RED.typeSearch = (function() {
searchResultsDiv.slideDown(300);
setTimeout(function() {
searchResultsDiv.find(".red-ui-editableList-container").scrollTop(0);
searchInput.focus();
searchInput.trigger("focus");
},100);
}
function hide(fast) {

View File

@ -79,7 +79,7 @@ RED.utils = (function() {
return false;
}
});
el.click(function(e) {
el.on("click", function(e) {
var parent = $(this).parent();
var currentState = !parent.hasClass('collapsed');
if ($(this).prop('toggle')(!currentState)) {
@ -105,7 +105,7 @@ RED.utils = (function() {
e.preventDefault();
});
if (expand) {
el.click();
el.trigger("click");
}
}
@ -120,13 +120,13 @@ RED.utils = (function() {
var tools = $('<span class="debug-message-tools"></span>').appendTo(obj);
var copyTools = $('<span class="debug-message-tools-copy button-group"></span>').appendTo(tools);
if (!!key) {
var copyPath = $('<button class="editor-button editor-button-small"><i class="fa fa-terminal"></i></button>').appendTo(copyTools).click(function(e) {
var copyPath = $('<button class="editor-button editor-button-small"><i class="fa fa-terminal"></i></button>').appendTo(copyTools).on("click", function(e) {
e.preventDefault();
e.stopPropagation();
RED.clipboard.copyText(key,copyPath,"clipboard.copyMessagePath");
})
}
var copyPayload = $('<button class="editor-button editor-button-small"><i class="fa fa-clipboard"></i></button>').appendTo(copyTools).click(function(e) {
var copyPayload = $('<button class="editor-button editor-button-small"><i class="fa fa-clipboard"></i></button>').appendTo(copyTools).on("click", function(e) {
e.preventDefault();
e.stopPropagation();
RED.clipboard.copyText(msg,copyPayload,"clipboard.copyMessageValue");
@ -134,7 +134,7 @@ RED.utils = (function() {
if (strippedKey !== undefined && strippedKey !== '') {
var isPinned = pinnedPaths[sourceId].hasOwnProperty(strippedKey);
var pinPath = $('<button class="editor-button editor-button-small debug-message-tools-pin"><i class="fa fa-map-pin"></i></button>').appendTo(tools).click(function(e) {
var pinPath = $('<button class="editor-button editor-button-small debug-message-tools-pin"><i class="fa fa-map-pin"></i></button>').appendTo(tools).on("click", function(e) {
e.preventDefault();
e.stopPropagation();
if (pinnedPaths[sourceId].hasOwnProperty(strippedKey)) {
@ -349,7 +349,7 @@ RED.utils = (function() {
if (Number.isInteger(obj) && (obj >= 0)) { // if it's a +ve integer
e.addClass("debug-message-type-number-toggle");
e.click(function(evt) {
e.on("click", function(evt) {
evt.preventDefault();
formatNumber($(this), obj, sourceId, path, true);
});
@ -424,7 +424,7 @@ RED.utils = (function() {
}
$('<pre class="debug-message-type-string"></pre>').text(stringEncoding).appendTo(sr);
var bufferOpts = $('<span class="debug-message-buffer-opts"></span>').appendTo(headerHead);
var switchFormat = $('<a href="#"></a>').addClass('selected').text('raw').appendTo(bufferOpts).click(function(e) {
var switchFormat = $('<a href="#"></a>').addClass('selected').text('raw').appendTo(bufferOpts).on("click", function(e) {
e.preventDefault();
e.stopPropagation();
formatBuffer(element,$(this),sourceId,path,true);

View File

@ -84,7 +84,7 @@
return {
init: function() {
$(window).resize(resizeNavBorder);
$(window).on("resize", resizeNavBorder);
RED.events.on("sidebar:resize",resizeNavBorder);
RED.actions.add("core:toggle-navigator",toggle);
var hideTimeout;
@ -154,7 +154,7 @@
navVis = navBox.append("svg:g")
$("#btn-navigate").click(function(evt) {
$("#btn-navigate").on("click", function(evt) {
evt.preventDefault();
toggle();
})

View File

@ -363,11 +363,11 @@ RED.view = (function() {
RED.view.navigator.init();
$("#btn-zoom-out").click(function() {zoomOut();});
$("#btn-zoom-out").on("click", function() {zoomOut();});
RED.popover.tooltip($("#btn-zoom-out"),RED._('actions.zoom-out'),'core:zoom-out');
$("#btn-zoom-zero").click(function() {zoomZero();});
$("#btn-zoom-zero").on("click", function() {zoomZero();});
RED.popover.tooltip($("#btn-zoom-zero"),RED._('actions.zoom-reset'),'core:zoom-reset');
$("#btn-zoom-in").click(function() {zoomIn();});
$("#btn-zoom-in").on("click", function() {zoomIn();});
RED.popover.tooltip($("#btn-zoom-in"),RED._('actions.zoom-in'),'core:zoom-in');
$("#chart").on("DOMMouseScroll mousewheel", function (evt) {
if ( evt.altKey ) {
@ -449,10 +449,10 @@ RED.view = (function() {
}
}
});
$("#chart").focus(function() {
$("#chart").on("focus", function() {
$("#workspace-tabs").addClass("workspace-focussed");
});
$("#chart").blur(function() {
$("#chart").on("blur", function() {
$("#workspace-tabs").removeClass("workspace-focussed");
});
@ -3283,12 +3283,12 @@ RED.view = (function() {
// setting the focus
var scrollX = window.parent.window.scrollX;
var scrollY = window.parent.window.scrollY;
$("#chart").focus();
$("#chart").trigger("focus");
window.parent.window.scrollTo(scrollX,scrollY);
} catch(err) {
// In case we're iframed into a page of a different origin, just focus
// the view following the inevitable DOMException
$("#chart").focus();
$("#chart").trigger("focus");
}
}

View File

@ -173,7 +173,7 @@ RED.workspaces = (function() {
value: ""
});
$('#node-info-input-info-expand').click(function(e) {
$('#node-info-input-info-expand').on("click", function(e) {
e.preventDefault();
var value = tabflowEditor.getValue();
RED.editor.editMarkdown({
@ -219,7 +219,7 @@ RED.workspaces = (function() {
}
$('<input type="text" style="display: none;" />').prependTo(dialogForm);
dialogForm.submit(function(e) { e.preventDefault();});
dialogForm.on("submit", function(e) { e.preventDefault();});
$("#node-input-name").val(workspace.label);
RED.text.bidi.prepareInput($("#node-input-name"));
tabflowEditor.getSession().setValue(workspace.info || "", -1);
@ -337,7 +337,7 @@ RED.workspaces = (function() {
deleteWorkspace(RED.nodes.workspace(activeWorkspace));
});
$(window).resize(function() {
$(window).on("resize", function() {
workspace_tabs.resize();
});

View File

@ -59,7 +59,7 @@ RED.user = (function() {
var r = row;
return function(event) {
if (event.keyCode == 13) {
r.next("div").find("input").focus();
r.next("div").find("input").trigger("focus");
event.preventDefault();
}
}
@ -74,7 +74,7 @@ RED.user = (function() {
$("#node-dialog-login-submit").button();
$("#node-dialog-login-fields").submit(function(event) {
$("#node-dialog-login-fields").on("submit", function(event) {
$("#node-dialog-login-submit").button("option","disabled",true);
$("#node-dialog-login-failed").hide();
$(".login-spinner").show();
@ -115,7 +115,7 @@ RED.user = (function() {
var field = data.prompts[i];
var row = $("<div/>",{class:"form-row",style:"text-align: center"}).appendTo("#node-dialog-login-fields");
var loginButton = $('<a href="#"></a>',{style: "padding: 10px"}).appendTo(row).click(function() {
var loginButton = $('<a href="#"></a>',{style: "padding: 10px"}).appendTo(row).on("click", function() {
document.location = field.url;
});
if (field.image) {
@ -138,7 +138,7 @@ RED.user = (function() {
}
if (opts.cancelable) {
$("#node-dialog-login-cancel").button().click(function( event ) {
$("#node-dialog-login-cancel").button().on("click", function( event ) {
$("#node-dialog-login").dialog('destroy').remove();
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,626 @@
/*!
* jQuery Migrate - v3.0.1 - 2017-09-26
* Copyright jQuery Foundation and other contributors
*/
;( function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery" ], window, factory );
} else if ( typeof module === "object" && module.exports ) {
// Node/CommonJS
// eslint-disable-next-line no-undef
module.exports = factory( require( "jquery" ), window );
} else {
// Browser globals
factory( jQuery, window );
}
} )( function( jQuery, window ) {
"use strict";
jQuery.migrateVersion = "3.0.1";
/* exported migrateWarn, migrateWarnFunc, migrateWarnProp */
( function() {
var rbadVersions = /^[12]\./;
// Support: IE9 only
// IE9 only creates console object when dev tools are first opened
// IE9 console is a host object, callable but doesn't have .apply()
if ( !window.console || !window.console.log ) {
return;
}
// Need jQuery 3.0.0+ and no older Migrate loaded
if ( !jQuery || rbadVersions.test( jQuery.fn.jquery ) ) {
window.console.log( "JQMIGRATE: jQuery 3.0.0+ REQUIRED" );
}
if ( jQuery.migrateWarnings ) {
window.console.log( "JQMIGRATE: Migrate plugin loaded multiple times" );
}
// Show a message on the console so devs know we're active
window.console.log( "JQMIGRATE: Migrate is installed" +
( jQuery.migrateMute ? "" : " with logging active" ) +
", version " + jQuery.migrateVersion );
} )();
var warnedAbout = {};
// List of warnings already given; public read only
jQuery.migrateWarnings = [];
// Set to false to disable traces that appear with warnings
if ( jQuery.migrateTrace === undefined ) {
jQuery.migrateTrace = true;
}
// Forget any warnings we've already given; public
jQuery.migrateReset = function() {
warnedAbout = {};
jQuery.migrateWarnings.length = 0;
};
function migrateWarn( msg ) {
var console = window.console;
if ( !warnedAbout[ msg ] ) {
warnedAbout[ msg ] = true;
jQuery.migrateWarnings.push( msg );
if ( console && console.warn && !jQuery.migrateMute ) {
console.warn( "JQMIGRATE: " + msg );
if ( jQuery.migrateTrace && console.trace ) {
console.trace();
}
}
}
}
function migrateWarnProp( obj, prop, value, msg ) {
Object.defineProperty( obj, prop, {
configurable: true,
enumerable: true,
get: function() {
migrateWarn( msg );
return value;
},
set: function( newValue ) {
migrateWarn( msg );
value = newValue;
}
} );
}
function migrateWarnFunc( obj, prop, newFunc, msg ) {
obj[ prop ] = function() {
migrateWarn( msg );
return newFunc.apply( this, arguments );
};
}
if ( window.document.compatMode === "BackCompat" ) {
// JQuery has never supported or tested Quirks Mode
migrateWarn( "jQuery is not compatible with Quirks Mode" );
}
var oldInit = jQuery.fn.init,
oldIsNumeric = jQuery.isNumeric,
oldFind = jQuery.find,
rattrHashTest = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,
rattrHashGlob = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;
jQuery.fn.init = function( arg1 ) {
var args = Array.prototype.slice.call( arguments );
if ( typeof arg1 === "string" && arg1 === "#" ) {
// JQuery( "#" ) is a bogus ID selector, but it returned an empty set before jQuery 3.0
migrateWarn( "jQuery( '#' ) is not a valid selector" );
args[ 0 ] = [];
}
return oldInit.apply( this, args );
};
jQuery.fn.init.prototype = jQuery.fn;
jQuery.find = function( selector ) {
var args = Array.prototype.slice.call( arguments );
// Support: PhantomJS 1.x
// String#match fails to match when used with a //g RegExp, only on some strings
if ( typeof selector === "string" && rattrHashTest.test( selector ) ) {
// The nonstandard and undocumented unquoted-hash was removed in jQuery 1.12.0
// First see if qS thinks it's a valid selector, if so avoid a false positive
try {
window.document.querySelector( selector );
} catch ( err1 ) {
// Didn't *look* valid to qSA, warn and try quoting what we think is the value
selector = selector.replace( rattrHashGlob, function( _, attr, op, value ) {
return "[" + attr + op + "\"" + value + "\"]";
} );
// If the regexp *may* have created an invalid selector, don't update it
// Note that there may be false alarms if selector uses jQuery extensions
try {
window.document.querySelector( selector );
migrateWarn( "Attribute selector with '#' must be quoted: " + args[ 0 ] );
args[ 0 ] = selector;
} catch ( err2 ) {
migrateWarn( "Attribute selector with '#' was not fixed: " + args[ 0 ] );
}
}
}
return oldFind.apply( this, args );
};
// Copy properties attached to original jQuery.find method (e.g. .attr, .isXML)
var findProp;
for ( findProp in oldFind ) {
if ( Object.prototype.hasOwnProperty.call( oldFind, findProp ) ) {
jQuery.find[ findProp ] = oldFind[ findProp ];
}
}
// The number of elements contained in the matched element set
jQuery.fn.size = function() {
migrateWarn( "jQuery.fn.size() is deprecated and removed; use the .length property" );
return this.length;
};
jQuery.parseJSON = function() {
migrateWarn( "jQuery.parseJSON is deprecated; use JSON.parse" );
return JSON.parse.apply( null, arguments );
};
jQuery.isNumeric = function( val ) {
// The jQuery 2.2.3 implementation of isNumeric
function isNumeric2( obj ) {
var realStringObj = obj && obj.toString();
return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
}
var newValue = oldIsNumeric( val ),
oldValue = isNumeric2( val );
if ( newValue !== oldValue ) {
migrateWarn( "jQuery.isNumeric() should not be called on constructed objects" );
}
return oldValue;
};
migrateWarnFunc( jQuery, "holdReady", jQuery.holdReady,
"jQuery.holdReady is deprecated" );
migrateWarnFunc( jQuery, "unique", jQuery.uniqueSort,
"jQuery.unique is deprecated; use jQuery.uniqueSort" );
// Now jQuery.expr.pseudos is the standard incantation
migrateWarnProp( jQuery.expr, "filters", jQuery.expr.pseudos,
"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos" );
migrateWarnProp( jQuery.expr, ":", jQuery.expr.pseudos,
"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos" );
var oldAjax = jQuery.ajax;
jQuery.ajax = function( ) {
var jQXHR = oldAjax.apply( this, arguments );
// Be sure we got a jQXHR (e.g., not sync)
if ( jQXHR.promise ) {
migrateWarnFunc( jQXHR, "success", jQXHR.done,
"jQXHR.success is deprecated and removed" );
migrateWarnFunc( jQXHR, "error", jQXHR.fail,
"jQXHR.error is deprecated and removed" );
migrateWarnFunc( jQXHR, "complete", jQXHR.always,
"jQXHR.complete is deprecated and removed" );
}
return jQXHR;
};
var oldRemoveAttr = jQuery.fn.removeAttr,
oldToggleClass = jQuery.fn.toggleClass,
rmatchNonSpace = /\S+/g;
jQuery.fn.removeAttr = function( name ) {
var self = this;
jQuery.each( name.match( rmatchNonSpace ), function( i, attr ) {
if ( jQuery.expr.match.bool.test( attr ) ) {
migrateWarn( "jQuery.fn.removeAttr no longer sets boolean properties: " + attr );
self.prop( attr, false );
}
} );
return oldRemoveAttr.apply( this, arguments );
};
jQuery.fn.toggleClass = function( state ) {
// Only deprecating no-args or single boolean arg
if ( state !== undefined && typeof state !== "boolean" ) {
return oldToggleClass.apply( this, arguments );
}
migrateWarn( "jQuery.fn.toggleClass( boolean ) is deprecated" );
// Toggle entire class name of each element
return this.each( function() {
var className = this.getAttribute && this.getAttribute( "class" ) || "";
if ( className ) {
jQuery.data( this, "__className__", className );
}
// If the element has a class name or if we're passed `false`,
// then remove the whole classname (if there was one, the above saved it).
// Otherwise bring back whatever was previously saved (if anything),
// falling back to the empty string if nothing was stored.
if ( this.setAttribute ) {
this.setAttribute( "class",
className || state === false ?
"" :
jQuery.data( this, "__className__" ) || ""
);
}
} );
};
var internalSwapCall = false;
// If this version of jQuery has .swap(), don't false-alarm on internal uses
if ( jQuery.swap ) {
jQuery.each( [ "height", "width", "reliableMarginRight" ], function( _, name ) {
var oldHook = jQuery.cssHooks[ name ] && jQuery.cssHooks[ name ].get;
if ( oldHook ) {
jQuery.cssHooks[ name ].get = function() {
var ret;
internalSwapCall = true;
ret = oldHook.apply( this, arguments );
internalSwapCall = false;
return ret;
};
}
} );
}
jQuery.swap = function( elem, options, callback, args ) {
var ret, name,
old = {};
if ( !internalSwapCall ) {
migrateWarn( "jQuery.swap() is undocumented and deprecated" );
}
// Remember the old values, and insert the new ones
for ( name in options ) {
old[ name ] = elem.style[ name ];
elem.style[ name ] = options[ name ];
}
ret = callback.apply( elem, args || [] );
// Revert the old values
for ( name in options ) {
elem.style[ name ] = old[ name ];
}
return ret;
};
var oldData = jQuery.data;
jQuery.data = function( elem, name, value ) {
var curData;
// Name can be an object, and each entry in the object is meant to be set as data
if ( name && typeof name === "object" && arguments.length === 2 ) {
curData = jQuery.hasData( elem ) && oldData.call( this, elem );
var sameKeys = {};
for ( var key in name ) {
if ( key !== jQuery.camelCase( key ) ) {
migrateWarn( "jQuery.data() always sets/gets camelCased names: " + key );
curData[ key ] = name[ key ];
} else {
sameKeys[ key ] = name[ key ];
}
}
oldData.call( this, elem, sameKeys );
return name;
}
// If the name is transformed, look for the un-transformed name in the data object
if ( name && typeof name === "string" && name !== jQuery.camelCase( name ) ) {
curData = jQuery.hasData( elem ) && oldData.call( this, elem );
if ( curData && name in curData ) {
migrateWarn( "jQuery.data() always sets/gets camelCased names: " + name );
if ( arguments.length > 2 ) {
curData[ name ] = value;
}
return curData[ name ];
}
}
return oldData.apply( this, arguments );
};
var oldTweenRun = jQuery.Tween.prototype.run;
var linearEasing = function( pct ) {
return pct;
};
jQuery.Tween.prototype.run = function( ) {
if ( jQuery.easing[ this.easing ].length > 1 ) {
migrateWarn(
"'jQuery.easing." + this.easing.toString() + "' should use only one argument"
);
jQuery.easing[ this.easing ] = linearEasing;
}
oldTweenRun.apply( this, arguments );
};
jQuery.fx.interval = jQuery.fx.interval || 13;
// Support: IE9, Android <=4.4
// Avoid false positives on browsers that lack rAF
if ( window.requestAnimationFrame ) {
migrateWarnProp( jQuery.fx, "interval", jQuery.fx.interval,
"jQuery.fx.interval is deprecated" );
}
var oldLoad = jQuery.fn.load,
oldEventAdd = jQuery.event.add,
originalFix = jQuery.event.fix;
jQuery.event.props = [];
jQuery.event.fixHooks = {};
migrateWarnProp( jQuery.event.props, "concat", jQuery.event.props.concat,
"jQuery.event.props.concat() is deprecated and removed" );
jQuery.event.fix = function( originalEvent ) {
var event,
type = originalEvent.type,
fixHook = this.fixHooks[ type ],
props = jQuery.event.props;
if ( props.length ) {
migrateWarn( "jQuery.event.props are deprecated and removed: " + props.join() );
while ( props.length ) {
jQuery.event.addProp( props.pop() );
}
}
if ( fixHook && !fixHook._migrated_ ) {
fixHook._migrated_ = true;
migrateWarn( "jQuery.event.fixHooks are deprecated and removed: " + type );
if ( ( props = fixHook.props ) && props.length ) {
while ( props.length ) {
jQuery.event.addProp( props.pop() );
}
}
}
event = originalFix.call( this, originalEvent );
return fixHook && fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
};
jQuery.event.add = function( elem, types ) {
// This misses the multiple-types case but that seems awfully rare
if ( elem === window && types === "load" && window.document.readyState === "complete" ) {
migrateWarn( "jQuery(window).on('load'...) called after load event occurred" );
}
return oldEventAdd.apply( this, arguments );
};
jQuery.each( [ "load", "unload", "error" ], function( _, name ) {
jQuery.fn[ name ] = function() {
var args = Array.prototype.slice.call( arguments, 0 );
// If this is an ajax load() the first arg should be the string URL;
// technically this could also be the "Anything" arg of the event .load()
// which just goes to show why this dumb signature has been deprecated!
// jQuery custom builds that exclude the Ajax module justifiably die here.
if ( name === "load" && typeof args[ 0 ] === "string" ) {
return oldLoad.apply( this, args );
}
migrateWarn( "jQuery.fn." + name + "() is deprecated" );
args.splice( 0, 0, name );
if ( arguments.length ) {
return this.on.apply( this, args );
}
// Use .triggerHandler here because:
// - load and unload events don't need to bubble, only applied to window or image
// - error event should not bubble to window, although it does pre-1.7
// See http://bugs.jquery.com/ticket/11820
this.triggerHandler.apply( this, args );
return this;
};
} );
jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
"change select submit keydown keypress keyup contextmenu" ).split( " " ),
function( i, name ) {
// Handle event binding
jQuery.fn[ name ] = function( data, fn ) {
migrateWarn( "jQuery.fn." + name + "() event shorthand is deprecated" );
return arguments.length > 0 ?
this.on( name, null, data, fn ) :
this.trigger( name );
};
} );
// Trigger "ready" event only once, on document ready
jQuery( function() {
jQuery( window.document ).triggerHandler( "ready" );
} );
jQuery.event.special.ready = {
setup: function() {
if ( this === window.document ) {
migrateWarn( "'ready' event is deprecated" );
}
}
};
jQuery.fn.extend( {
bind: function( types, data, fn ) {
migrateWarn( "jQuery.fn.bind() is deprecated" );
return this.on( types, null, data, fn );
},
unbind: function( types, fn ) {
migrateWarn( "jQuery.fn.unbind() is deprecated" );
return this.off( types, null, fn );
},
delegate: function( selector, types, data, fn ) {
migrateWarn( "jQuery.fn.delegate() is deprecated" );
return this.on( types, selector, data, fn );
},
undelegate: function( selector, types, fn ) {
migrateWarn( "jQuery.fn.undelegate() is deprecated" );
return arguments.length === 1 ?
this.off( selector, "**" ) :
this.off( types, selector || "**", fn );
},
hover: function( fnOver, fnOut ) {
migrateWarn( "jQuery.fn.hover() is deprecated" );
return this.on( "mouseenter", fnOver ).on( "mouseleave", fnOut || fnOver );
}
} );
var oldOffset = jQuery.fn.offset;
jQuery.fn.offset = function() {
var docElem,
elem = this[ 0 ],
origin = { top: 0, left: 0 };
if ( !elem || !elem.nodeType ) {
migrateWarn( "jQuery.fn.offset() requires a valid DOM element" );
return origin;
}
docElem = ( elem.ownerDocument || window.document ).documentElement;
if ( !jQuery.contains( docElem, elem ) ) {
migrateWarn( "jQuery.fn.offset() requires an element connected to a document" );
return origin;
}
return oldOffset.apply( this, arguments );
};
var oldParam = jQuery.param;
jQuery.param = function( data, traditional ) {
var ajaxTraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
if ( traditional === undefined && ajaxTraditional ) {
migrateWarn( "jQuery.param() no longer uses jQuery.ajaxSettings.traditional" );
traditional = ajaxTraditional;
}
return oldParam.call( this, data, traditional );
};
var oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack;
jQuery.fn.andSelf = function() {
migrateWarn( "jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()" );
return oldSelf.apply( this, arguments );
};
var oldDeferred = jQuery.Deferred,
tuples = [
// Action, add listener, callbacks, .then handlers, final state
[ "resolve", "done", jQuery.Callbacks( "once memory" ),
jQuery.Callbacks( "once memory" ), "resolved" ],
[ "reject", "fail", jQuery.Callbacks( "once memory" ),
jQuery.Callbacks( "once memory" ), "rejected" ],
[ "notify", "progress", jQuery.Callbacks( "memory" ),
jQuery.Callbacks( "memory" ) ]
];
jQuery.Deferred = function( func ) {
var deferred = oldDeferred(),
promise = deferred.promise();
deferred.pipe = promise.pipe = function( /* fnDone, fnFail, fnProgress */ ) {
var fns = arguments;
migrateWarn( "deferred.pipe() is deprecated" );
return jQuery.Deferred( function( newDefer ) {
jQuery.each( tuples, function( i, tuple ) {
var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
// Deferred.done(function() { bind to newDefer or newDefer.resolve })
// deferred.fail(function() { bind to newDefer or newDefer.reject })
// deferred.progress(function() { bind to newDefer or newDefer.notify })
deferred[ tuple[ 1 ] ]( function() {
var returned = fn && fn.apply( this, arguments );
if ( returned && jQuery.isFunction( returned.promise ) ) {
returned.promise()
.done( newDefer.resolve )
.fail( newDefer.reject )
.progress( newDefer.notify );
} else {
newDefer[ tuple[ 0 ] + "With" ](
this === promise ? newDefer.promise() : this,
fn ? [ returned ] : arguments
);
}
} );
} );
fns = null;
} ).promise();
};
if ( func ) {
func.call( deferred, deferred );
}
return deferred;
};
// Preserve handler of uncaught exceptions in promise chains
jQuery.Deferred.exceptionHook = oldDeferred.exceptionHook;
return jQuery;
} );

View File

@ -0,0 +1,215 @@
/*! jQuery Migrate v3.0.1 | (c) jQuery Foundation and other contributors | jquery.org/license */
void 0 === jQuery.migrateMute && (jQuery.migrateMute = !0), function(e) {
"function" == typeof define && define.amd ? define([ "jquery" ], window, e) : "object" == typeof module && module.exports ? module.exports = e(require("jquery"), window) : e(jQuery, window);
}(function(e, t) {
"use strict";
function r(r) {
var n = t.console;
o[r] || (o[r] = !0, e.migrateWarnings.push(r), n && n.warn && !e.migrateMute && (n.warn("JQMIGRATE: " + r),
e.migrateTrace && n.trace && n.trace()));
}
function n(e, t, n, a) {
Object.defineProperty(e, t, {
configurable: !0,
enumerable: !0,
get: function() {
return r(a), n;
},
set: function(e) {
r(a), n = e;
}
});
}
function a(e, t, n, a) {
e[t] = function() {
return r(a), n.apply(this, arguments);
};
}
e.migrateVersion = "3.0.1", function() {
var r = /^[12]\./;
t.console && t.console.log && (e && !r.test(e.fn.jquery) || t.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),
e.migrateWarnings && t.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),
t.console.log("JQMIGRATE: Migrate is installed" + (e.migrateMute ? "" : " with logging active") + ", version " + e.migrateVersion));
}();
var o = {};
e.migrateWarnings = [], void 0 === e.migrateTrace && (e.migrateTrace = !0), e.migrateReset = function() {
o = {}, e.migrateWarnings.length = 0;
}, "BackCompat" === t.document.compatMode && r("jQuery is not compatible with Quirks Mode");
var i = e.fn.init, s = e.isNumeric, u = e.find, c = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/, l = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;
e.fn.init = function(e) {
var t = Array.prototype.slice.call(arguments);
return "string" == typeof e && "#" === e && (r("jQuery( '#' ) is not a valid selector"),
t[0] = []), i.apply(this, t);
}, e.fn.init.prototype = e.fn, e.find = function(e) {
var n = Array.prototype.slice.call(arguments);
if ("string" == typeof e && c.test(e)) try {
t.document.querySelector(e);
} catch (a) {
e = e.replace(l, function(e, t, r, n) {
return "[" + t + r + '"' + n + '"]';
});
try {
t.document.querySelector(e), r("Attribute selector with '#' must be quoted: " + n[0]),
n[0] = e;
} catch (e) {
r("Attribute selector with '#' was not fixed: " + n[0]);
}
}
return u.apply(this, n);
};
var d;
for (d in u) Object.prototype.hasOwnProperty.call(u, d) && (e.find[d] = u[d]);
e.fn.size = function() {
return r("jQuery.fn.size() is deprecated and removed; use the .length property"),
this.length;
}, e.parseJSON = function() {
return r("jQuery.parseJSON is deprecated; use JSON.parse"), JSON.parse.apply(null, arguments);
}, e.isNumeric = function(t) {
var n = s(t), a = function(t) {
var r = t && t.toString();
return !e.isArray(t) && r - parseFloat(r) + 1 >= 0;
}(t);
return n !== a && r("jQuery.isNumeric() should not be called on constructed objects"),
a;
}, a(e, "holdReady", e.holdReady, "jQuery.holdReady is deprecated"), a(e, "unique", e.uniqueSort, "jQuery.unique is deprecated; use jQuery.uniqueSort"),
n(e.expr, "filters", e.expr.pseudos, "jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),
n(e.expr, ":", e.expr.pseudos, "jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos");
var p = e.ajax;
e.ajax = function() {
var e = p.apply(this, arguments);
return e.promise && (a(e, "success", e.done, "jQXHR.success is deprecated and removed"),
a(e, "error", e.fail, "jQXHR.error is deprecated and removed"), a(e, "complete", e.always, "jQXHR.complete is deprecated and removed")),
e;
};
var f = e.fn.removeAttr, y = e.fn.toggleClass, m = /\S+/g;
e.fn.removeAttr = function(t) {
var n = this;
return e.each(t.match(m), function(t, a) {
e.expr.match.bool.test(a) && (r("jQuery.fn.removeAttr no longer sets boolean properties: " + a),
n.prop(a, !1));
}), f.apply(this, arguments);
}, e.fn.toggleClass = function(t) {
return void 0 !== t && "boolean" != typeof t ? y.apply(this, arguments) : (r("jQuery.fn.toggleClass( boolean ) is deprecated"),
this.each(function() {
var r = this.getAttribute && this.getAttribute("class") || "";
r && e.data(this, "__className__", r), this.setAttribute && this.setAttribute("class", r || !1 === t ? "" : e.data(this, "__className__") || "");
}));
};
var h = !1;
e.swap && e.each([ "height", "width", "reliableMarginRight" ], function(t, r) {
var n = e.cssHooks[r] && e.cssHooks[r].get;
n && (e.cssHooks[r].get = function() {
var e;
return h = !0, e = n.apply(this, arguments), h = !1, e;
});
}), e.swap = function(e, t, n, a) {
var o, i, s = {};
h || r("jQuery.swap() is undocumented and deprecated");
for (i in t) s[i] = e.style[i], e.style[i] = t[i];
o = n.apply(e, a || []);
for (i in t) e.style[i] = s[i];
return o;
};
var g = e.data;
e.data = function(t, n, a) {
var o;
if (n && "object" == typeof n && 2 === arguments.length) {
o = e.hasData(t) && g.call(this, t);
var i = {};
for (var s in n) s !== e.camelCase(s) ? (r("jQuery.data() always sets/gets camelCased names: " + s),
o[s] = n[s]) : i[s] = n[s];
return g.call(this, t, i), n;
}
return n && "string" == typeof n && n !== e.camelCase(n) && (o = e.hasData(t) && g.call(this, t)) && n in o ? (r("jQuery.data() always sets/gets camelCased names: " + n),
arguments.length > 2 && (o[n] = a), o[n]) : g.apply(this, arguments);
};
var v = e.Tween.prototype.run, j = function(e) {
return e;
};
e.Tween.prototype.run = function() {
e.easing[this.easing].length > 1 && (r("'jQuery.easing." + this.easing.toString() + "' should use only one argument"),
e.easing[this.easing] = j), v.apply(this, arguments);
}, e.fx.interval = e.fx.interval || 13, t.requestAnimationFrame && n(e.fx, "interval", e.fx.interval, "jQuery.fx.interval is deprecated");
var Q = e.fn.load, b = e.event.add, w = e.event.fix;
e.event.props = [], e.event.fixHooks = {}, n(e.event.props, "concat", e.event.props.concat, "jQuery.event.props.concat() is deprecated and removed"),
e.event.fix = function(t) {
var n, a = t.type, o = this.fixHooks[a], i = e.event.props;
if (i.length) for (r("jQuery.event.props are deprecated and removed: " + i.join()); i.length; ) e.event.addProp(i.pop());
if (o && !o._migrated_ && (o._migrated_ = !0, r("jQuery.event.fixHooks are deprecated and removed: " + a),
(i = o.props) && i.length)) for (;i.length; ) e.event.addProp(i.pop());
return n = w.call(this, t), o && o.filter ? o.filter(n, t) : n;
}, e.event.add = function(e, n) {
return e === t && "load" === n && "complete" === t.document.readyState && r("jQuery(window).on('load'...) called after load event occurred"),
b.apply(this, arguments);
}, e.each([ "load", "unload", "error" ], function(t, n) {
e.fn[n] = function() {
var e = Array.prototype.slice.call(arguments, 0);
return "load" === n && "string" == typeof e[0] ? Q.apply(this, e) : (r("jQuery.fn." + n + "() is deprecated"),
e.splice(0, 0, n), arguments.length ? this.on.apply(this, e) : (this.triggerHandler.apply(this, e),
this));
};
}), e.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), function(t, n) {
e.fn[n] = function(e, t) {
return r("jQuery.fn." + n + "() event shorthand is deprecated"), arguments.length > 0 ? this.on(n, null, e, t) : this.trigger(n);
};
}), e(function() {
e(t.document).triggerHandler("ready");
}), e.event.special.ready = {
setup: function() {
this === t.document && r("'ready' event is deprecated");
}
}, e.fn.extend({
bind: function(e, t, n) {
return r("jQuery.fn.bind() is deprecated"), this.on(e, null, t, n);
},
unbind: function(e, t) {
return r("jQuery.fn.unbind() is deprecated"), this.off(e, null, t);
},
delegate: function(e, t, n, a) {
return r("jQuery.fn.delegate() is deprecated"), this.on(t, e, n, a);
},
undelegate: function(e, t, n) {
return r("jQuery.fn.undelegate() is deprecated"), 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", n);
},
hover: function(e, t) {
return r("jQuery.fn.hover() is deprecated"), this.on("mouseenter", e).on("mouseleave", t || e);
}
});
var x = e.fn.offset;
e.fn.offset = function() {
var n, a = this[0], o = {
top: 0,
left: 0
};
return a && a.nodeType ? (n = (a.ownerDocument || t.document).documentElement, e.contains(n, a) ? x.apply(this, arguments) : (r("jQuery.fn.offset() requires an element connected to a document"),
o)) : (r("jQuery.fn.offset() requires a valid DOM element"), o);
};
var k = e.param;
e.param = function(t, n) {
var a = e.ajaxSettings && e.ajaxSettings.traditional;
return void 0 === n && a && (r("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),
n = a), k.call(this, t, n);
};
var A = e.fn.andSelf || e.fn.addBack;
e.fn.andSelf = function() {
return r("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),
A.apply(this, arguments);
};
var S = e.Deferred, q = [ [ "resolve", "done", e.Callbacks("once memory"), e.Callbacks("once memory"), "resolved" ], [ "reject", "fail", e.Callbacks("once memory"), e.Callbacks("once memory"), "rejected" ], [ "notify", "progress", e.Callbacks("memory"), e.Callbacks("memory") ] ];
return e.Deferred = function(t) {
var n = S(), a = n.promise();
return n.pipe = a.pipe = function() {
var t = arguments;
return r("deferred.pipe() is deprecated"), e.Deferred(function(r) {
e.each(q, function(o, i) {
var s = e.isFunction(t[o]) && t[o];
n[i[1]](function() {
var t = s && s.apply(this, arguments);
t && e.isFunction(t.promise) ? t.promise().done(r.resolve).fail(r.reject).progress(r.notify) : r[i[0] + "With"](this === a ? r.promise() : this, s ? [ t ] : arguments);
});
}), t = null;
}).promise();
}, t && t.call(n, n), n;
}, e.Deferred.exceptionHook = S.exceptionHook, e;
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -25,7 +25,7 @@
<link rel="icon" type="image/png" href="{{ page.favicon }}">
<link rel="mask-icon" href="{{ page.tabicon }}" color="#8f0000">
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="vendor/jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css" rel="stylesheet" media="screen">
<link href="vendor/jquery/css/base/jquery-ui.min.css" rel="stylesheet" media="screen">
<link rel="stylesheet" href="vendor/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="vendor/vendor.css">
<link rel="stylesheet" href="red/style.min.css">

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 {