Merge pull request #2153 from node-red/jq3
Upgrade to jq 3.3.1 / jq-ui 1.12.1
@ -181,9 +181,10 @@ module.exports = function(grunt) {
|
|||||||
vendor: {
|
vendor: {
|
||||||
files: {
|
files: {
|
||||||
"packages/node_modules/@node-red/editor-client/public/vendor/vendor.js": [
|
"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/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/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/marked/marked.min.js",
|
||||||
"packages/node_modules/@node-red/editor-client/src/vendor/d3/d3.v3.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/**',
|
'ace/**',
|
||||||
//'bootstrap/css/**',
|
//'bootstrap/css/**',
|
||||||
'bootstrap/img/**',
|
'bootstrap/img/**',
|
||||||
'jquery/css/**',
|
'jquery/css/base/**',
|
||||||
'font-awesome/**'
|
'font-awesome/**'
|
||||||
],
|
],
|
||||||
expand: true,
|
expand: true,
|
||||||
|
@ -143,7 +143,7 @@ RED.comms = (function() {
|
|||||||
} else {
|
} else {
|
||||||
var msg = RED._("notification.errors.lostConnectionReconnect",{time: connectCountdown})+' <a href="#">'+ RED._("notification.errors.lostConnectionTry")+'</a>';
|
var msg = RED._("notification.errors.lostConnectionReconnect",{time: connectCountdown})+' <a href="#">'+ RED._("notification.errors.lostConnectionTry")+'</a>';
|
||||||
errornotification.update(msg,{silent:true});
|
errornotification.update(msg,{silent:true});
|
||||||
$(errornotification).find("a").click(function(e) {
|
$(errornotification).find("a").on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
errornotification.update(RED._("notification.errors.lostConnection"),{silent:true});
|
errornotification.update(RED._("notification.errors.lostConnection"),{silent:true});
|
||||||
clearInterval(connectCountdownTimer);
|
clearInterval(connectCountdownTimer);
|
||||||
|
@ -131,6 +131,12 @@ RED.settings = (function () {
|
|||||||
RED.settings.remove("auth-tokens");
|
RED.settings.remove("auth-tokens");
|
||||||
}
|
}
|
||||||
console.log("Node-RED: " + data.version);
|
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);
|
loadUserSettings(done);
|
||||||
},
|
},
|
||||||
error: function(jqXHR,textStatus,errorThrown) {
|
error: function(jqXHR,textStatus,errorThrown) {
|
||||||
|
@ -53,7 +53,7 @@ RED.clipboard = (function() {
|
|||||||
element.setAttribute('download', "flows.json");
|
element.setAttribute('download', "flows.json");
|
||||||
element.style.display = 'none';
|
element.style.display = 'none';
|
||||||
document.body.appendChild(element);
|
document.body.appendChild(element);
|
||||||
element.click();
|
element.trigger("click");
|
||||||
document.body.removeChild(element);
|
document.body.removeChild(element);
|
||||||
$( this ).dialog( "close" );
|
$( this ).dialog( "close" );
|
||||||
}
|
}
|
||||||
@ -369,7 +369,7 @@ RED.clipboard = (function() {
|
|||||||
currentPopoverError = null;
|
currentPopoverError = null;
|
||||||
}
|
}
|
||||||
if (tab.id === "clipboard-dialog-import-tab-clipboard") {
|
if (tab.id === "clipboard-dialog-import-tab-clipboard") {
|
||||||
$("#clipboard-import").focus();
|
$("#clipboard-import").trigger("focus");
|
||||||
} else {
|
} else {
|
||||||
libraryBrowser.focus();
|
libraryBrowser.focus();
|
||||||
}
|
}
|
||||||
@ -388,12 +388,12 @@ RED.clipboard = (function() {
|
|||||||
tabs.activateTab("clipboard-dialog-import-tab-"+mode);
|
tabs.activateTab("clipboard-dialog-import-tab-"+mode);
|
||||||
if (mode === 'clipboard') {
|
if (mode === 'clipboard') {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$("#clipboard-import").focus();
|
$("#clipboard-import").trigger("focus");
|
||||||
},100)
|
},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-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)});
|
||||||
$("#clipboard-dialog-export").button("enable");
|
$("#clipboard-dialog-export").button("enable");
|
||||||
|
|
||||||
@ -416,10 +416,10 @@ RED.clipboard = (function() {
|
|||||||
$("#clipboard-dialog-export").hide();
|
$("#clipboard-dialog-export").hide();
|
||||||
$("#clipboard-dialog-download").hide();
|
$("#clipboard-dialog-download").hide();
|
||||||
$("#clipboard-dialog-ok").button("disable");
|
$("#clipboard-dialog-ok").button("disable");
|
||||||
$("#clipboard-import").keyup(validateImport);
|
$("#clipboard-import").on("keyup", validateImport);
|
||||||
$("#clipboard-import").on('paste',function() { setTimeout(validateImport,10)});
|
$("#clipboard-import").on('paste',function() { setTimeout(validateImport,10)});
|
||||||
|
|
||||||
$("#import-tab > a").click(function(evt) {
|
$("#import-tab > a").on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
|
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
|
||||||
return;
|
return;
|
||||||
@ -428,7 +428,7 @@ RED.clipboard = (function() {
|
|||||||
$(this).addClass('selected');
|
$(this).addClass('selected');
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#import-file-upload").change(function() {
|
$("#import-file-upload").on("change", function() {
|
||||||
var fileReader = new FileReader();
|
var fileReader = new FileReader();
|
||||||
fileReader.onload = function () {
|
fileReader.onload = function () {
|
||||||
$("#clipboard-import").val(fileReader.result);
|
$("#clipboard-import").val(fileReader.result);
|
||||||
@ -436,9 +436,9 @@ RED.clipboard = (function() {
|
|||||||
};
|
};
|
||||||
fileReader.readAsText($(this).prop('files')[0]);
|
fileReader.readAsText($(this).prop('files')[0]);
|
||||||
})
|
})
|
||||||
$("#import-file-upload-btn").click(function(evt) {
|
$("#import-file-upload-btn").on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
$("#import-file-upload").click();
|
$("#import-file-upload").trigger("click");
|
||||||
})
|
})
|
||||||
|
|
||||||
dialog.dialog("option","title",RED._("clipboard.importNodes")).dialog("open");
|
dialog.dialog("option","title",RED._("clipboard.importNodes")).dialog("open");
|
||||||
@ -489,7 +489,7 @@ RED.clipboard = (function() {
|
|||||||
|
|
||||||
tabs.activateTab("clipboard-dialog-export-tab-"+mode);
|
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-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)});
|
||||||
$("#clipboard-dialog-export").button("enable");
|
$("#clipboard-dialog-export").button("enable");
|
||||||
|
|
||||||
@ -509,10 +509,10 @@ RED.clipboard = (function() {
|
|||||||
dialogContainer.i18n();
|
dialogContainer.i18n();
|
||||||
var format = RED.settings.flowFilePretty ? "export-format-full" : "export-format-mini";
|
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();
|
evt.preventDefault();
|
||||||
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
|
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
|
||||||
$("#clipboard-export").focus();
|
$("#clipboard-export").trigger("focus");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$(this).parent().children().removeClass('selected');
|
$(this).parent().children().removeClass('selected');
|
||||||
@ -531,11 +531,11 @@ RED.clipboard = (function() {
|
|||||||
$("#clipboard-export").val(flow);
|
$("#clipboard-export").val(flow);
|
||||||
setTimeout(function() { $("#clipboard-export").scrollTop(0); },50);
|
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();
|
evt.preventDefault();
|
||||||
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
|
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
|
||||||
return;
|
return;
|
||||||
@ -581,7 +581,7 @@ RED.clipboard = (function() {
|
|||||||
}
|
}
|
||||||
$("#clipboard-export").val(flow);
|
$("#clipboard-export").val(flow);
|
||||||
setTimeout(function() { $("#clipboard-export").scrollTop(0); },50);
|
setTimeout(function() { $("#clipboard-export").scrollTop(0); },50);
|
||||||
$("#clipboard-export").focus();
|
$("#clipboard-export").trigger("focus");
|
||||||
})
|
})
|
||||||
|
|
||||||
$("#clipboard-dialog-ok").hide();
|
$("#clipboard-dialog-ok").hide();
|
||||||
@ -589,24 +589,24 @@ RED.clipboard = (function() {
|
|||||||
$("#clipboard-dialog-export").hide();
|
$("#clipboard-dialog-export").hide();
|
||||||
var selection = RED.workspaces.selection();
|
var selection = RED.workspaces.selection();
|
||||||
if (selection.length > 0) {
|
if (selection.length > 0) {
|
||||||
$("#export-range-selected").click();
|
$("#export-range-selected").trigger("click");
|
||||||
} else {
|
} else {
|
||||||
selection = RED.view.selection();
|
selection = RED.view.selection();
|
||||||
if (selection.nodes) {
|
if (selection.nodes) {
|
||||||
$("#export-range-selected").click();
|
$("#export-range-selected").trigger("click");
|
||||||
} else {
|
} else {
|
||||||
$("#export-range-selected").addClass('disabled').removeClass('selected');
|
$("#export-range-selected").addClass('disabled').removeClass('selected');
|
||||||
$("#export-range-flow").click();
|
$("#export-range-flow").trigger("click");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (format === "export-format-full") {
|
if (format === "export-format-full") {
|
||||||
$("#export-format-full").click();
|
$("#export-format-full").trigger("click");
|
||||||
} else {
|
} else {
|
||||||
$("#export-format-mini").click();
|
$("#export-format-mini").trigger("click");
|
||||||
}
|
}
|
||||||
dialog.dialog("option","title",RED._("clipboard.exportNodes")).dialog( "open" );
|
dialog.dialog("option","title",RED._("clipboard.exportNodes")).dialog( "open" );
|
||||||
|
|
||||||
$("#clipboard-export").focus();
|
$("#clipboard-export").trigger("focus");
|
||||||
$("#clipboard-dialog-cancel").show();
|
$("#clipboard-dialog-cancel").show();
|
||||||
$("#clipboard-dialog-export").show();
|
$("#clipboard-dialog-export").show();
|
||||||
$("#clipboard-dialog-download").show();
|
$("#clipboard-dialog-download").show();
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
this.options[0].show();
|
this.options[0].show();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.element.change(function() {
|
this.element.on("change", function() {
|
||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
that.options[0].hide();
|
that.options[0].hide();
|
||||||
that.options[1].show();
|
that.options[1].show();
|
||||||
@ -53,7 +53,7 @@
|
|||||||
child.checkboxSet('state',isChecked,false,true);
|
child.checkboxSet('state',isChecked,false,true);
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.uiElement.click(function(e) {
|
this.uiElement.on("click", function(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
// state returns null for a partial state. Clicking on that should
|
// state returns null for a partial state. Clicking on that should
|
||||||
// result in false.
|
// result in false.
|
||||||
|
@ -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>')
|
$('<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)
|
.appendTo(this.topContainer)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
that.addItem({});
|
that.addItem({});
|
||||||
});
|
});
|
||||||
@ -260,7 +260,7 @@
|
|||||||
var deleteButton = $('<a/>',{href:"#",class:"red-ui-editableList-item-remove editor-button editor-button-small"}).appendTo(li);
|
var deleteButton = $('<a/>',{href:"#",class:"red-ui-editableList-item-remove editor-button editor-button-small"}).appendTo(li);
|
||||||
$('<i/>',{class:"fa fa-remove"}).appendTo(deleteButton);
|
$('<i/>',{class:"fa fa-remove"}).appendTo(deleteButton);
|
||||||
li.addClass("red-ui-editableList-item-removable");
|
li.addClass("red-ui-editableList-item-removable");
|
||||||
deleteButton.click(function(evt) {
|
deleteButton.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
var data = row.data('data');
|
var data = row.data('data');
|
||||||
li.addClass("red-ui-editableList-item-deleting")
|
li.addClass("red-ui-editableList-item-deleting")
|
||||||
|
@ -92,7 +92,7 @@ RED.menu = (function() {
|
|||||||
menuItems[opt.id] = opt;
|
menuItems[opt.id] = opt;
|
||||||
|
|
||||||
if (opt.onselect) {
|
if (opt.onselect) {
|
||||||
link.click(function(e) {
|
link.on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if ($(this).parent().hasClass("disabled")) {
|
if ($(this).parent().hasClass("disabled")) {
|
||||||
return;
|
return;
|
||||||
@ -125,7 +125,7 @@ RED.menu = (function() {
|
|||||||
link.attr("target","_blank").attr("href",opt.href);
|
link.attr("target","_blank").attr("href",opt.href);
|
||||||
} else if (!opt.options) {
|
} else if (!opt.options) {
|
||||||
item.addClass("disabled");
|
item.addClass("disabled");
|
||||||
link.click(function(event) {
|
link.on("click", function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ RED.popover = (function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (trigger === 'click') {
|
} else if (trigger === 'click') {
|
||||||
target.click(function(e) {
|
target.on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
active = !active;
|
active = !active;
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
that.element.val("");
|
that.element.val("");
|
||||||
that._change("",true);
|
that._change("",true);
|
||||||
that.element.focus();
|
that.element.trigger("focus");
|
||||||
});
|
});
|
||||||
|
|
||||||
this.resultCount = $('<span>',{class:"red-ui-searchBox-resultCount hide"}).appendTo(this.uiContainer);
|
this.resultCount = $('<span>',{class:"red-ui-searchBox-resultCount hide"}).appendTo(this.uiContainer);
|
||||||
|
@ -39,8 +39,8 @@ RED.stack = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (options.fill && options.singleExpanded) {
|
if (options.fill && options.singleExpanded) {
|
||||||
$(window).resize(resizeStack);
|
$(window).on("resize", resizeStack);
|
||||||
$(window).focus(resizeStack);
|
$(window).on("focus", resizeStack);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
add: function(entry) {
|
add: function(entry) {
|
||||||
@ -57,7 +57,7 @@ RED.stack = (function() {
|
|||||||
}
|
}
|
||||||
entry.content = $('<div></div>').appendTo(entry.contentWrap);
|
entry.content = $('<div></div>').appendTo(entry.contentWrap);
|
||||||
if (entry.collapsible !== false) {
|
if (entry.collapsible !== false) {
|
||||||
header.click(function() {
|
header.on("click", function() {
|
||||||
if (options.singleExpanded) {
|
if (options.singleExpanded) {
|
||||||
if (!entry.isExpanded()) {
|
if (!entry.isExpanded()) {
|
||||||
for (var i=0;i<entries.length;i++) {
|
for (var i=0;i<entries.length;i++) {
|
||||||
|
@ -37,7 +37,7 @@ RED.tabs = (function() {
|
|||||||
if (options.addButton) {
|
if (options.addButton) {
|
||||||
wrapper.addClass("red-ui-tabs-add");
|
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);
|
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();
|
evt.preventDefault();
|
||||||
if (typeof options.addButton === 'function') {
|
if (typeof options.addButton === 'function') {
|
||||||
options.addButton();
|
options.addButton();
|
||||||
@ -73,7 +73,7 @@ RED.tabs = (function() {
|
|||||||
if (options.searchButton) {
|
if (options.searchButton) {
|
||||||
wrapper.addClass("red-ui-tabs-search");
|
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);
|
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();
|
evt.preventDefault();
|
||||||
if (typeof options.searchButton === 'function') {
|
if (typeof options.searchButton === 'function') {
|
||||||
options.searchButton()
|
options.searchButton()
|
||||||
@ -96,7 +96,7 @@ RED.tabs = (function() {
|
|||||||
if (options.scrollable) {
|
if (options.scrollable) {
|
||||||
wrapper.addClass("red-ui-tabs-scrollable");
|
wrapper.addClass("red-ui-tabs-scrollable");
|
||||||
scrollContainer.addClass("red-ui-tabs-scroll-container");
|
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 = $('<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();});
|
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");
|
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) {
|
if (options.menu !== false) {
|
||||||
var selectButton = $('<a href="#"><i class="fa fa-caret-down"></i></a>').appendTo(collapsedButtonsRow);
|
var selectButton = $('<a href="#"><i class="fa fa-caret-down"></i></a>').appendTo(collapsedButtonsRow);
|
||||||
selectButton.addClass("red-ui-tab-link-button-menu")
|
selectButton.addClass("red-ui-tab-link-button-menu")
|
||||||
selectButton.click(function(evt) {
|
selectButton.on("click", function(evt) {
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
if (!collapsibleMenu) {
|
if (!collapsibleMenu) {
|
||||||
@ -348,7 +348,7 @@ RED.tabs = (function() {
|
|||||||
}
|
}
|
||||||
var tabs = ul.find("li.red-ui-tab");
|
var tabs = ul.find("li.red-ui-tab");
|
||||||
var width = wrapper.width();
|
var width = wrapper.width();
|
||||||
var tabCount = tabs.size();
|
var tabCount = tabs.length;
|
||||||
var tabWidth;
|
var tabWidth;
|
||||||
|
|
||||||
if (options.collapsible) {
|
if (options.collapsible) {
|
||||||
@ -434,7 +434,7 @@ RED.tabs = (function() {
|
|||||||
var li = ul.find("a[href='#"+id+"']").parent();
|
var li = ul.find("a[href='#"+id+"']").parent();
|
||||||
if (li.hasClass("active")) {
|
if (li.hasClass("active")) {
|
||||||
var tab = li.prev();
|
var tab = li.prev();
|
||||||
if (tab.size() === 0) {
|
if (tab.length === 0) {
|
||||||
tab = li.next();
|
tab = li.next();
|
||||||
}
|
}
|
||||||
activateTab(tab.find("a"));
|
activateTab(tab.find("a"));
|
||||||
@ -509,7 +509,7 @@ RED.tabs = (function() {
|
|||||||
} else {
|
} else {
|
||||||
$('<i>',{class:defaultTabIcon}).appendTo(pinnedLink);
|
$('<i>',{class:defaultTabIcon}).appendTo(pinnedLink);
|
||||||
}
|
}
|
||||||
pinnedLink.click(function(evt) {
|
pinnedLink.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
activateTab(tab.id);
|
activateTab(tab.id);
|
||||||
});
|
});
|
||||||
@ -543,7 +543,7 @@ RED.tabs = (function() {
|
|||||||
options.onadd(tab);
|
options.onadd(tab);
|
||||||
}
|
}
|
||||||
link.attr("title",tab.label);
|
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);
|
activateTab(link);
|
||||||
}
|
}
|
||||||
if (options.onreorder) {
|
if (options.onreorder) {
|
||||||
@ -634,7 +634,7 @@ RED.tabs = (function() {
|
|||||||
previousTab: activatePreviousTab,
|
previousTab: activatePreviousTab,
|
||||||
resize: updateTabWidths,
|
resize: updateTabWidths,
|
||||||
count: function() {
|
count: function() {
|
||||||
return ul.find("li.red-ui-tab").size();
|
return ul.find("li.red-ui-tab").length;
|
||||||
},
|
},
|
||||||
contains: function(id) {
|
contains: function(id) {
|
||||||
return ul.find("a[href='#"+id+"']").length > 0;
|
return ul.find("a[href='#"+id+"']").length > 0;
|
||||||
|
@ -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-angle-right" /></span>').appendTo(label);
|
||||||
// $('<span class="red-ui-treeList-icon"><i class="fa fa-folder-o" /></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 (container.hasClass("expanded")) {
|
||||||
if (item.hasOwnProperty('selected') || label.hasClass("selected")) {
|
if (item.hasOwnProperty('selected') || label.hasClass("selected")) {
|
||||||
item.treeList.collapse();
|
item.treeList.collapse();
|
||||||
@ -285,7 +285,7 @@
|
|||||||
that._trigger("select",e,item);
|
that._trigger("select",e,item);
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
label.click(function(e) {
|
label.on("click", function(e) {
|
||||||
that._topList.find(".selected").removeClass("selected");
|
that._topList.find(".selected").removeClass("selected");
|
||||||
label.addClass("selected");
|
label.addClass("selected");
|
||||||
that._trigger("select",e,item)
|
that._trigger("select",e,item)
|
||||||
|
@ -199,7 +199,7 @@
|
|||||||
that.element.val(that.value());
|
that.element.val(that.value());
|
||||||
that.element.trigger('change',that.propertyType,that.value());
|
that.element.trigger('change',that.propertyType,that.value());
|
||||||
})
|
})
|
||||||
this.selectTrigger.click(function(event) {
|
this.selectTrigger.on("click", function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
that._showTypeMenu();
|
that._showTypeMenu();
|
||||||
});
|
});
|
||||||
@ -218,7 +218,7 @@
|
|||||||
RED.popover.tooltip(this.optionSelectLabel,function() {
|
RED.popover.tooltip(this.optionSelectLabel,function() {
|
||||||
return that.optionValue;
|
return that.optionValue;
|
||||||
});
|
});
|
||||||
this.optionSelectTrigger.click(function(event) {
|
this.optionSelectTrigger.on("click", function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
that._showOptionSelectMenu();
|
that._showOptionSelectMenu();
|
||||||
}).on('keydown', function(evt) {
|
}).on('keydown', function(evt) {
|
||||||
@ -241,9 +241,9 @@
|
|||||||
_showTypeMenu: function() {
|
_showTypeMenu: function() {
|
||||||
if (this.typeList.length > 1) {
|
if (this.typeList.length > 1) {
|
||||||
this._showMenu(this.menu,this.selectTrigger);
|
this._showMenu(this.menu,this.selectTrigger);
|
||||||
this.menu.find("[value='"+this.propertyType+"']").focus();
|
this.menu.find("[value='"+this.propertyType+"']").trigger("focus");
|
||||||
} else {
|
} else {
|
||||||
this.input.focus();
|
this.input.trigger("focus");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_showOptionSelectMenu: function() {
|
_showOptionSelectMenu: function() {
|
||||||
@ -257,7 +257,7 @@
|
|||||||
if (selectedOption.length === 0) {
|
if (selectedOption.length === 0) {
|
||||||
selectedOption = this.optionMenu.children(":first");
|
selectedOption = this.optionMenu.children(":first");
|
||||||
}
|
}
|
||||||
selectedOption.focus();
|
selectedOption.trigger("focus");
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -265,11 +265,11 @@
|
|||||||
$(document).off("mousedown.close-property-select");
|
$(document).off("mousedown.close-property-select");
|
||||||
menu.hide();
|
menu.hide();
|
||||||
if (this.elementDiv.is(":visible")) {
|
if (this.elementDiv.is(":visible")) {
|
||||||
this.input.focus();
|
this.input.trigger("focus");
|
||||||
} else if (this.optionSelectTrigger.is(":visible")){
|
} else if (this.optionSelectTrigger.is(":visible")){
|
||||||
this.optionSelectTrigger.focus();
|
this.optionSelectTrigger.trigger("focus");
|
||||||
} else {
|
} else {
|
||||||
this.selectTrigger.focus();
|
this.selectTrigger.trigger("focus");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_createMenu: function(opts,callback) {
|
_createMenu: function(opts,callback) {
|
||||||
@ -298,7 +298,7 @@
|
|||||||
op.text(opt.value);
|
op.text(opt.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
op.click(function(event) {
|
op.on("click", function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
callback(opt.value);
|
callback(opt.value);
|
||||||
that._hideMenu(menu);
|
that._hideMenu(menu);
|
||||||
@ -312,10 +312,10 @@
|
|||||||
menu.on('keydown', function(evt) {
|
menu.on('keydown', function(evt) {
|
||||||
if (evt.keyCode === 40) {
|
if (evt.keyCode === 40) {
|
||||||
// DOWN
|
// DOWN
|
||||||
$(this).children(":focus").next().focus();
|
$(this).children(":focus").next().trigger("focus");
|
||||||
} else if (evt.keyCode === 38) {
|
} else if (evt.keyCode === 38) {
|
||||||
// UP
|
// UP
|
||||||
$(this).children(":focus").prev().focus();
|
$(this).children(":focus").prev().trigger("focus");
|
||||||
} else if (evt.keyCode === 27) {
|
} else if (evt.keyCode === 27) {
|
||||||
that._hideMenu(menu);
|
that._hideMenu(menu);
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ RED.deploy = (function() {
|
|||||||
'</span></li>').prependTo(".header-toolbar");
|
'</span></li>').prependTo(".header-toolbar");
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#btn-deploy').click(function(event) {
|
$('#btn-deploy').on("click", function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
save();
|
save();
|
||||||
});
|
});
|
||||||
|
@ -133,7 +133,7 @@ RED.diff = (function() {
|
|||||||
$('<span class="node-diff-chevron"><i class="fa fa-angle-down"></i></span>').appendTo(originalNodeDiv);
|
$('<span class="node-diff-chevron"><i class="fa fa-angle-down"></i></span>').appendTo(originalNodeDiv);
|
||||||
$('<span>').text(RED._("diff.flowProperties")).appendTo(originalNodeDiv);
|
$('<span>').text(RED._("diff.flowProperties")).appendTo(originalNodeDiv);
|
||||||
|
|
||||||
row.click(function(evt) {
|
row.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
$(this).parent().toggleClass('collapsed');
|
$(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) {
|
// if (titleRow.parent().find(".node-diff-node-entry:not(.hide)").length > 0) {
|
||||||
titleRow.parent().toggleClass('collapsed');
|
titleRow.parent().toggleClass('collapsed');
|
||||||
if ($(this).parent().hasClass('collapsed')) {
|
if ($(this).parent().hasClass('collapsed')) {
|
||||||
@ -704,7 +704,7 @@ RED.diff = (function() {
|
|||||||
}
|
}
|
||||||
// Node row
|
// Node row
|
||||||
createNodeConflictRadioBoxes(node,div,localNodeDiv,remoteNodeDiv,false,!conflicted,selectState,CurrentDiff);
|
createNodeConflictRadioBoxes(node,div,localNodeDiv,remoteNodeDiv,false,!conflicted,selectState,CurrentDiff);
|
||||||
row.click(function(evt) {
|
row.on("click", function(evt) {
|
||||||
$(this).parent().toggleClass('collapsed');
|
$(this).parent().toggleClass('collapsed');
|
||||||
|
|
||||||
if($(this).siblings('.node-diff-node-entry-properties').length === 0) {
|
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 (localNode && remoteNode && typeof localNode[d] === "string") {
|
||||||
if (/\n/.test(localNode[d]) || /\n/.test(remoteNode[d])) {
|
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]);
|
showTextDiff(localNode[d],remoteNode[d]);
|
||||||
}).appendTo(propertyNameCell);
|
}).appendTo(propertyNameCell);
|
||||||
}
|
}
|
||||||
@ -1029,10 +1029,10 @@ RED.diff = (function() {
|
|||||||
refreshConflictHeader(diff);
|
refreshConflictHeader(diff);
|
||||||
}
|
}
|
||||||
|
|
||||||
var localSelectDiv = $('<label>',{class:"node-diff-selectbox",for:safeNodeId+"-local"}).click(function(e) { e.stopPropagation();}).appendTo(localDiv);
|
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).change(changeHandler).appendTo(localSelectDiv);
|
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"}).click(function(e) { e.stopPropagation();}).appendTo(remoteDiv);
|
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).change(changeHandler).appendTo(remoteSelectDiv);
|
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') {
|
if (state === 'local') {
|
||||||
localRadio.prop('checked',true);
|
localRadio.prop('checked',true);
|
||||||
} else if (state === 'remote') {
|
} else if (state === 'remote') {
|
||||||
@ -1587,7 +1587,7 @@ RED.diff = (function() {
|
|||||||
if (end < diffLines.length-1) {
|
if (end < diffLines.length-1) {
|
||||||
label.text("@@ -"+(diffLines[end-1].a.i+1)+" +"+(diffLines[end-1].b.i+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);
|
// console.log(start,end,diffLines.length);
|
||||||
if (end - start > 20) {
|
if (end - start > 20) {
|
||||||
var startPos = $(this).offset();
|
var startPos = $(this).offset();
|
||||||
@ -1738,7 +1738,7 @@ RED.diff = (function() {
|
|||||||
var content = $('<td colspan="3"></td>').appendTo(diffFileRow);
|
var content = $('<td colspan="3"></td>').appendTo(diffFileRow);
|
||||||
|
|
||||||
var chevron = $('<i class="node-diff-chevron fa fa-angle-down"></i>').appendTo(content);
|
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");
|
diffFileRow.toggleClass("collapsed");
|
||||||
var isCollapsed = diffFileRow.hasClass("collapsed");
|
var isCollapsed = diffFileRow.hasClass("collapsed");
|
||||||
diffFileRow.nextUntil(".node-text-diff-file-header").toggle(!isCollapsed);
|
diffFileRow.nextUntil(".node-text-diff-file-header").toggle(!isCollapsed);
|
||||||
@ -1926,7 +1926,7 @@ RED.diff = (function() {
|
|||||||
diffRow.addClass("mergeHeader-"+(isOurs?"ours":"theirs"));
|
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>')
|
$('<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)
|
.appendTo(line)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
resolvedConflicts++;
|
resolvedConflicts++;
|
||||||
var addedRows;
|
var addedRows;
|
||||||
|
@ -267,7 +267,7 @@ RED.editor = (function() {
|
|||||||
$('<a id="'+prefix+'-lookup-'+property+'" class="editor-button"><i class="fa fa-pencil"></i></a>')
|
$('<a id="'+prefix+'-lookup-'+property+'" class="editor-button"><i class="fa fa-pencil"></i></a>')
|
||||||
.css({position:'absolute',right:0,top:0})
|
.css({position:'absolute',right:0,top:0})
|
||||||
.appendTo(outerWrap);
|
.appendTo(outerWrap);
|
||||||
$('#'+prefix+'-lookup-'+property).click(function(e) {
|
$('#'+prefix+'-lookup-'+property).on("click", function(e) {
|
||||||
showEditConfigNodeDialog(property,type,select.find(":selected").val(),prefix);
|
showEditConfigNodeDialog(property,type,select.find(":selected").val(),prefix);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
@ -301,7 +301,7 @@ RED.editor = (function() {
|
|||||||
button.text(RED._("editor.configAdd"));
|
button.text(RED._("editor.configAdd"));
|
||||||
}
|
}
|
||||||
|
|
||||||
button.click(function(e) {
|
button.on("click", function(e) {
|
||||||
showEditConfigNodeDialog(property,type,input.val()||"_ADD_",prefix);
|
showEditConfigNodeDialog(property,type,input.val()||"_ADD_",prefix);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
@ -355,7 +355,7 @@ RED.editor = (function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$("#"+prefix+"-"+property).change(function(event,skipValidation) {
|
$("#"+prefix+"-"+property).on("change", function(event,skipValidation) {
|
||||||
if (!skipValidation) {
|
if (!skipValidation) {
|
||||||
validateNodeEditor(node,prefix);
|
validateNodeEditor(node,prefix);
|
||||||
}
|
}
|
||||||
@ -583,7 +583,7 @@ RED.editor = (function() {
|
|||||||
actionButton.hide();
|
actionButton.hide();
|
||||||
}
|
}
|
||||||
var restoreTip = RED.popover.tooltip(actionButton,RED._("subflow.env.restore"));
|
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 newType = valueField.typedInput('type');
|
||||||
var newValue = valueField.typedInput('value');
|
var newValue = valueField.typedInput('value');
|
||||||
if (newType === opt.parent.type && newValue === opt.parent.value) {
|
if (newType === opt.parent.type && newValue === opt.parent.value) {
|
||||||
@ -592,7 +592,7 @@ RED.editor = (function() {
|
|||||||
actionButton.show();
|
actionButton.show();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
actionButton.click(function(evt) {
|
actionButton.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
restoreTip.close();
|
restoreTip.close();
|
||||||
valueField.typedInput('type', opt.parent.type);
|
valueField.typedInput('type', opt.parent.type);
|
||||||
@ -600,7 +600,7 @@ RED.editor = (function() {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
var removeTip = RED.popover.tooltip(actionButton,RED._("subflow.env.remove"));
|
var removeTip = RED.popover.tooltip(actionButton,RED._("subflow.env.remove"));
|
||||||
actionButton.click(function(evt) {
|
actionButton.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
removeTip.close();
|
removeTip.close();
|
||||||
container.parent().addClass("red-ui-editableList-item-deleting")
|
container.parent().addClass("red-ui-editableList-item-deleting")
|
||||||
@ -711,7 +711,7 @@ RED.editor = (function() {
|
|||||||
// Add in reverse order as they are prepended...
|
// Add in reverse order as they are prepended...
|
||||||
$('<input type="password" style="display: none;" />').prependTo(dialogForm);
|
$('<input type="password" style="display: none;" />').prependTo(dialogForm);
|
||||||
$('<input type="text" 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;
|
return dialogForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -838,7 +838,7 @@ RED.editor = (function() {
|
|||||||
$('<label>',{for:id}).text((index+1)+".").appendTo(result);
|
$('<label>',{for:id}).text((index+1)+".").appendTo(result);
|
||||||
var input = $('<input>',{type:"text",id:id, placeholder: placeHolder}).val(value).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);
|
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();
|
evt.preventDefault();
|
||||||
input.val("");
|
input.val("");
|
||||||
})
|
})
|
||||||
@ -894,7 +894,7 @@ RED.editor = (function() {
|
|||||||
var iconList = $('<div class="red-ui-icon-list">').appendTo(picker);
|
var iconList = $('<div class="red-ui-icon-list">').appendTo(picker);
|
||||||
var metaRow = $('<div class="red-ui-icon-meta"></div>').appendTo(picker);
|
var metaRow = $('<div class="red-ui-icon-meta"></div>').appendTo(picker);
|
||||||
var summary = $('<span>').appendTo(metaRow);
|
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();
|
e.preventDefault();
|
||||||
hide();
|
hide();
|
||||||
done(null);
|
done(null);
|
||||||
@ -925,7 +925,7 @@ RED.editor = (function() {
|
|||||||
iconDiv.on("mouseout", function() {
|
iconDiv.on("mouseout", function() {
|
||||||
summary.html(" ");
|
summary.html(" ");
|
||||||
})
|
})
|
||||||
iconDiv.click(function() {
|
iconDiv.on("click", function() {
|
||||||
hide();
|
hide();
|
||||||
done(moduleName+"/"+icon);
|
done(moduleName+"/"+icon);
|
||||||
})
|
})
|
||||||
@ -933,7 +933,7 @@ RED.editor = (function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
picker.slideDown(100);
|
picker.slideDown(100);
|
||||||
searchInput.focus();
|
searchInput.trigger("focus");
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildAppearanceForm(container,node) {
|
function buildAppearanceForm(container,node) {
|
||||||
@ -986,7 +986,7 @@ RED.editor = (function() {
|
|||||||
var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv);
|
var iconContainer = $('<div/>',{class:"palette_icon_container"}).appendTo(nodeDiv);
|
||||||
RED.utils.createIconElement(icon_url, iconContainer, true);
|
RED.utils.createIconElement(icon_url, iconContainer, true);
|
||||||
|
|
||||||
iconButton.click(function(e) {
|
iconButton.on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var iconPath;
|
var iconPath;
|
||||||
var icon = $("#node-settings-icon").text()||"";
|
var icon = $("#node-settings-icon").text()||"";
|
||||||
@ -1597,7 +1597,7 @@ RED.editor = (function() {
|
|||||||
text: RED._("subflow.edit"),
|
text: RED._("subflow.edit"),
|
||||||
click: function() {
|
click: function() {
|
||||||
RED.workspaces.show(id);
|
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>');
|
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").append($("<option></option>").val("_custom_").text(RED._("palette.addCategory")));
|
||||||
|
|
||||||
|
|
||||||
$("#subflow-input-category").change(function() {
|
$("#subflow-input-category").on("change", function() {
|
||||||
var val = $(this).val();
|
var val = $(this).val();
|
||||||
if (val === "_custom_") {
|
if (val === "_custom_") {
|
||||||
$("#subflow-input-category").width(120);
|
$("#subflow-input-category").width(120);
|
||||||
@ -2397,7 +2397,7 @@ RED.editor = (function() {
|
|||||||
if (options.expandable !== false) {
|
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);
|
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();
|
e.preventDefault();
|
||||||
var value = editor.getValue();
|
var value = editor.getValue();
|
||||||
RED.editor.editMarkdown({
|
RED.editor.editMarkdown({
|
||||||
@ -2432,13 +2432,13 @@ RED.editor = (function() {
|
|||||||
RED.tray.init();
|
RED.tray.init();
|
||||||
RED.actions.add("core:confirm-edit-tray", function() {
|
RED.actions.add("core:confirm-edit-tray", function() {
|
||||||
$(document.activeElement).blur();
|
$(document.activeElement).blur();
|
||||||
$("#node-dialog-ok").click();
|
$("#node-dialog-ok").trigger("click");
|
||||||
$("#node-config-dialog-ok").click();
|
$("#node-config-dialog-ok").trigger("click");
|
||||||
});
|
});
|
||||||
RED.actions.add("core:cancel-edit-tray", function() {
|
RED.actions.add("core:cancel-edit-tray", function() {
|
||||||
$(document.activeElement).blur();
|
$(document.activeElement).blur();
|
||||||
$("#node-dialog-cancel").click();
|
$("#node-dialog-cancel").trigger("click");
|
||||||
$("#node-config-dialog-cancel").click();
|
$("#node-config-dialog-cancel").trigger("click");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
edit: showEditDialog,
|
edit: showEditDialog,
|
||||||
|
@ -182,7 +182,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".node-input-buffer-type").click(function(e) {
|
$(".node-input-buffer-type").on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
RED.sidebar.info.set(RED._("bufferEditor.modeDesc"));
|
RED.sidebar.info.set(RED._("bufferEditor.modeDesc"));
|
||||||
RED.sidebar.info.show();
|
RED.sidebar.info.show();
|
||||||
|
@ -95,7 +95,7 @@
|
|||||||
Object.keys(jsonata.functions).forEach(function(f) {
|
Object.keys(jsonata.functions).forEach(function(f) {
|
||||||
funcSelect.append($("<option></option>").val(f).text(f));
|
funcSelect.append($("<option></option>").val(f).text(f));
|
||||||
})
|
})
|
||||||
funcSelect.change(function(e) {
|
funcSelect.on("change", function(e) {
|
||||||
var f = $(this).val();
|
var f = $(this).val();
|
||||||
var args = RED._('jsonata:'+f+".args",{defaultValue:''});
|
var args = RED._('jsonata:'+f+".args",{defaultValue:''});
|
||||||
var title = "<h5>"+f+"("+args+")</h5>";
|
var title = "<h5>"+f+"("+args+")</h5>";
|
||||||
@ -180,13 +180,13 @@
|
|||||||
expressionEditor.session.removeMarker(currentFunctionMarker);
|
expressionEditor.session.removeMarker(currentFunctionMarker);
|
||||||
if (scopedFunction) {
|
if (scopedFunction) {
|
||||||
//console.log(token,.map(function(t) { return t.type}));
|
//console.log(token,.map(function(t) { return t.type}));
|
||||||
funcSelect.val(scopedFunction.value).change();
|
funcSelect.val(scopedFunction.value).trigger("change");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogForm.i18n();
|
dialogForm.i18n();
|
||||||
$("#node-input-expression-func-insert").click(function(e) {
|
$("#node-input-expression-func-insert").on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var pos = expressionEditor.getCursorPosition();
|
var pos = expressionEditor.getCursorPosition();
|
||||||
var f = funcSelect.val();
|
var f = funcSelect.val();
|
||||||
@ -194,7 +194,7 @@
|
|||||||
expressionEditor.insertSnippet(snippet);
|
expressionEditor.insertSnippet(snippet);
|
||||||
expressionEditor.focus();
|
expressionEditor.focus();
|
||||||
});
|
});
|
||||||
$("#node-input-expression-reformat").click(function(evt) {
|
$("#node-input-expression-reformat").on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
var v = expressionEditor.getValue()||"";
|
var v = expressionEditor.getValue()||"";
|
||||||
try {
|
try {
|
||||||
@ -231,7 +231,7 @@
|
|||||||
lineNumbers: false
|
lineNumbers: false
|
||||||
});
|
});
|
||||||
var changeTimer;
|
var changeTimer;
|
||||||
$(".node-input-expression-legacy").click(function(e) {
|
$(".node-input-expression-legacy").on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
RED.sidebar.info.set(RED._("expressionEditor.compatModeDesc"));
|
RED.sidebar.info.set(RED._("expressionEditor.compatModeDesc"));
|
||||||
RED.sidebar.info.show();
|
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();
|
evt.preventDefault();
|
||||||
var v = testDataEditor.getValue()||"";
|
var v = testDataEditor.getValue()||"";
|
||||||
try {
|
try {
|
||||||
|
@ -89,7 +89,7 @@
|
|||||||
});
|
});
|
||||||
checkValid();
|
checkValid();
|
||||||
}
|
}
|
||||||
$("#node-input-json-reformat").click(function(evt) {
|
$("#node-input-json-reformat").on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
var v = expressionEditor.getValue()||"";
|
var v = expressionEditor.getValue()||"";
|
||||||
try {
|
try {
|
||||||
|
@ -126,7 +126,7 @@
|
|||||||
'<button type="button" id="node-btn-markdown-preview" class="editor-button toggle single"><i class="fa fa-eye"></i></button>'+
|
'<button type="button" id="node-btn-markdown-preview" class="editor-button toggle single"><i class="fa fa-eye"></i></button>'+
|
||||||
'</span>').appendTo(expressionEditor.toolbar);
|
'</span>').appendTo(expressionEditor.toolbar);
|
||||||
|
|
||||||
$("#node-btn-markdown-preview").click(function(e) {
|
$("#node-btn-markdown-preview").on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if ($(this).hasClass("selected")) {
|
if ($(this).hasClass("selected")) {
|
||||||
$(this).removeClass("selected");
|
$(this).removeClass("selected");
|
||||||
@ -172,7 +172,7 @@
|
|||||||
var toolbar = $(toolbarTemplate).appendTo(container);
|
var toolbar = $(toolbarTemplate).appendTo(container);
|
||||||
toolbar.find('button[data-style]').each(function(el) {
|
toolbar.find('button[data-style]').each(function(el) {
|
||||||
var style = styleActions[$(this).data('style')];
|
var style = styleActions[$(this).data('style')];
|
||||||
$(this).click(function(e) {
|
$(this).on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var current = editor.getSelectedText();
|
var current = editor.getSelectedText();
|
||||||
var range = editor.selection.getRange();
|
var range = editor.selection.getRange();
|
||||||
|
@ -109,7 +109,7 @@ RED.h = handlers;
|
|||||||
get: getSettingsPane,
|
get: getSettingsPane,
|
||||||
focus: function() {
|
focus: function() {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$("#user-settings-tab-keyboard-filter").focus();
|
$("#user-settings-tab-keyboard-filter").trigger("focus");
|
||||||
},200);
|
},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 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);
|
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();
|
e.stopPropagation();
|
||||||
endEditShortcut();
|
endEditShortcut();
|
||||||
});
|
});
|
||||||
revertButton.click(function(e) {
|
revertButton.on("click", function(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
RED.keyboard.revertToDefault(object.id);
|
RED.keyboard.revertToDefault(object.id);
|
||||||
container.empty();
|
container.empty();
|
||||||
@ -426,7 +426,7 @@ RED.h = handlers;
|
|||||||
buildShortcutRow(container,obj);
|
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);
|
var scope = $('<div class="keyboard-shortcut-entry-scope">').appendTo(item);
|
||||||
|
|
||||||
$("<span>").text(object.scope === '*'?'global':object.scope||"").appendTo(scope);
|
$("<span>").text(object.scope === '*'?'global':object.scope||"").appendTo(scope);
|
||||||
container.click(editShortcut);
|
container.on("click", editShortcut);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSettingsPane() {
|
function getSettingsPane() {
|
||||||
|
@ -209,7 +209,7 @@ RED.library = (function() {
|
|||||||
'</ul></div>'
|
'</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;
|
activeLibrary = options;
|
||||||
loadLibraryFolder("local",options.url, "", function(items) {
|
loadLibraryFolder("local",options.url, "", function(items) {
|
||||||
var listing = [{
|
var listing = [{
|
||||||
@ -249,7 +249,7 @@ RED.library = (function() {
|
|||||||
e.preventDefault();
|
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;
|
activeLibrary = options;
|
||||||
//var found = false;
|
//var found = false;
|
||||||
var name = $("#"+elementPrefix+"name").val().replace(/(^\s*)|(\s*$)/g,"");
|
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 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>')
|
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.preventDefault();
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
var elementPos = menuButton.offset();
|
var elementPos = menuButton.offset();
|
||||||
@ -368,12 +368,12 @@ RED.library = (function() {
|
|||||||
cancelAdd();
|
cancelAdd();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
input.blur(function() {
|
input.on("blur", function() {
|
||||||
confirmAdd();
|
confirmAdd();
|
||||||
})
|
})
|
||||||
selected.treeList.addChild(newItem);
|
selected.treeList.addChild(newItem);
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
input.focus();
|
input.trigger("focus");
|
||||||
input.select();
|
input.select();
|
||||||
},400);
|
},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-save-filename").on('paste',function() { var input = $(this); setTimeout(function() { validateExportFilename(input)},10)});
|
||||||
|
|
||||||
$( "#node-dialog-library-load" ).dialog({
|
$( "#node-dialog-library-load" ).dialog({
|
||||||
|
@ -105,7 +105,7 @@ RED.notifications = (function() {
|
|||||||
if (options.buttons) {
|
if (options.buttons) {
|
||||||
var buttonSet = $('<div style="margin-top: 20px;" class="ui-dialog-buttonset"></div>').appendTo(n)
|
var buttonSet = $('<div style="margin-top: 20px;" class="ui-dialog-buttonset"></div>').appendTo(n)
|
||||||
options.buttons.forEach(function(buttonDef) {
|
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) {
|
if (buttonDef.id) {
|
||||||
b.attr('id',buttonDef.id);
|
b.attr('id',buttonDef.id);
|
||||||
}
|
}
|
||||||
@ -192,7 +192,7 @@ RED.notifications = (function() {
|
|||||||
if (options.buttons) {
|
if (options.buttons) {
|
||||||
var buttonSet = $('<div style="margin-top: 20px;" class="ui-dialog-buttonset"></div>').appendTo(nn)
|
var buttonSet = $('<div style="margin-top: 20px;" class="ui-dialog-buttonset"></div>').appendTo(nn)
|
||||||
options.buttons.forEach(function(buttonDef) {
|
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) {
|
if (buttonDef.id) {
|
||||||
b.attr('id',buttonDef.id);
|
b.attr('id',buttonDef.id);
|
||||||
}
|
}
|
||||||
@ -221,7 +221,7 @@ RED.notifications = (function() {
|
|||||||
})();
|
})();
|
||||||
|
|
||||||
if (!fixed) {
|
if (!fixed) {
|
||||||
$(n).click((function() {
|
$(n).on("click", (function() {
|
||||||
var nn = n;
|
var nn = n;
|
||||||
return function() {
|
return function() {
|
||||||
nn.close();
|
nn.close();
|
||||||
@ -268,7 +268,7 @@ RED.notifications = (function() {
|
|||||||
'<i class="fa fa-warning"></i>'+
|
'<i class="fa fa-warning"></i>'+
|
||||||
'</a>'+
|
'</a>'+
|
||||||
'</li>').prependTo(".header-toolbar").hide();
|
'</li>').prependTo(".header-toolbar").hide();
|
||||||
$('#btn-notifications').click(function() {
|
$('#btn-notifications').on("click", function() {
|
||||||
showPersistent();
|
showPersistent();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -451,7 +451,7 @@ RED.palette.editor = (function() {
|
|||||||
focus: function() {
|
focus: function() {
|
||||||
editorTabs.resize();
|
editorTabs.resize();
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
filterInput.focus();
|
filterInput.trigger("focus");
|
||||||
},200);
|
},200);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -560,11 +560,11 @@ RED.palette.editor = (function() {
|
|||||||
}
|
}
|
||||||
if (tab.id === 'install') {
|
if (tab.id === 'install') {
|
||||||
if (searchInput) {
|
if (searchInput) {
|
||||||
searchInput.focus();
|
searchInput.trigger("focus");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (filterInput) {
|
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);
|
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.attr('id','up_'+Math.floor(Math.random()*1000000000));
|
||||||
updateButton.click(function(evt) {
|
updateButton.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
if ($(this).hasClass('disabled')) {
|
if ($(this).hasClass('disabled')) {
|
||||||
return;
|
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);
|
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.attr('id','up_'+Math.floor(Math.random()*1000000000));
|
||||||
removeButton.click(function(evt) {
|
removeButton.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
remove(entry,container,function(err){});
|
remove(entry,container,function(err){});
|
||||||
})
|
})
|
||||||
@ -657,7 +657,7 @@ RED.palette.editor = (function() {
|
|||||||
versionSpan: versionSpan,
|
versionSpan: versionSpan,
|
||||||
sets: {}
|
sets: {}
|
||||||
}
|
}
|
||||||
setButton.click(function(evt) {
|
setButton.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
if (container.hasClass('expanded')) {
|
if (container.hasClass('expanded')) {
|
||||||
container.removeClass('expanded');
|
container.removeClass('expanded');
|
||||||
@ -683,7 +683,7 @@ RED.palette.editor = (function() {
|
|||||||
$('<span>',{class:"palette-module-type-node"}).text(t).appendTo(typeDiv);
|
$('<span>',{class:"palette-module-type-node"}).text(t).appendTo(typeDiv);
|
||||||
})
|
})
|
||||||
var enableButton = $('<a href="#" class="editor-button editor-button-small"></a>').appendTo(buttonGroup);
|
var enableButton = $('<a href="#" class="editor-button editor-button-small"></a>').appendTo(buttonGroup);
|
||||||
enableButton.click(function(evt) {
|
enableButton.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
if (object.setUseCount[setName] === 0) {
|
if (object.setUseCount[setName] === 0) {
|
||||||
var currentSet = RED.nodes.registry.getNodeSet(set.id);
|
var currentSet = RED.nodes.registry.getNodeSet(set.id);
|
||||||
@ -705,7 +705,7 @@ RED.palette.editor = (function() {
|
|||||||
swatches: typeSwatches
|
swatches: typeSwatches
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
enableButton.click(function(evt) {
|
enableButton.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
if (object.totalUseCount === 0) {
|
if (object.totalUseCount === 0) {
|
||||||
changeNodeState(entry.name,(container.hasClass('disabled')),shade,function(xhr){
|
changeNodeState(entry.name,(container.hasClass('disabled')),shade,function(xhr){
|
||||||
@ -772,7 +772,7 @@ RED.palette.editor = (function() {
|
|||||||
{button: sortRecent, func: sortModulesRecent}
|
{button: sortRecent, func: sortModulesRecent}
|
||||||
]
|
]
|
||||||
sortOpts.forEach(function(opt) {
|
sortOpts.forEach(function(opt) {
|
||||||
opt.button.click(function(e) {
|
opt.button.on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if ($(this).hasClass("selected")) {
|
if ($(this).hasClass("selected")) {
|
||||||
return;
|
return;
|
||||||
@ -786,7 +786,7 @@ RED.palette.editor = (function() {
|
|||||||
|
|
||||||
var refreshSpan = $('<span>').appendTo(toolBar);
|
var refreshSpan = $('<span>').appendTo(toolBar);
|
||||||
var refreshButton = $('<a href="#" class="sidebar-header-button"><i class="fa fa-refresh"></i></a>').appendTo(refreshSpan);
|
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();
|
e.preventDefault();
|
||||||
loadedList = [];
|
loadedList = [];
|
||||||
loadedIndex = {};
|
loadedIndex = {};
|
||||||
@ -805,7 +805,7 @@ RED.palette.editor = (function() {
|
|||||||
container.addClass('palette-module-more');
|
container.addClass('palette-module-more');
|
||||||
var moreRow = $('<div>',{class:"palette-module-header palette-module"}).appendTo(container);
|
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);
|
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();
|
e.preventDefault();
|
||||||
packageList.editableList('removeItem',object);
|
packageList.editableList('removeItem',object);
|
||||||
for (var i=object.start;i<Math.min(object.start+10,object.start+object.more);i++) {
|
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 buttonRow = $('<div>',{class:"palette-module-meta"}).appendTo(headerRow);
|
||||||
var buttonGroup = $('<div>',{class:"palette-module-button-group"}).appendTo(buttonRow);
|
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);
|
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();
|
e.preventDefault();
|
||||||
if (!$(this).hasClass('disabled')) {
|
if (!$(this).hasClass('disabled')) {
|
||||||
install(entry,container,function(xhr) {});
|
install(entry,container,function(xhr) {});
|
||||||
@ -898,7 +898,7 @@ RED.palette.editor = (function() {
|
|||||||
click: function() {
|
click: function() {
|
||||||
var spinner = RED.utils.addSpinnerOverlay(container, true);
|
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);
|
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();
|
evt.preventDefault();
|
||||||
RED.actions.invoke("core:show-event-log");
|
RED.actions.invoke("core:show-event-log");
|
||||||
});
|
});
|
||||||
@ -957,7 +957,7 @@ RED.palette.editor = (function() {
|
|||||||
click: function() {
|
click: function() {
|
||||||
var spinner = RED.utils.addSpinnerOverlay(container, true);
|
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);
|
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();
|
evt.preventDefault();
|
||||||
RED.actions.invoke("core:show-event-log");
|
RED.actions.invoke("core:show-event-log");
|
||||||
});
|
});
|
||||||
@ -1023,7 +1023,7 @@ RED.palette.editor = (function() {
|
|||||||
var spinner = RED.utils.addSpinnerOverlay(container, true);
|
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);
|
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();
|
evt.preventDefault();
|
||||||
RED.actions.invoke("core:show-event-log");
|
RED.actions.invoke("core:show-event-log");
|
||||||
});
|
});
|
||||||
|
@ -232,7 +232,7 @@ RED.palette = (function() {
|
|||||||
// html: true,
|
// html: true,
|
||||||
// container:'body'
|
// container:'body'
|
||||||
// });
|
// });
|
||||||
$(d).click(function() {
|
$(d).on("click", function() {
|
||||||
RED.view.focus();
|
RED.view.focus();
|
||||||
var helpText;
|
var helpText;
|
||||||
if (nt.indexOf("subflow:") === 0) {
|
if (nt.indexOf("subflow:") === 0) {
|
||||||
@ -330,7 +330,7 @@ RED.palette = (function() {
|
|||||||
|
|
||||||
var nodeInfo = null;
|
var nodeInfo = null;
|
||||||
if (nt.indexOf("subflow:") === 0) {
|
if (nt.indexOf("subflow:") === 0) {
|
||||||
$(d).dblclick(function(e) {
|
$(d).on("dblclick", function(e) {
|
||||||
RED.workspaces.show(nt.substring(8));
|
RED.workspaces.show(nt.substring(8));
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
@ -520,7 +520,7 @@ RED.palette = (function() {
|
|||||||
sidebarControls = $('<div class="sidebar-control-left"><i class="fa fa-chevron-left"</div>').appendTo($("#palette"));
|
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");
|
RED.popover.tooltip(sidebarControls,RED._("keyboard.togglePalette"),"core:toggle-palette");
|
||||||
|
|
||||||
sidebarControls.click(function() {
|
sidebarControls.on("click", function() {
|
||||||
RED.menu.toggleSelected("menu-item-palette");
|
RED.menu.toggleSelected("menu-item-palette");
|
||||||
})
|
})
|
||||||
$("#palette").on("mouseenter", function() {
|
$("#palette").on("mouseenter", function() {
|
||||||
@ -583,7 +583,7 @@ RED.palette = (function() {
|
|||||||
$("#main-container").removeClass("palette-closed");
|
$("#main-container").removeClass("palette-closed");
|
||||||
sidebarControls.find("i").removeClass("fa-chevron-right").addClass("fa-chevron-left");
|
sidebarControls.find("i").removeClass("fa-chevron-right").addClass("fa-chevron-left");
|
||||||
}
|
}
|
||||||
setTimeout(function() { $(window).resize(); } ,200);
|
setTimeout(function() { $(window).trigger("resize"); } ,200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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);
|
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>')
|
$('<button class="editor-button">' + RED._("common.label.cancel") + '</button>')
|
||||||
.appendTo(bg)
|
.appendTo(bg)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
updateProjectSummary(activeProject.summary, container);
|
updateProjectSummary(activeProject.summary, container);
|
||||||
editButton.show();
|
editButton.show();
|
||||||
});
|
});
|
||||||
$('<button class="editor-button">' + RED._("common.label.save") + '</button>')
|
$('<button class="editor-button">' + RED._("common.label.save") + '</button>')
|
||||||
.appendTo(bg)
|
.appendTo(bg)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
var v = input.val();
|
var v = input.val();
|
||||||
updateProjectSummary(v, container);
|
updateProjectSummary(v, container);
|
||||||
@ -237,7 +237,7 @@ RED.projects.settings = (function() {
|
|||||||
if (RED.user.hasPermission("projects.write")) {
|
if (RED.user.hasPermission("projects.write")) {
|
||||||
$('<button class="editor-button editor-button-small" style="float: right;">' + RED._('sidebar.project.editDescription') + '</button>')
|
$('<button class="editor-button editor-button-small" style="float: right;">' + RED._('sidebar.project.editDescription') + '</button>')
|
||||||
.prependTo(summary)
|
.prependTo(summary)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
editSummary(activeProject, activeProject.summary, summaryContent);
|
editSummary(activeProject, activeProject.summary, summaryContent);
|
||||||
});
|
});
|
||||||
@ -252,7 +252,7 @@ RED.projects.settings = (function() {
|
|||||||
if (RED.user.hasPermission("projects.write")) {
|
if (RED.user.hasPermission("projects.write")) {
|
||||||
$('<button class="editor-button editor-button-small" style="float: right;">' + RED._('sidebar.project.editReadme') + '</button>')
|
$('<button class="editor-button editor-button-small" style="float: right;">' + RED._('sidebar.project.editReadme') + '</button>')
|
||||||
.prependTo(description)
|
.prependTo(description)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
editDescription(activeProject, descriptionContent);
|
editDescription(activeProject, descriptionContent);
|
||||||
});
|
});
|
||||||
@ -383,7 +383,7 @@ RED.projects.settings = (function() {
|
|||||||
if (RED.user.hasPermission("projects.write")) {
|
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>')
|
$('<button class="editor-button editor-button-small" style="margin-top:10px;float: right;">' + RED._("sidebar.project.projectSettings.edit") + '</button>')
|
||||||
.appendTo(pane)
|
.appendTo(pane)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
editDependencies(activeProject,null,pane,depsList)
|
editDependencies(activeProject,null,pane,depsList)
|
||||||
});
|
});
|
||||||
@ -403,7 +403,7 @@ RED.projects.settings = (function() {
|
|||||||
headerRow.text(entry.label);
|
headerRow.text(entry.label);
|
||||||
// if (RED.user.hasPermission("projects.write")) {
|
// if (RED.user.hasPermission("projects.write")) {
|
||||||
// if (entry.index === 1) {
|
// 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();
|
// evt.preventDefault();
|
||||||
// var deps = $.extend(true, {}, activeProject.dependencies);
|
// var deps = $.extend(true, {}, activeProject.dependencies);
|
||||||
// for (var m in modulesInUse) {
|
// for (var m in modulesInUse) {
|
||||||
@ -414,7 +414,7 @@ RED.projects.settings = (function() {
|
|||||||
// editDependencies(activeProject,JSON.stringify(deps,"",4),pane,depsList);
|
// editDependencies(activeProject,JSON.stringify(deps,"",4),pane,depsList);
|
||||||
// });
|
// });
|
||||||
// } else if (entry.index === 3) {
|
// } 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();
|
// evt.preventDefault();
|
||||||
// var deps = $.extend(true, {}, activeProject.dependencies);
|
// var deps = $.extend(true, {}, activeProject.dependencies);
|
||||||
// for (var m in activeProject.dependencies) {
|
// for (var m in activeProject.dependencies) {
|
||||||
@ -452,7 +452,7 @@ RED.projects.settings = (function() {
|
|||||||
if (RED.user.hasPermission("projects.write")) {
|
if (RED.user.hasPermission("projects.write")) {
|
||||||
if (!entry.installed && RED.settings.theme('palette.editable') !== false) {
|
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)
|
$('<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();
|
evt.preventDefault();
|
||||||
RED.palette.editor.install(entry,row,function(err) {
|
RED.palette.editor.install(entry,row,function(err) {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
@ -473,7 +473,7 @@ RED.projects.settings = (function() {
|
|||||||
})
|
})
|
||||||
} else if (entry.known && entry.count === 0) {
|
} else if (entry.known && entry.count === 0) {
|
||||||
$('<a href="#" class="editor-button editor-button-small">' + RED._("sidebar.project.projectSettings.removeFromProject") + '</a>').appendTo(buttons)
|
$('<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();
|
evt.preventDefault();
|
||||||
var deps = $.extend(true, {}, activeProject.dependencies);
|
var deps = $.extend(true, {}, activeProject.dependencies);
|
||||||
delete deps[entry.id];
|
delete deps[entry.id];
|
||||||
@ -489,7 +489,7 @@ RED.projects.settings = (function() {
|
|||||||
});
|
});
|
||||||
} else if (!entry.known) {
|
} else if (!entry.known) {
|
||||||
$('<a href="#" class="editor-button editor-button-small">' + RED._("sidebar.project.projectSettings.addToProject") + '</a>').appendTo(buttons)
|
$('<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();
|
evt.preventDefault();
|
||||||
var deps = $.extend(true, {}, activeProject.dependencies);
|
var deps = $.extend(true, {}, activeProject.dependencies);
|
||||||
deps[entry.id] = modulesInUse[entry.id].version;
|
deps[entry.id] = modulesInUse[entry.id].version;
|
||||||
@ -595,7 +595,7 @@ RED.projects.settings = (function() {
|
|||||||
}
|
}
|
||||||
createFileSubList(children,entry.children,current,selectFilter,onselect);
|
createFileSubList(children,entry.children,current,selectFilter,onselect);
|
||||||
header.addClass("selectable");
|
header.addClass("selectable");
|
||||||
header.click(function(e) {
|
header.on("click", function(e) {
|
||||||
if ($(this).hasClass("expanded")) {
|
if ($(this).hasClass("expanded")) {
|
||||||
$(this).removeClass("expanded");
|
$(this).removeClass("expanded");
|
||||||
children.slideUp(200);
|
children.slideUp(200);
|
||||||
@ -624,12 +624,12 @@ RED.projects.settings = (function() {
|
|||||||
if (entry.path === current) {
|
if (entry.path === current) {
|
||||||
header.addClass("selected");
|
header.addClass("selected");
|
||||||
}
|
}
|
||||||
header.click(function(e) {
|
header.on("click", function(e) {
|
||||||
$(".projects-dialog-file-list-entry.selected").removeClass("selected");
|
$(".projects-dialog-file-list-entry.selected").removeClass("selected");
|
||||||
$(this).addClass("selected");
|
$(this).addClass("selected");
|
||||||
onselect(entry.path,true);
|
onselect(entry.path,true);
|
||||||
})
|
})
|
||||||
header.dblclick(function(e) {
|
header.on("dblclick", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
onselect(entry.path,true);
|
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>')
|
// var flowFileInputSearch = $('<button class="editor-button" style="margin-left: 10px"><i class="fa fa-folder-open-o"></i></button>')
|
||||||
// .insertAfter(flowFileInput)
|
// .insertAfter(flowFileInput)
|
||||||
// .click(function(e) {
|
// .on("click", function(e) {
|
||||||
// showProjectFileListing(activeProject,'Select flow file',flowFileInput.val(),function(result) {
|
// showProjectFileListing(activeProject,'Select flow file',flowFileInput.val(),function(result) {
|
||||||
// flowFileInput.val(result);
|
// flowFileInput.val(result);
|
||||||
// checkFiles();
|
// 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);
|
// var bg = $('<span class="button-group" style="position: relative; float: right; margin-right:0;"></span>').prependTo(container);
|
||||||
// $('<button class="editor-button">Cancel</button>')
|
// $('<button class="editor-button">Cancel</button>')
|
||||||
// .appendTo(bg)
|
// .appendTo(bg)
|
||||||
// .click(function(evt) {
|
// .on("click", function(evt) {
|
||||||
// evt.preventDefault();
|
// evt.preventDefault();
|
||||||
//
|
//
|
||||||
// flowFileLabel.show();
|
// flowFileLabel.show();
|
||||||
@ -684,7 +684,7 @@ RED.projects.settings = (function() {
|
|||||||
// });
|
// });
|
||||||
// var saveButton = $('<button class="editor-button">Save</button>')
|
// var saveButton = $('<button class="editor-button">Save</button>')
|
||||||
// .appendTo(bg)
|
// .appendTo(bg)
|
||||||
// .click(function(evt) {
|
// .on("click", function(evt) {
|
||||||
// evt.preventDefault();
|
// evt.preventDefault();
|
||||||
// var newFlowFile = flowFileInput.val();
|
// var newFlowFile = flowFileInput.val();
|
||||||
// var newCredsFile = credentialsFileInput.val();
|
// var newCredsFile = credentialsFileInput.val();
|
||||||
@ -733,7 +733,7 @@ RED.projects.settings = (function() {
|
|||||||
if (RED.user.hasPermission("projects.write")) {
|
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>')
|
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)
|
.appendTo(title)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
formButtons.show();
|
formButtons.show();
|
||||||
editFilesButton.hide();
|
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>')
|
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()
|
.hide()
|
||||||
.appendTo(packageFileLabel)
|
.appendTo(packageFileLabel)
|
||||||
.click(function(e) {
|
.on("click", function(e) {
|
||||||
if ($(this).hasClass('selected')) {
|
if ($(this).hasClass('selected')) {
|
||||||
$(this).removeClass('selected');
|
$(this).removeClass('selected');
|
||||||
packageFileLabel.find('.project-file-listing-container').slideUp(200,function() {
|
packageFileLabel.find('.project-file-listing-container').slideUp(200,function() {
|
||||||
@ -796,7 +796,7 @@ RED.projects.settings = (function() {
|
|||||||
packageFileSubLabel.hide();
|
packageFileSubLabel.hide();
|
||||||
}
|
}
|
||||||
if (close) {
|
if (close) {
|
||||||
$(packageFileInputSearch).click();
|
$(packageFileInputSearch).trigger("click");
|
||||||
}
|
}
|
||||||
checkFiles();
|
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>')
|
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()
|
.hide()
|
||||||
.appendTo(flowFileLabel)
|
.appendTo(flowFileLabel)
|
||||||
.click(function(e) {
|
.on("click", function(e) {
|
||||||
if ($(this).hasClass('selected')) {
|
if ($(this).hasClass('selected')) {
|
||||||
$(this).removeClass('selected');
|
$(this).removeClass('selected');
|
||||||
flowFileLabel.find('.project-file-listing-container').slideUp(200,function() {
|
flowFileLabel.find('.project-file-listing-container').slideUp(200,function() {
|
||||||
@ -865,7 +865,7 @@ RED.projects.settings = (function() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
if (isDblClick) {
|
if (isDblClick) {
|
||||||
$(flowFileInputSearch).click();
|
$(flowFileInputSearch).trigger("click");
|
||||||
}
|
}
|
||||||
checkFiles();
|
checkFiles();
|
||||||
}
|
}
|
||||||
@ -952,7 +952,7 @@ RED.projects.settings = (function() {
|
|||||||
credentialSecretButtons.css('vertical-align','top');
|
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>')
|
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)
|
.appendTo(credentialSecretButtons)
|
||||||
.click(function(e) {
|
.on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (!$(this).hasClass('selected')) {
|
if (!$(this).hasClass('selected')) {
|
||||||
credentialSecretNewInput.val("");
|
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>')
|
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)
|
.appendTo(credentialSecretButtons)
|
||||||
.click(function(e) {
|
.on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (!$(this).hasClass('selected')) {
|
if (!$(this).hasClass('selected')) {
|
||||||
credentialSecretExistingInput.val("");
|
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);
|
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>')
|
$('<button type="button" class="editor-button">' + RED._("common.label.cancel") + '</button>')
|
||||||
.appendTo(formButtons)
|
.appendTo(formButtons)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
var projectPackage = activeProject.files.package||"package.json";
|
var projectPackage = activeProject.files.package||"package.json";
|
||||||
var projectRoot = projectPackage.substring(0,projectPackage.length - 12);
|
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>')
|
var saveButton = $('<button type="button" class="editor-button">' + RED._("common.label.save") + '</button>')
|
||||||
.appendTo(formButtons)
|
.appendTo(formButtons)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
var spinner = utils.addSpinnerOverlay(filesContainer);
|
var spinner = utils.addSpinnerOverlay(filesContainer);
|
||||||
var done = function(err) {
|
var done = function(err) {
|
||||||
@ -1222,7 +1222,7 @@ RED.projects.settings = (function() {
|
|||||||
var tools = $('<span class="entry-tools">').appendTo(container);
|
var tools = $('<span class="entry-tools">').appendTo(container);
|
||||||
$('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>')
|
$('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>')
|
||||||
.appendTo(tools)
|
.appendTo(tools)
|
||||||
.click(function(e) {
|
.on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var spinner = utils.addSpinnerOverlay(row).addClass('projects-dialog-spinner-contain');
|
var spinner = utils.addSpinnerOverlay(row).addClass('projects-dialog-spinner-contain');
|
||||||
var notification = RED.notify(RED._("sidebar.project.projectSettings.deleteConfirm", { name: entry.name }), {
|
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>')
|
var editRepoButton = $('<button class="editor-button editor-button-small" style="float: right; margin-right: 10px;">' + RED._("sidebar.project.projectSettings.addRemote") + '</button>')
|
||||||
.appendTo(title)
|
.appendTo(title)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
editRepoButton.attr('disabled',true);
|
editRepoButton.attr('disabled',true);
|
||||||
addRemoteDialog.slideDown(200, function() {
|
addRemoteDialog.slideDown(200, function() {
|
||||||
addRemoteDialog[0].scrollIntoView();
|
addRemoteDialog[0].scrollIntoView();
|
||||||
if (isEmpty) {
|
if (isEmpty) {
|
||||||
remoteNameInput.val('origin');
|
remoteNameInput.val('origin');
|
||||||
remoteURLInput.focus();
|
remoteURLInput.trigger("focus");
|
||||||
} else {
|
} else {
|
||||||
remoteNameInput.focus();
|
remoteNameInput.trigger("focus");
|
||||||
}
|
}
|
||||||
validateForm();
|
validateForm();
|
||||||
});
|
});
|
||||||
@ -1367,7 +1367,7 @@ RED.projects.settings = (function() {
|
|||||||
var tools = $('<span class="entry-tools">').appendTo(container);
|
var tools = $('<span class="entry-tools">').appendTo(container);
|
||||||
$('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>')
|
$('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>')
|
||||||
.appendTo(tools)
|
.appendTo(tools)
|
||||||
.click(function(e) {
|
.on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var spinner = utils.addSpinnerOverlay(row).addClass('projects-dialog-spinner-contain');
|
var spinner = utils.addSpinnerOverlay(row).addClass('projects-dialog-spinner-contain');
|
||||||
var notification = RED.notify(RED._("sidebar.project.projectSettings.deleteRemoteConfrim", { name: entry.name }), {
|
var notification = RED.notify(RED._("sidebar.project.projectSettings.deleteRemoteConfrim", { name: entry.name }), {
|
||||||
@ -1493,13 +1493,13 @@ RED.projects.settings = (function() {
|
|||||||
.appendTo(addRemoteDialog);
|
.appendTo(addRemoteDialog);
|
||||||
$('<button class="editor-button">' + RED._("common.label.cancel") + '</button>')
|
$('<button class="editor-button">' + RED._("common.label.cancel") + '</button>')
|
||||||
.appendTo(formButtons)
|
.appendTo(formButtons)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
hideEditForm();
|
hideEditForm();
|
||||||
});
|
});
|
||||||
var saveButton = $('<button class="editor-button">' + RED._("sidebar.project.projectSettings.addRemote2") + '</button>')
|
var saveButton = $('<button class="editor-button">' + RED._("sidebar.project.projectSettings.addRemote2") + '</button>')
|
||||||
.appendTo(formButtons)
|
.appendTo(formButtons)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
var spinner = utils.addSpinnerOverlay(addRemoteDialog).addClass('projects-dialog-spinner-contain');
|
var spinner = utils.addSpinnerOverlay(addRemoteDialog).addClass('projects-dialog-spinner-contain');
|
||||||
|
|
||||||
|
@ -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>')
|
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)
|
.appendTo(subtitle)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
addKeyButton.attr('disabled',true);
|
addKeyButton.attr('disabled',true);
|
||||||
saveButton.attr('disabled',true);
|
saveButton.attr('disabled',true);
|
||||||
// bg.children().removeClass("selected");
|
// bg.children().removeClass("selected");
|
||||||
// addLocalButton.click();
|
// addLocalButton.trigger("click");
|
||||||
addKeyDialog.slideDown(200);
|
addKeyDialog.slideDown(200);
|
||||||
keyNameInput.focus();
|
keyNameInput.trigger("focus");
|
||||||
});
|
});
|
||||||
|
|
||||||
var validateForm = function() {
|
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 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 uploadButton = $('<button class="editor-button toggle">upload key</button>').appendTo(bg);
|
||||||
// var generateButton = $('<button class="editor-button toggle">generate 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();
|
// e.preventDefault();
|
||||||
// if ($(this).hasClass("selected")) {
|
// if ($(this).hasClass("selected")) {
|
||||||
// return;
|
// 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);
|
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>')
|
$('<button class="editor-button">'+RED._("editor:sidebar.project.userSettings.cancel")+'</button>')
|
||||||
.appendTo(formButtons)
|
.appendTo(formButtons)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
hideEditForm();
|
hideEditForm();
|
||||||
});
|
});
|
||||||
var saveButton = $('<button class="editor-button">'+RED._("editor:sidebar.project.userSettings.generate")+'</button>')
|
var saveButton = $('<button class="editor-button">'+RED._("editor:sidebar.project.userSettings.generate")+'</button>')
|
||||||
.appendTo(formButtons)
|
.appendTo(formButtons)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
var spinner = utils.addSpinnerOverlay(addKeyDialog).addClass('projects-dialog-spinner-contain');
|
var spinner = utils.addSpinnerOverlay(addKeyDialog).addClass('projects-dialog-spinner-contain');
|
||||||
var payload = {
|
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);
|
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>')
|
$('<button class="editor-button editor-button-small">'+RED._("editor:sidebar.project.userSettings.copyPublicKey")+'</button>')
|
||||||
.appendTo(formButtons)
|
.appendTo(formButtons)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
try {
|
try {
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
@ -297,7 +297,7 @@ RED.projects.userSettings = (function() {
|
|||||||
$('<span class="entry-name">').text(entry.name).appendTo(topRow);
|
$('<span class="entry-name">').text(entry.name).appendTo(topRow);
|
||||||
var tools = $('<span class="button-row entry-tools">').appendTo(topRow);
|
var tools = $('<span class="button-row entry-tools">').appendTo(topRow);
|
||||||
var expandedRow;
|
var expandedRow;
|
||||||
topRow.click(function(e) {
|
topRow.on("click", function(e) {
|
||||||
if (expandedRow) {
|
if (expandedRow) {
|
||||||
expandedRow.slideUp(200,function() {
|
expandedRow.slideUp(200,function() {
|
||||||
expandedRow.remove();
|
expandedRow.remove();
|
||||||
@ -310,7 +310,7 @@ RED.projects.userSettings = (function() {
|
|||||||
if (!entry.system) {
|
if (!entry.system) {
|
||||||
$('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>')
|
$('<button class="editor-button editor-button-small"><i class="fa fa-trash"></i></button>')
|
||||||
.appendTo(tools)
|
.appendTo(tools)
|
||||||
.click(function(e) {
|
.on("click", function(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
var spinner = utils.addSpinnerOverlay(row).addClass('projects-dialog-spinner-contain');
|
var spinner = utils.addSpinnerOverlay(row).addClass('projects-dialog-spinner-contain');
|
||||||
var notification = RED.notify(RED._("editor:sidebar.project.userSettings.deleteConfirm", {name:entry.name}), {
|
var notification = RED.notify(RED._("editor:sidebar.project.userSettings.deleteConfirm", {name:entry.name}), {
|
||||||
|
@ -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 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);
|
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();
|
e.preventDefault();
|
||||||
createProjectOptions = {
|
createProjectOptions = {
|
||||||
action: "create"
|
action: "create"
|
||||||
@ -92,7 +92,7 @@ RED.projects = (function() {
|
|||||||
show('git-config');
|
show('git-config');
|
||||||
})
|
})
|
||||||
|
|
||||||
createAsClone.click(function(e) {
|
createAsClone.on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
createProjectOptions = {
|
createProjectOptions = {
|
||||||
action: "clone"
|
action: "clone"
|
||||||
@ -172,7 +172,7 @@ RED.projects = (function() {
|
|||||||
gitEmailInput.on("change keyup paste",validateForm);
|
gitEmailInput.on("change keyup paste",validateForm);
|
||||||
// $('<div style="position:relative;"></div>').text("Something something email").appendTo(row);
|
// $('<div style="position:relative;"></div>').text("Something something email").appendTo(row);
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
gitUsernameInput.focus();
|
gitUsernameInput.trigger("focus");
|
||||||
validateForm();
|
validateForm();
|
||||||
},50);
|
},50);
|
||||||
return container;
|
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);
|
$('<label class="projects-edit-form-sublabel"><small>'+RED._("projects.project-details.opt")+'</small></label>').appendTo(row);
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
projectNameInput.focus();
|
projectNameInput.trigger("focus");
|
||||||
projectNameInput.change();
|
projectNameInput.trigger("change");
|
||||||
},50);
|
},50);
|
||||||
return container;
|
return container;
|
||||||
},
|
},
|
||||||
@ -492,7 +492,7 @@ RED.projects = (function() {
|
|||||||
if (projectName === "" || projectName === autoInsertedName) {
|
if (projectName === "" || projectName === autoInsertedName) {
|
||||||
autoInsertedName = m[1];
|
autoInsertedName = m[1];
|
||||||
projectNameInput.val(autoInsertedName);
|
projectNameInput.val(autoInsertedName);
|
||||||
projectNameInput.change();
|
projectNameInput.trigger("change");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
validateForm();
|
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);
|
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);
|
$('<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);
|
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();
|
e.preventDefault();
|
||||||
dialog.dialog( "close" );
|
dialog.dialog( "close" );
|
||||||
RED.userSettings.show('gitconfig');
|
RED.userSettings.show('gitconfig');
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$("#user-settings-gitconfig-add-key").click();
|
$("#user-settings-gitconfig-add-key").trigger("click");
|
||||||
},500);
|
},500);
|
||||||
});
|
});
|
||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
@ -760,7 +760,7 @@ RED.projects = (function() {
|
|||||||
$('<div class="projects-dialog-screen-input-status"></div>').appendTo(subrow);
|
$('<div class="projects-dialog-screen-input-status"></div>').appendTo(subrow);
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
projectFlowFileInput.focus();
|
projectFlowFileInput.trigger("focus");
|
||||||
validateForm();
|
validateForm();
|
||||||
},50);
|
},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);
|
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);
|
$('<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 val = $(this).val();
|
||||||
var toEnable;
|
var toEnable;
|
||||||
var toDisable;
|
var toDisable;
|
||||||
@ -871,7 +871,7 @@ RED.projects = (function() {
|
|||||||
$(".projects-encryption-enabled-row").show();
|
$(".projects-encryption-enabled-row").show();
|
||||||
$(".projects-encryption-disabled-row").hide();
|
$(".projects-encryption-disabled-row").hide();
|
||||||
if ($("input[name=projects-encryption-key]:checked").val() === 'custom') {
|
if ($("input[name=projects-encryption-key]:checked").val() === 'custom') {
|
||||||
emptyProjectCredentialInput.focus();
|
emptyProjectCredentialInput.trigger("focus");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -904,21 +904,21 @@ RED.projects = (function() {
|
|||||||
row = $('<div class="form-row projects-encryption-disabled-row"></div>').hide().appendTo(credentialsRightBox);
|
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);
|
$('<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();
|
var val = $(this).val();
|
||||||
emptyProjectCredentialInput.attr("disabled",val === 'default');
|
emptyProjectCredentialInput.attr("disabled",val === 'default');
|
||||||
if (val === "custom") {
|
if (val === "custom") {
|
||||||
emptyProjectCredentialInput.focus();
|
emptyProjectCredentialInput.trigger("focus");
|
||||||
}
|
}
|
||||||
validateForm();
|
validateForm();
|
||||||
});
|
});
|
||||||
|
|
||||||
setTimeout(function() {
|
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') {
|
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 {
|
} else {
|
||||||
credentialsRightBox.find("input[name=projects-encryption-key][value=default]").click();
|
credentialsRightBox.find("input[name=projects-encryption-key][value=default]").trigger("click");
|
||||||
}
|
}
|
||||||
validateForm();
|
validateForm();
|
||||||
},100);
|
},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 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-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);
|
// 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();
|
evt.preventDefault();
|
||||||
container.find(".projects-dialog-screen-create-type").removeClass('selected');
|
container.find(".projects-dialog-screen-create-type").removeClass('selected');
|
||||||
$(this).addClass('selected');
|
$(this).addClass('selected');
|
||||||
container.find(".projects-dialog-screen-create-row").hide();
|
container.find(".projects-dialog-screen-create-row").hide();
|
||||||
container.find(".projects-dialog-screen-create-row-"+$(this).data('type')).show();
|
container.find(".projects-dialog-screen-create-row-"+$(this).data('type')).show();
|
||||||
validateForm();
|
validateForm();
|
||||||
projectNameInput.focus();
|
projectNameInput.trigger("focus");
|
||||||
switch ($(this).data('type')) {
|
switch ($(this).data('type')) {
|
||||||
case "open": $("#projects-dialog-create").text(RED._("projects.create.open")); break;
|
case "open": $("#projects-dialog-create").text(RED._("projects.create.open")); break;
|
||||||
case "empty": $("#projects-dialog-create").text(RED._("projects.create.create")); break;
|
case "empty": $("#projects-dialog-create").text(RED._("projects.create.create")); break;
|
||||||
@ -1199,7 +1199,7 @@ RED.projects = (function() {
|
|||||||
canSelectActive: false,
|
canSelectActive: false,
|
||||||
dblclick: function(project) {
|
dblclick: function(project) {
|
||||||
selectedProject = project;
|
selectedProject = project;
|
||||||
$("#projects-dialog-create").click();
|
$("#projects-dialog-create").trigger("click");
|
||||||
},
|
},
|
||||||
select: function(project) {
|
select: function(project) {
|
||||||
selectedProject = 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);
|
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);
|
$('<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 val = $(this).val();
|
||||||
var toEnable;
|
var toEnable;
|
||||||
var toDisable;
|
var toDisable;
|
||||||
@ -1285,7 +1285,7 @@ RED.projects = (function() {
|
|||||||
$(".projects-encryption-enabled-row").show();
|
$(".projects-encryption-enabled-row").show();
|
||||||
$(".projects-encryption-disabled-row").hide();
|
$(".projects-encryption-disabled-row").hide();
|
||||||
if ($("input[name=projects-encryption-key]:checked").val() === 'custom') {
|
if ($("input[name=projects-encryption-key]:checked").val() === 'custom') {
|
||||||
emptyProjectCredentialInput.focus();
|
emptyProjectCredentialInput.trigger("focus");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
toDisable = credentialsEnabledBox;
|
toDisable = credentialsEnabledBox;
|
||||||
@ -1317,11 +1317,11 @@ RED.projects = (function() {
|
|||||||
row = $('<div class="form-row projects-encryption-disabled-row"></div>').hide().appendTo(credentialsRightBox);
|
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);
|
$('<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();
|
var val = $(this).val();
|
||||||
emptyProjectCredentialInput.attr("disabled",val === 'default');
|
emptyProjectCredentialInput.attr("disabled",val === 'default');
|
||||||
if (val === "custom") {
|
if (val === "custom") {
|
||||||
emptyProjectCredentialInput.focus();
|
emptyProjectCredentialInput.trigger("focus");
|
||||||
}
|
}
|
||||||
validateForm();
|
validateForm();
|
||||||
})
|
})
|
||||||
@ -1348,7 +1348,7 @@ RED.projects = (function() {
|
|||||||
if (projectName === "" || projectName === autoInsertedName) {
|
if (projectName === "" || projectName === autoInsertedName) {
|
||||||
autoInsertedName = m[1];
|
autoInsertedName = m[1];
|
||||||
projectNameInput.val(autoInsertedName);
|
projectNameInput.val(autoInsertedName);
|
||||||
projectNameInput.change();
|
projectNameInput.trigger("change");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
validateForm();
|
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);
|
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);
|
$('<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);
|
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();
|
e.preventDefault();
|
||||||
$('#projects-dialog-cancel').click();
|
$('#projects-dialog-cancel').trigger("click");
|
||||||
RED.userSettings.show('gitconfig');
|
RED.userSettings.show('gitconfig');
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$("#user-settings-gitconfig-add-key").click();
|
$("#user-settings-gitconfig-add-key").trigger("click");
|
||||||
},500);
|
},500);
|
||||||
});
|
});
|
||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
@ -1419,16 +1419,16 @@ RED.projects = (function() {
|
|||||||
|
|
||||||
|
|
||||||
switch(options.screen||"empty") {
|
switch(options.screen||"empty") {
|
||||||
case "empty": createAsEmpty.click(); break;
|
case "empty": createAsEmpty.trigger("click"); break;
|
||||||
case "open": openProject.click(); break;
|
case "open": openProject.trigger("click"); break;
|
||||||
case "clone": createAsClone.click(); break;
|
case "clone": createAsClone.trigger("click"); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if ((options.screen||"empty") !== "open") {
|
if ((options.screen||"empty") !== "open") {
|
||||||
projectNameInput.focus();
|
projectNameInput.trigger("focus");
|
||||||
} else {
|
} else {
|
||||||
$("#projects-dialog-project-list-search").focus();
|
$("#projects-dialog-project-list-search").trigger("focus");
|
||||||
}
|
}
|
||||||
},50);
|
},50);
|
||||||
return container;
|
return container;
|
||||||
@ -1636,18 +1636,18 @@ RED.projects = (function() {
|
|||||||
transition: "left 0.4s",
|
transition: "left 0.4s",
|
||||||
whitespace: "nowrap",
|
whitespace: "nowrap",
|
||||||
width:"1000px"
|
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);
|
$('<span>').css({"lineHeight":"40px"}).text(RED._("projects.delete.confirm")).appendTo(cover);
|
||||||
$('<button style="margin-left:20px" class="editor-button">'+RED._("common.label.cancel")+'</button>')
|
$('<button style="margin-left:20px" class="editor-button">'+RED._("common.label.cancel")+'</button>')
|
||||||
.appendTo(cover)
|
.appendTo(cover)
|
||||||
.click(function(e) {
|
.on("click", function(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
cover.remove();
|
cover.remove();
|
||||||
done(true);
|
done(true);
|
||||||
});
|
});
|
||||||
$('<button style="margin-left:20px" class="editor-button primary">'+RED._("common.label.delete")+'</button>')
|
$('<button style="margin-left:20px" class="editor-button primary">'+RED._("common.label.delete")+'</button>')
|
||||||
.appendTo(cover)
|
.appendTo(cover)
|
||||||
.click(function(e) {
|
.on("click", function(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
cover.remove();
|
cover.remove();
|
||||||
sendRequest({
|
sendRequest({
|
||||||
@ -1820,7 +1820,7 @@ RED.projects = (function() {
|
|||||||
var tools = $('<div class="projects-dialog-project-list-entry-tools"></div>').appendTo(header);
|
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>')
|
$('<button class="editor-button editor-button-small" style="float: right;"><i class="fa fa-trash"></i></button>')
|
||||||
.appendTo(tools)
|
.appendTo(tools)
|
||||||
.click(function(e) {
|
.on("click", function(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
deleteProject(row,entry.name, function(cancelled) {
|
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');
|
$('.projects-dialog-project-list-entry').removeClass('selected');
|
||||||
header.addClass('selected');
|
header.addClass('selected');
|
||||||
selectedListItem = row.parent();
|
selectedListItem = row.parent();
|
||||||
@ -1844,10 +1844,10 @@ RED.projects = (function() {
|
|||||||
options.select(entry);
|
options.select(entry);
|
||||||
}
|
}
|
||||||
ensureSelectedIsVisible();
|
ensureSelectedIsVisible();
|
||||||
searchInput.focus();
|
searchInput.trigger("focus");
|
||||||
})
|
})
|
||||||
if (options.dblclick) {
|
if (options.dblclick) {
|
||||||
row.dblclick(function(evt) {
|
row.on("dblclick", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
options.dblclick(entry);
|
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);
|
$('<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();
|
evt.preventDefault();
|
||||||
if ($(this).hasClass('input-error')) {
|
if ($(this).hasClass('input-error')) {
|
||||||
return;
|
return;
|
||||||
@ -2207,7 +2207,7 @@ RED.projects = (function() {
|
|||||||
},
|
},
|
||||||
// addItem: function(data) { branchList.editableList('addItem',data) },
|
// addItem: function(data) { branchList.editableList('addItem',data) },
|
||||||
filter: function() { branchList.editableList('filter') },
|
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');
|
RED.projects.settings.show('settings');
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$("#project-settings-tab-settings-file-edit").click();
|
$("#project-settings-tab-settings-file-edit").trigger("click");
|
||||||
},200)
|
},200)
|
||||||
},
|
},
|
||||||
showProjectDependencies: function() {
|
showProjectDependencies: function() {
|
||||||
|
@ -130,7 +130,7 @@ RED.sidebar.versionControl = (function() {
|
|||||||
|
|
||||||
$('<button class="editor-button editor-button-small"></button>').text(entry.button.label)
|
$('<button class="editor-button editor-button-small"></button>').text(entry.button.label)
|
||||||
.appendTo(toolbar)
|
.appendTo(toolbar)
|
||||||
.click(entry.button.click);
|
.on("click", entry.button.click);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -139,7 +139,7 @@ RED.sidebar.versionControl = (function() {
|
|||||||
var icon = $('<i class=""></i>').appendTo(container);
|
var icon = $('<i class=""></i>').appendTo(container);
|
||||||
var entryLink = $('<a href="#">')
|
var entryLink = $('<a href="#">')
|
||||||
.appendTo(container)
|
.appendTo(container)
|
||||||
.click(function(e) {
|
.on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
viewFileDiff(entry,state);
|
viewFileDiff(entry,state);
|
||||||
});
|
});
|
||||||
@ -152,7 +152,7 @@ RED.sidebar.versionControl = (function() {
|
|||||||
bg = $('<span class="button-group" style="margin-right: 5px;"></span>').appendTo(entryTools);
|
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>')
|
revertButton = $('<button class="editor-button editor-button-small"><i class="fa fa-reply"></i></button>')
|
||||||
.appendTo(bg)
|
.appendTo(bg)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
|
|
||||||
var spinner = utils.addSpinnerOverlay(container).addClass('projects-dialog-spinner-contain');
|
var spinner = utils.addSpinnerOverlay(container).addClass('projects-dialog-spinner-contain');
|
||||||
@ -207,7 +207,7 @@ RED.sidebar.versionControl = (function() {
|
|||||||
if (state !== 'unmerged') {
|
if (state !== 'unmerged') {
|
||||||
var stageButton = $('<button class="editor-button editor-button-small"><i class="fa fa-'+((state==='unstaged')?"plus":"minus")+'"></i></button>')
|
var stageButton = $('<button class="editor-button editor-button-small"><i class="fa fa-'+((state==='unstaged')?"plus":"minus")+'"></i></button>')
|
||||||
.appendTo(bg)
|
.appendTo(bg)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
var activeProject = RED.projects.getActiveProject();
|
var activeProject = RED.projects.getActiveProject();
|
||||||
entry.spinner = utils.addSpinnerOverlay(row).addClass('projects-version-control-spinner-sidebar');
|
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 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>')
|
var refreshButton = $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
|
||||||
.appendTo(bg)
|
.appendTo(bg)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
refresh(true);
|
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);
|
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>')
|
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)
|
.appendTo(header)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
var toStage = Object.keys(allChanges).filter(function(fn) {
|
var toStage = Object.keys(allChanges).filter(function(fn) {
|
||||||
@ -371,7 +371,7 @@ RED.sidebar.versionControl = (function() {
|
|||||||
bg = $('<div style="float: right"></div>').appendTo(header);
|
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>')
|
var abortMergeButton = $('<button class="editor-button editor-button-small" style="margin-right: 5px;">'+RED._("sidebar.project.versionControl.abortMerge")+'</button>')
|
||||||
.appendTo(bg)
|
.appendTo(bg)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
var spinner = utils.addSpinnerOverlay(unmergedContent);
|
var spinner = utils.addSpinnerOverlay(unmergedContent);
|
||||||
@ -452,11 +452,11 @@ RED.sidebar.versionControl = (function() {
|
|||||||
unstageAllButton.prop("disabled",true);
|
unstageAllButton.prop("disabled",true);
|
||||||
commitButton.prop("disabled",true);
|
commitButton.prop("disabled",true);
|
||||||
abortMergeButton.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>')
|
commitButton = $('<button class="editor-button editor-button-small" style="margin-right: 5px;">'+RED._("sidebar.project.versionControl.commit")+'</button>')
|
||||||
.appendTo(bg)
|
.appendTo(bg)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
showCommitBox();
|
showCommitBox();
|
||||||
@ -464,7 +464,7 @@ RED.sidebar.versionControl = (function() {
|
|||||||
RED.popover.tooltip(commitButton,RED._("sidebar.project.versionControl.commitChanges"));
|
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>')
|
unstageAllButton = $('<button class="editor-button editor-button-small"><i class="fa fa-minus"></i> '+RED._("sidebar.project.versionControl.all")+'</button>')
|
||||||
.appendTo(bg)
|
.appendTo(bg)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
var toUnstage = Object.keys(allChanges).filter(function(fn) {
|
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>')
|
var cancelCommitButton = $('<button class="editor-button">'+RED._("sidebar.project.versionControl.cancelCapital")+'</button>')
|
||||||
.appendTo(commitToolbar)
|
.appendTo(commitToolbar)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
commitMessage.val("");
|
commitMessage.val("");
|
||||||
unstagedContent.css("height","");
|
unstagedContent.css("height","");
|
||||||
@ -517,7 +517,7 @@ RED.sidebar.versionControl = (function() {
|
|||||||
})
|
})
|
||||||
var submitCommitButton = $('<button class="editor-button">'+RED._("sidebar.project.versionControl.commitCapital")+'</button>')
|
var submitCommitButton = $('<button class="editor-button">'+RED._("sidebar.project.versionControl.commitCapital")+'</button>')
|
||||||
.appendTo(commitToolbar)
|
.appendTo(commitToolbar)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
var spinner = utils.addSpinnerOverlay(submitCommitButton).addClass('projects-dialog-spinner-sidebar');
|
var spinner = utils.addSpinnerOverlay(submitCommitButton).addClass('projects-dialog-spinner-sidebar');
|
||||||
var activeProject = RED.projects.getActiveProject();
|
var activeProject = RED.projects.getActiveProject();
|
||||||
@ -531,7 +531,7 @@ RED.sidebar.versionControl = (function() {
|
|||||||
},
|
},
|
||||||
200: function(data) {
|
200: function(data) {
|
||||||
spinner.remove();
|
spinner.remove();
|
||||||
cancelCommitButton.click();
|
cancelCommitButton.trigger("click");
|
||||||
refresh(true);
|
refresh(true);
|
||||||
},
|
},
|
||||||
400: {
|
400: {
|
||||||
@ -558,7 +558,7 @@ RED.sidebar.versionControl = (function() {
|
|||||||
bg = $('<div style="float: right"></div>').appendTo(localHistory.header);
|
bg = $('<div style="float: right"></div>').appendTo(localHistory.header);
|
||||||
refreshButton = $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
|
refreshButton = $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
|
||||||
.appendTo(bg)
|
.appendTo(bg)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
refresh(true,true);
|
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>')
|
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)
|
.appendTo(localBranchToolbar)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
if ($(this).hasClass('selected')) {
|
if ($(this).hasClass('selected')) {
|
||||||
closeBranchBox();
|
closeBranchBox();
|
||||||
@ -582,7 +582,7 @@ RED.sidebar.versionControl = (function() {
|
|||||||
localBranchBox.show();
|
localBranchBox.show();
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
localBranchBox.css("height","215px");
|
localBranchBox.css("height","215px");
|
||||||
localBranchList.focus();
|
localBranchList.trigger("focus");
|
||||||
},100);
|
},100);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -597,7 +597,7 @@ RED.sidebar.versionControl = (function() {
|
|||||||
'</span>'+
|
'</span>'+
|
||||||
'</button>')
|
'</button>')
|
||||||
.appendTo(localBranchToolbar)
|
.appendTo(localBranchToolbar)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
if ($(this).hasClass('selected')) {
|
if ($(this).hasClass('selected')) {
|
||||||
closeRemoteBox();
|
closeRemoteBox();
|
||||||
@ -627,12 +627,12 @@ RED.sidebar.versionControl = (function() {
|
|||||||
if (entry.url) {
|
if (entry.url) {
|
||||||
row.addClass('sidebar-version-control-commit-more');
|
row.addClass('sidebar-version-control-commit-more');
|
||||||
row.text("+ "+(entry.total-entry.totalKnown)+RED._("sidebar.project.versionControl.moreCommits"));
|
row.text("+ "+(entry.total-entry.totalKnown)+RED._("sidebar.project.versionControl.moreCommits"));
|
||||||
row.click(function(e) {
|
row.on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
getCommits(entry.url,localCommitList,row,entry.limit,entry.before);
|
getCommits(entry.url,localCommitList,row,entry.limit,entry.before);
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
row.click(function(e) {
|
row.on("click", function(e) {
|
||||||
var activeProject = RED.projects.getActiveProject();
|
var activeProject = RED.projects.getActiveProject();
|
||||||
if (activeProject) {
|
if (activeProject) {
|
||||||
$.getJSON("projects/"+activeProject.name+"/commits/"+entry.sha,function(result) {
|
$.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 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>')
|
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)
|
.appendTo(remoteBranchRow)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
if ($(this).hasClass('selected')) {
|
if ($(this).hasClass('selected')) {
|
||||||
closeRemoteBranchBox();
|
closeRemoteBranchBox();
|
||||||
@ -775,7 +775,7 @@ RED.sidebar.versionControl = (function() {
|
|||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
remoteBranchSubRow.height(180);
|
remoteBranchSubRow.height(180);
|
||||||
remoteBox.css("height","445px");
|
remoteBox.css("height","445px");
|
||||||
remoteBranchList.focus();
|
remoteBranchList.trigger("focus");
|
||||||
},100);
|
},100);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -788,7 +788,7 @@ RED.sidebar.versionControl = (function() {
|
|||||||
var buttonRow = $('<div style="margin: 10px 30px; text-align: center"></div>').appendTo(errorMessage);
|
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>')
|
$('<button class="editor-button" style="width: 80%;"><i class="fa fa-refresh"></i> '+RED._("sidebar.project.versionControl.retry")+'</button>')
|
||||||
.appendTo(buttonRow)
|
.appendTo(buttonRow)
|
||||||
.click(function(e) {
|
.on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var activeProject = RED.projects.getActiveProject();
|
var activeProject = RED.projects.getActiveProject();
|
||||||
var spinner = utils.addSpinnerOverlay(remoteBox).addClass("projects-dialog-spinner-contain");
|
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>')
|
$('<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)
|
.appendTo(row)
|
||||||
.click(function(e) {
|
.on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var spinner = utils.addSpinnerOverlay(remoteBox).addClass("projects-dialog-spinner-contain");
|
var spinner = utils.addSpinnerOverlay(remoteBox).addClass("projects-dialog-spinner-contain");
|
||||||
var buttonRow = $('<div style="position: relative; bottom: 60px;"></div>').appendTo(spinner);
|
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();
|
evt.preventDefault();
|
||||||
RED.actions.invoke("core:show-event-log");
|
RED.actions.invoke("core:show-event-log");
|
||||||
});
|
});
|
||||||
@ -931,7 +931,7 @@ RED.sidebar.versionControl = (function() {
|
|||||||
options = options || {};
|
options = options || {};
|
||||||
var spinner = utils.addSpinnerOverlay(remoteBox).addClass("projects-dialog-spinner-contain");
|
var spinner = utils.addSpinnerOverlay(remoteBox).addClass("projects-dialog-spinner-contain");
|
||||||
var buttonRow = $('<div style="position: relative; bottom: 60px;"></div>').appendTo(spinner);
|
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();
|
evt.preventDefault();
|
||||||
RED.actions.invoke("core:show-event-log");
|
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>')
|
$('<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)
|
.appendTo(row)
|
||||||
.click(function(e) {
|
.on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
pullRemote({
|
pullRemote({
|
||||||
setUpstream: $("#sidebar-version-control-repo-toolbar-set-upstream").prop('checked')
|
setUpstream: $("#sidebar-version-control-repo-toolbar-set-upstream").prop('checked')
|
||||||
|
@ -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-type"}).text(node.type).appendTo(contentDiv);
|
||||||
$('<div>',{class:"red-ui-search-result-node-id"}).text(node.id).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();
|
evt.preventDefault();
|
||||||
reveal(node);
|
reveal(node);
|
||||||
});
|
});
|
||||||
@ -268,7 +268,7 @@ RED.search = (function() {
|
|||||||
RED.events.emit("search:open");
|
RED.events.emit("search:open");
|
||||||
visible = true;
|
visible = true;
|
||||||
}
|
}
|
||||||
searchInput.focus();
|
searchInput.trigger("focus");
|
||||||
}
|
}
|
||||||
|
|
||||||
function hide() {
|
function hide() {
|
||||||
|
@ -186,7 +186,7 @@ RED.sidebar = (function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var sidebarControls = $('<div class="sidebar-control-right"><i class="fa fa-chevron-right"</div>').appendTo($("#sidebar-separator"));
|
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();
|
sidebarControls.hide();
|
||||||
RED.menu.toggleSelected("menu-item-sidebar");
|
RED.menu.toggleSelected("menu-item-sidebar");
|
||||||
})
|
})
|
||||||
|
@ -326,7 +326,7 @@ RED.subflow = (function() {
|
|||||||
toolbar.i18n();
|
toolbar.i18n();
|
||||||
|
|
||||||
|
|
||||||
$("#workspace-subflow-output-remove").click(function(event) {
|
$("#workspace-subflow-output-remove").on("click", function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var wasDirty = RED.nodes.dirty();
|
var wasDirty = RED.nodes.dirty();
|
||||||
var wasChanged = activeSubflow.changed;
|
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();
|
event.preventDefault();
|
||||||
addSubflowOutput();
|
addSubflowOutput();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#workspace-subflow-input-add").click(function(event) {
|
$("#workspace-subflow-input-add").on("click", function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
addSubflowInput();
|
addSubflowInput();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#workspace-subflow-input-remove").click(function(event) {
|
$("#workspace-subflow-input-remove").on("click", function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var wasDirty = RED.nodes.dirty();
|
var wasDirty = RED.nodes.dirty();
|
||||||
var wasChanged = activeSubflow.changed;
|
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) {
|
if (this.checked) {
|
||||||
addSubflowStatus();
|
addSubflowStatus();
|
||||||
} else {
|
} 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()));
|
RED.editor.editSubflow(RED.nodes.subflow(RED.workspaces.active()));
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#workspace-subflow-delete").click(function(event) {
|
$("#workspace-subflow-delete").on("click", function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var startDirty = RED.nodes.dirty();
|
var startDirty = RED.nodes.dirty();
|
||||||
var historyEvent = removeSubflow(RED.workspaces.active());
|
var historyEvent = removeSubflow(RED.workspaces.active());
|
||||||
|
@ -147,7 +147,7 @@ RED.sidebar.config = (function() {
|
|||||||
if (node.users.length === 0) {
|
if (node.users.length === 0) {
|
||||||
iconContainer.text(0);
|
iconContainer.text(0);
|
||||||
} else {
|
} else {
|
||||||
$('<a href="#"/>').click(function(e) {
|
$('<a href="#"/>').on("click", function(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
RED.search.show(node.id);
|
RED.search.show(node.id);
|
||||||
@ -342,14 +342,14 @@ RED.sidebar.config = (function() {
|
|||||||
function show(id) {
|
function show(id) {
|
||||||
if (typeof id === 'boolean') {
|
if (typeof id === 'boolean') {
|
||||||
if (id) {
|
if (id) {
|
||||||
$('#workspace-config-node-filter-unused').click();
|
$('#workspace-config-node-filter-unused').trigger("click");
|
||||||
} else {
|
} else {
|
||||||
$('#workspace-config-node-filter-all').click();
|
$('#workspace-config-node-filter-all').trigger("click");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
refreshConfigNodeList();
|
refreshConfigNodeList();
|
||||||
if (typeof id === "string") {
|
if (typeof id === "string") {
|
||||||
$('#workspace-config-node-filter-all').click();
|
$('#workspace-config-node-filter-all').trigger("click");
|
||||||
id = id.replace(/\./g,"-");
|
id = id.replace(/\./g,"-");
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
var node = $(".palette_node_id_"+id);
|
var node = $(".palette_node_id_"+id);
|
||||||
|
@ -62,7 +62,7 @@ RED.sidebar.context = (function() {
|
|||||||
var bg = $('<div style="float: right"></div>').appendTo(nodeSection.header);
|
var bg = $('<div style="float: right"></div>').appendTo(nodeSection.header);
|
||||||
$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
|
$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
|
||||||
.appendTo(bg)
|
.appendTo(bg)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
updateNode(currentNode, true);
|
updateNode(currentNode, true);
|
||||||
@ -77,7 +77,7 @@ RED.sidebar.context = (function() {
|
|||||||
// bg = $('<div style="float: right"></div>').appendTo(subflowSection.header);
|
// bg = $('<div style="float: right"></div>').appendTo(subflowSection.header);
|
||||||
// $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
|
// $('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
|
||||||
// .appendTo(bg)
|
// .appendTo(bg)
|
||||||
// .click(function(evt) {
|
// .on("click", function(evt) {
|
||||||
// evt.stopPropagation();
|
// evt.stopPropagation();
|
||||||
// evt.preventDefault();
|
// evt.preventDefault();
|
||||||
// })
|
// })
|
||||||
@ -96,7 +96,7 @@ RED.sidebar.context = (function() {
|
|||||||
bg = $('<div style="float: right"></div>').appendTo(flowSection.header);
|
bg = $('<div style="float: right"></div>').appendTo(flowSection.header);
|
||||||
$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
|
$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
|
||||||
.appendTo(bg)
|
.appendTo(bg)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
updateFlow(currentFlow);
|
updateFlow(currentFlow);
|
||||||
@ -115,7 +115,7 @@ RED.sidebar.context = (function() {
|
|||||||
bg = $('<div style="float: right"></div>').appendTo(globalSection.header);
|
bg = $('<div style="float: right"></div>').appendTo(globalSection.header);
|
||||||
$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
|
$('<button class="editor-button editor-button-small"><i class="fa fa-refresh"></i></button>')
|
||||||
.appendTo(bg)
|
.appendTo(bg)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
updateEntry(globalSection,"context/global","global");
|
updateEntry(globalSection,"context/global","global");
|
||||||
@ -137,7 +137,7 @@ RED.sidebar.context = (function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// var toggleLiveButton = $("#sidebar-context-toggle-live");
|
// var toggleLiveButton = $("#sidebar-context-toggle-live");
|
||||||
// toggleLiveButton.click(function(evt) {
|
// toggleLiveButton.on("click", function(evt) {
|
||||||
// evt.preventDefault();
|
// evt.preventDefault();
|
||||||
// if ($(this).hasClass("selected")) {
|
// if ($(this).hasClass("selected")) {
|
||||||
// $(this).removeClass("selected");
|
// $(this).removeClass("selected");
|
||||||
@ -239,7 +239,7 @@ RED.sidebar.context = (function() {
|
|||||||
obj.text(k);
|
obj.text(k);
|
||||||
var tools = $('<span class="button-group"></span>');
|
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.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
$.getJSON(baseUrl+"/"+k+"?store="+v.store, function(data) {
|
$.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.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
var popover = RED.popover.create({
|
var popover = RED.popover.create({
|
||||||
@ -268,12 +268,12 @@ RED.sidebar.context = (function() {
|
|||||||
$('<p data-i18n="sidebar.context.deleteConfirm"></p>').appendTo(content);
|
$('<p data-i18n="sidebar.context.deleteConfirm"></p>').appendTo(content);
|
||||||
var row = $('<p>').appendTo(content);
|
var row = $('<p>').appendTo(content);
|
||||||
var bg = $('<span class="button-group"></span>').appendTo(row);
|
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();
|
e.preventDefault();
|
||||||
popover.close();
|
popover.close();
|
||||||
});
|
});
|
||||||
bg = $('<span class="button-group"></span>').appendTo(row);
|
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();
|
e.preventDefault();
|
||||||
popover.close();
|
popover.close();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
@ -75,13 +75,13 @@ RED.sidebar.info = (function() {
|
|||||||
var tipButtons = $('<div class="node-info-tips-buttons"></div>').appendTo(tipContainer);
|
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);
|
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();
|
e.preventDefault();
|
||||||
tips.next();
|
tips.next();
|
||||||
})
|
})
|
||||||
|
|
||||||
var tipClose = $('<a href="#" class="workspace-footer-button"><i class="fa fa-times"></a>').appendTo(tipButtons);
|
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();
|
e.preventDefault();
|
||||||
RED.actions.invoke("core:toggle-show-tips");
|
RED.actions.invoke("core:toggle-show-tips");
|
||||||
RED.notify(RED._("sidebar.info.showTips"));
|
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);
|
$('<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>')
|
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])
|
.appendTo(propRow.children()[1])
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
RED.projects.editProject();
|
RED.projects.editProject();
|
||||||
});
|
});
|
||||||
@ -333,7 +333,7 @@ RED.sidebar.info = (function() {
|
|||||||
setInfoText(infoText, infoSection.content);
|
setInfoText(infoText, infoSection.content);
|
||||||
|
|
||||||
$(".sidebar-node-info-stack").scrollTop(0);
|
$(".sidebar-node-info-stack").scrollTop(0);
|
||||||
$(".node-info-property-header").click(function(e) {
|
$(".node-info-property-header").on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
expandedSections["property"] = !expandedSections["property"];
|
expandedSections["property"] = !expandedSections["property"];
|
||||||
$(this).toggleClass("expanded",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>" );
|
info.find(".bidiAware").contents().filter(function() { return this.nodeType === 3 && this.textContent.trim() !== "" }).wrap( "<span></span>" );
|
||||||
var foldingHeader = "H3";
|
var foldingHeader = "H3";
|
||||||
info.find(foldingHeader).wrapInner('<a class="node-info-header expanded" href="#"></a>')
|
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();
|
e.preventDefault();
|
||||||
var isExpanded = $(this).hasClass('expanded');
|
var isExpanded = $(this).hasClass('expanded');
|
||||||
var el = $(this).parent().next();
|
var el = $(this).parent().next();
|
||||||
|
@ -55,7 +55,7 @@ RED.tray = (function() {
|
|||||||
b.text(button.text);
|
b.text(button.text);
|
||||||
}
|
}
|
||||||
if (button.click) {
|
if (button.click) {
|
||||||
b.click((function(action) {
|
b.on("click", (function(action) {
|
||||||
return function(evt) {
|
return function(evt) {
|
||||||
if (!$(this).hasClass('disabled')) {
|
if (!$(this).hasClass('disabled')) {
|
||||||
action(evt);
|
action(evt);
|
||||||
@ -163,7 +163,7 @@ RED.tray = (function() {
|
|||||||
// Delay resetting the flag, so we don't close prematurely
|
// Delay resetting the flag, so we don't close prematurely
|
||||||
openingTray = false;
|
openingTray = false;
|
||||||
},200);
|
},200);
|
||||||
body.find(":focusable:first").focus();
|
body.find(":focusable:first").trigger("focus");
|
||||||
|
|
||||||
},150);
|
},150);
|
||||||
el.css({right:0});
|
el.css({right:0});
|
||||||
@ -203,13 +203,13 @@ RED.tray = (function() {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
init: function init() {
|
init: function init() {
|
||||||
$(window).resize(handleWindowResize);
|
$(window).on("resize", handleWindowResize);
|
||||||
RED.events.on("sidebar:resize",handleWindowResize);
|
RED.events.on("sidebar:resize",handleWindowResize);
|
||||||
$("#editor-shade").click(function() {
|
$("#editor-shade").on("click", function() {
|
||||||
if (!openingTray) {
|
if (!openingTray) {
|
||||||
var tray = stack[stack.length-1];
|
var tray = stack[stack.length-1];
|
||||||
if (tray && tray.primaryButton) {
|
if (tray && tray.primaryButton) {
|
||||||
tray.primaryButton.click();
|
tray.primaryButton.trigger("click");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -90,7 +90,7 @@ RED.typeSearch = (function() {
|
|||||||
} else {
|
} else {
|
||||||
addCallback(n.type,true);
|
addCallback(n.type,true);
|
||||||
}
|
}
|
||||||
$("#red-ui-type-search-input").val("").keyup();
|
$("#red-ui-type-search-input").val("").trigger("keyup");
|
||||||
}
|
}
|
||||||
} else if (evt.keyCode === 13) {
|
} else if (evt.keyCode === 13) {
|
||||||
// Enter
|
// Enter
|
||||||
@ -162,7 +162,7 @@ RED.typeSearch = (function() {
|
|||||||
|
|
||||||
$('<div>',{class:"red-ui-search-result-node-label"}).text(label).appendTo(contentDiv);
|
$('<div>',{class:"red-ui-search-result-node-label"}).text(label).appendTo(contentDiv);
|
||||||
|
|
||||||
div.click(function(evt) {
|
div.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
confirm(object);
|
confirm(object);
|
||||||
});
|
});
|
||||||
@ -229,7 +229,7 @@ RED.typeSearch = (function() {
|
|||||||
searchResultsDiv.slideDown(300);
|
searchResultsDiv.slideDown(300);
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
searchResultsDiv.find(".red-ui-editableList-container").scrollTop(0);
|
searchResultsDiv.find(".red-ui-editableList-container").scrollTop(0);
|
||||||
searchInput.focus();
|
searchInput.trigger("focus");
|
||||||
},100);
|
},100);
|
||||||
}
|
}
|
||||||
function hide(fast) {
|
function hide(fast) {
|
||||||
|
@ -79,7 +79,7 @@ RED.utils = (function() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
el.click(function(e) {
|
el.on("click", function(e) {
|
||||||
var parent = $(this).parent();
|
var parent = $(this).parent();
|
||||||
var currentState = !parent.hasClass('collapsed');
|
var currentState = !parent.hasClass('collapsed');
|
||||||
if ($(this).prop('toggle')(!currentState)) {
|
if ($(this).prop('toggle')(!currentState)) {
|
||||||
@ -105,7 +105,7 @@ RED.utils = (function() {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
if (expand) {
|
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 tools = $('<span class="debug-message-tools"></span>').appendTo(obj);
|
||||||
var copyTools = $('<span class="debug-message-tools-copy button-group"></span>').appendTo(tools);
|
var copyTools = $('<span class="debug-message-tools-copy button-group"></span>').appendTo(tools);
|
||||||
if (!!key) {
|
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.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
RED.clipboard.copyText(key,copyPath,"clipboard.copyMessagePath");
|
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.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
RED.clipboard.copyText(msg,copyPayload,"clipboard.copyMessageValue");
|
RED.clipboard.copyText(msg,copyPayload,"clipboard.copyMessageValue");
|
||||||
@ -134,7 +134,7 @@ RED.utils = (function() {
|
|||||||
if (strippedKey !== undefined && strippedKey !== '') {
|
if (strippedKey !== undefined && strippedKey !== '') {
|
||||||
var isPinned = pinnedPaths[sourceId].hasOwnProperty(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.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (pinnedPaths[sourceId].hasOwnProperty(strippedKey)) {
|
if (pinnedPaths[sourceId].hasOwnProperty(strippedKey)) {
|
||||||
@ -349,7 +349,7 @@ RED.utils = (function() {
|
|||||||
|
|
||||||
if (Number.isInteger(obj) && (obj >= 0)) { // if it's a +ve integer
|
if (Number.isInteger(obj) && (obj >= 0)) { // if it's a +ve integer
|
||||||
e.addClass("debug-message-type-number-toggle");
|
e.addClass("debug-message-type-number-toggle");
|
||||||
e.click(function(evt) {
|
e.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
formatNumber($(this), obj, sourceId, path, true);
|
formatNumber($(this), obj, sourceId, path, true);
|
||||||
});
|
});
|
||||||
@ -424,7 +424,7 @@ RED.utils = (function() {
|
|||||||
}
|
}
|
||||||
$('<pre class="debug-message-type-string"></pre>').text(stringEncoding).appendTo(sr);
|
$('<pre class="debug-message-type-string"></pre>').text(stringEncoding).appendTo(sr);
|
||||||
var bufferOpts = $('<span class="debug-message-buffer-opts"></span>').appendTo(headerHead);
|
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.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
formatBuffer(element,$(this),sourceId,path,true);
|
formatBuffer(element,$(this),sourceId,path,true);
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
return {
|
return {
|
||||||
init: function() {
|
init: function() {
|
||||||
|
|
||||||
$(window).resize(resizeNavBorder);
|
$(window).on("resize", resizeNavBorder);
|
||||||
RED.events.on("sidebar:resize",resizeNavBorder);
|
RED.events.on("sidebar:resize",resizeNavBorder);
|
||||||
RED.actions.add("core:toggle-navigator",toggle);
|
RED.actions.add("core:toggle-navigator",toggle);
|
||||||
var hideTimeout;
|
var hideTimeout;
|
||||||
@ -154,7 +154,7 @@
|
|||||||
navVis = navBox.append("svg:g")
|
navVis = navBox.append("svg:g")
|
||||||
|
|
||||||
|
|
||||||
$("#btn-navigate").click(function(evt) {
|
$("#btn-navigate").on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
toggle();
|
toggle();
|
||||||
})
|
})
|
||||||
|
@ -363,11 +363,11 @@ RED.view = (function() {
|
|||||||
|
|
||||||
RED.view.navigator.init();
|
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');
|
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');
|
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');
|
RED.popover.tooltip($("#btn-zoom-in"),RED._('actions.zoom-in'),'core:zoom-in');
|
||||||
$("#chart").on("DOMMouseScroll mousewheel", function (evt) {
|
$("#chart").on("DOMMouseScroll mousewheel", function (evt) {
|
||||||
if ( evt.altKey ) {
|
if ( evt.altKey ) {
|
||||||
@ -449,10 +449,10 @@ RED.view = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#chart").focus(function() {
|
$("#chart").on("focus", function() {
|
||||||
$("#workspace-tabs").addClass("workspace-focussed");
|
$("#workspace-tabs").addClass("workspace-focussed");
|
||||||
});
|
});
|
||||||
$("#chart").blur(function() {
|
$("#chart").on("blur", function() {
|
||||||
$("#workspace-tabs").removeClass("workspace-focussed");
|
$("#workspace-tabs").removeClass("workspace-focussed");
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -3283,12 +3283,12 @@ RED.view = (function() {
|
|||||||
// setting the focus
|
// setting the focus
|
||||||
var scrollX = window.parent.window.scrollX;
|
var scrollX = window.parent.window.scrollX;
|
||||||
var scrollY = window.parent.window.scrollY;
|
var scrollY = window.parent.window.scrollY;
|
||||||
$("#chart").focus();
|
$("#chart").trigger("focus");
|
||||||
window.parent.window.scrollTo(scrollX,scrollY);
|
window.parent.window.scrollTo(scrollX,scrollY);
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
// In case we're iframed into a page of a different origin, just focus
|
// In case we're iframed into a page of a different origin, just focus
|
||||||
// the view following the inevitable DOMException
|
// the view following the inevitable DOMException
|
||||||
$("#chart").focus();
|
$("#chart").trigger("focus");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ RED.workspaces = (function() {
|
|||||||
value: ""
|
value: ""
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#node-info-input-info-expand').click(function(e) {
|
$('#node-info-input-info-expand').on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var value = tabflowEditor.getValue();
|
var value = tabflowEditor.getValue();
|
||||||
RED.editor.editMarkdown({
|
RED.editor.editMarkdown({
|
||||||
@ -219,7 +219,7 @@ RED.workspaces = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$('<input type="text" 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();});
|
||||||
$("#node-input-name").val(workspace.label);
|
$("#node-input-name").val(workspace.label);
|
||||||
RED.text.bidi.prepareInput($("#node-input-name"));
|
RED.text.bidi.prepareInput($("#node-input-name"));
|
||||||
tabflowEditor.getSession().setValue(workspace.info || "", -1);
|
tabflowEditor.getSession().setValue(workspace.info || "", -1);
|
||||||
@ -337,7 +337,7 @@ RED.workspaces = (function() {
|
|||||||
deleteWorkspace(RED.nodes.workspace(activeWorkspace));
|
deleteWorkspace(RED.nodes.workspace(activeWorkspace));
|
||||||
});
|
});
|
||||||
|
|
||||||
$(window).resize(function() {
|
$(window).on("resize", function() {
|
||||||
workspace_tabs.resize();
|
workspace_tabs.resize();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ RED.user = (function() {
|
|||||||
var r = row;
|
var r = row;
|
||||||
return function(event) {
|
return function(event) {
|
||||||
if (event.keyCode == 13) {
|
if (event.keyCode == 13) {
|
||||||
r.next("div").find("input").focus();
|
r.next("div").find("input").trigger("focus");
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -74,7 +74,7 @@ RED.user = (function() {
|
|||||||
|
|
||||||
|
|
||||||
$("#node-dialog-login-submit").button();
|
$("#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-submit").button("option","disabled",true);
|
||||||
$("#node-dialog-login-failed").hide();
|
$("#node-dialog-login-failed").hide();
|
||||||
$(".login-spinner").show();
|
$(".login-spinner").show();
|
||||||
@ -115,7 +115,7 @@ RED.user = (function() {
|
|||||||
var field = data.prompts[i];
|
var field = data.prompts[i];
|
||||||
var row = $("<div/>",{class:"form-row",style:"text-align: center"}).appendTo("#node-dialog-login-fields");
|
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;
|
document.location = field.url;
|
||||||
});
|
});
|
||||||
if (field.image) {
|
if (field.image) {
|
||||||
@ -138,7 +138,7 @@ RED.user = (function() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
if (opts.cancelable) {
|
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();
|
$("#node-dialog-login").dialog('destroy').remove();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 6.2 KiB |
7
packages/node_modules/@node-red/editor-client/src/vendor/jquery/css/base/jquery-ui.min.css
vendored
Normal file
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 212 B |
Before Width: | Height: | Size: 208 B |
Before Width: | Height: | Size: 335 B |
Before Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 280 B |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 4.4 KiB |
2
packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-3.3.1.min.js
vendored
Normal file
626
packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-migrate-3.0.1.js
vendored
Normal 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;
|
||||||
|
} );
|
215
packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-migrate-3.0.1.min.js
vendored
Normal 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;
|
||||||
|
});
|
13
packages/node_modules/@node-red/editor-client/src/vendor/jquery/js/jquery-ui.min.js
vendored
Normal file
@ -25,7 +25,7 @@
|
|||||||
<link rel="icon" type="image/png" href="{{ page.favicon }}">
|
<link rel="icon" type="image/png" href="{{ page.favicon }}">
|
||||||
<link rel="mask-icon" href="{{ page.tabicon }}" color="#8f0000">
|
<link rel="mask-icon" href="{{ page.tabicon }}" color="#8f0000">
|
||||||
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
|
<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/font-awesome/css/font-awesome.min.css">
|
||||||
<link rel="stylesheet" href="vendor/vendor.css">
|
<link rel="stylesheet" href="vendor/vendor.css">
|
||||||
<link rel="stylesheet" href="red/style.min.css">
|
<link rel="stylesheet" href="red/style.min.css">
|
||||||
|
@ -247,7 +247,7 @@
|
|||||||
types:['flow','global','str','num','bool','json','bin','date','env']
|
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('');
|
$("#node-input-crontab").val('');
|
||||||
var id = $("#inject-time-type-select").val();
|
var id = $("#inject-time-type-select").val();
|
||||||
$(".inject-time-row").hide();
|
$(".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'));
|
$("#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");
|
$("<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 start = Number($("#inject-time-interval-time-start").val());
|
||||||
var end = Number($("#inject-time-interval-time-end").val());
|
var end = Number($("#inject-time-interval-time-end").val());
|
||||||
$("#inject-time-interval-time-end option").remove();
|
$("#inject-time-interval-time-end option").remove();
|
||||||
@ -380,8 +380,8 @@
|
|||||||
|
|
||||||
$("#node-input-payload").typedInput('type',this.payloadType);
|
$("#node-input-payload").typedInput('type',this.payloadType);
|
||||||
|
|
||||||
$("#inject-time-type-select").change();
|
$("#inject-time-type-select").trigger("change");
|
||||||
$("#inject-time-interval-time-start").change();
|
$("#inject-time-interval-time-start").trigger("change");
|
||||||
|
|
||||||
},
|
},
|
||||||
oneditsave: function() {
|
oneditsave: function() {
|
||||||
|
@ -92,7 +92,7 @@
|
|||||||
this.resize = function() {
|
this.resize = function() {
|
||||||
var rows = $("#dialog-form>div:not(.node-input-target-row)");
|
var rows = $("#dialog-form>div:not(.node-input-target-row)");
|
||||||
var height = $("#dialog-form").height();
|
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);
|
height -= $(rows[i]).outerHeight(true);
|
||||||
}
|
}
|
||||||
var editorRow = $("#dialog-form>div.node-input-target-row");
|
var editorRow = $("#dialog-form>div.node-input-target-row");
|
||||||
@ -156,7 +156,7 @@
|
|||||||
container.appendTo(nodeList);
|
container.appendTo(nodeList);
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".node-input-target-node-checkbox").change(function() {
|
$(".node-input-target-node-checkbox").on("change", function() {
|
||||||
if (!this.checked) {
|
if (!this.checked) {
|
||||||
$("#node-input-target-node-checkbox-all").prop('checked',false);
|
$("#node-input-target-node-checkbox-all").prop('checked',false);
|
||||||
}
|
}
|
||||||
@ -201,22 +201,22 @@
|
|||||||
nodeList.append(li);
|
nodeList.append(li);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$("#node-input-target-sort-label").click(function(e) {
|
$("#node-input-target-sort-label").on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
sortNodeList('label');
|
sortNodeList('label');
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#node-input-target-sort-type").click(function(e) {
|
$("#node-input-target-sort-type").on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
sortNodeList('sublabel');
|
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-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();
|
var scope = $(this).val();
|
||||||
if (scope === "target") {
|
if (scope === "target") {
|
||||||
createNodeList();
|
createNodeList();
|
||||||
@ -233,7 +233,7 @@
|
|||||||
} else {
|
} else {
|
||||||
$("#node-input-scope-select").val("target");
|
$("#node-input-scope-select").val("target");
|
||||||
}
|
}
|
||||||
$("#node-input-scope-select").change();
|
$("#node-input-scope-select").trigger("change");
|
||||||
},
|
},
|
||||||
oneditsave: function() {
|
oneditsave: function() {
|
||||||
var scope = $("#node-input-scope-select").val();
|
var scope = $("#node-input-scope-select").val();
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
this.resize = function() {
|
this.resize = function() {
|
||||||
var rows = $("#dialog-form>div:not(.node-input-target-row)");
|
var rows = $("#dialog-form>div:not(.node-input-target-row)");
|
||||||
var height = $("#dialog-form").height();
|
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);
|
height -= $(rows[i]).outerHeight(true);
|
||||||
}
|
}
|
||||||
var editorRow = $("#dialog-form>div.node-input-target-row");
|
var editorRow = $("#dialog-form>div.node-input-target-row");
|
||||||
@ -145,7 +145,7 @@
|
|||||||
container.appendTo(nodeList);
|
container.appendTo(nodeList);
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".node-input-target-node-checkbox").change(function() {
|
$(".node-input-target-node-checkbox").on("change", function() {
|
||||||
if (!this.checked) {
|
if (!this.checked) {
|
||||||
$("#node-input-target-node-checkbox-all").prop('checked',false);
|
$("#node-input-target-node-checkbox-all").prop('checked',false);
|
||||||
}
|
}
|
||||||
@ -190,20 +190,20 @@
|
|||||||
nodeList.append(li);
|
nodeList.append(li);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$("#node-input-target-sort-label").click(function(e) {
|
$("#node-input-target-sort-label").on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
sortNodeList('label');
|
sortNodeList('label');
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#node-input-target-sort-type").click(function(e) {
|
$("#node-input-target-sort-type").on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
sortNodeList('sublabel');
|
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-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();
|
var scope = $(this).val();
|
||||||
if (scope === "target") {
|
if (scope === "target") {
|
||||||
createNodeList();
|
createNodeList();
|
||||||
@ -218,7 +218,7 @@
|
|||||||
} else {
|
} else {
|
||||||
$("#node-input-scope-select").val("target");
|
$("#node-input-scope-select").val("target");
|
||||||
}
|
}
|
||||||
$("#node-input-scope-select").change();
|
$("#node-input-scope-select").trigger("change");
|
||||||
},
|
},
|
||||||
oneditsave: function() {
|
oneditsave: function() {
|
||||||
var scope = $("#node-input-scope-select").val();
|
var scope = $("#node-input-scope-select").val();
|
||||||
|
@ -206,7 +206,7 @@
|
|||||||
};
|
};
|
||||||
RED.events.on("project:change", this.clearMessageList);
|
RED.events.on("project:change", this.clearMessageList);
|
||||||
|
|
||||||
$("#debug-tab-open").click(function(e) {
|
$("#debug-tab-open").on("click", function(e) {
|
||||||
e.preventDefault();
|
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 = 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() {
|
subWindow.onload = function() {
|
||||||
@ -217,7 +217,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(window).unload(function() {
|
$(window).on('beforeunload',function() {
|
||||||
if (subWindow) {
|
if (subWindow) {
|
||||||
try {
|
try {
|
||||||
subWindow.close();
|
subWindow.close();
|
||||||
|
@ -97,7 +97,7 @@
|
|||||||
function resizeNodeList() {
|
function resizeNodeList() {
|
||||||
var rows = $("#dialog-form>div:not(.node-input-link-row)");
|
var rows = $("#dialog-form>div:not(.node-input-link-row)");
|
||||||
var height = $("#dialog-form").height();
|
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);
|
height -= $(rows[i]).outerHeight(true);
|
||||||
}
|
}
|
||||||
var editorRow = $("#dialog-form>div.node-input-link-row");
|
var editorRow = $("#dialog-form>div.node-input-link-row");
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
});
|
});
|
||||||
this.editor.focus();
|
this.editor.focus();
|
||||||
|
|
||||||
$("#node-function-expand-js").click(function(e) {
|
$("#node-function-expand-js").on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var value = that.editor.getValue();
|
var value = that.editor.getValue();
|
||||||
RED.editor.editJavaScript({
|
RED.editor.editJavaScript({
|
||||||
@ -119,7 +119,7 @@
|
|||||||
oneditresize: function(size) {
|
oneditresize: function(size) {
|
||||||
var rows = $("#dialog-form>div:not(.node-text-editor-row)");
|
var rows = $("#dialog-form>div:not(.node-text-editor-row)");
|
||||||
var height = $("#dialog-form").height();
|
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);
|
height -= $(rows[i]).outerHeight(true);
|
||||||
}
|
}
|
||||||
var editorRow = $("#dialog-form>div.node-text-editor-row");
|
var editorRow = $("#dialog-form>div.node-text-editor-row");
|
||||||
|
@ -102,7 +102,7 @@
|
|||||||
});
|
});
|
||||||
this.editor.focus();
|
this.editor.focus();
|
||||||
|
|
||||||
$("#node-input-format").change(function() {
|
$("#node-input-format").on("change", function() {
|
||||||
var mod = "ace/mode/"+$("#node-input-format").val();
|
var mod = "ace/mode/"+$("#node-input-format").val();
|
||||||
that.editor.getSession().setMode({
|
that.editor.getSession().setMode({
|
||||||
path: mod,
|
path: mod,
|
||||||
@ -122,7 +122,7 @@
|
|||||||
oneditresize: function(size) {
|
oneditresize: function(size) {
|
||||||
var rows = $("#dialog-form>div:not(.node-text-editor-row)");
|
var rows = $("#dialog-form>div:not(.node-text-editor-row)");
|
||||||
var height = $("#dialog-form").height();
|
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);
|
height -= $(rows[i]).outerHeight(true);
|
||||||
}
|
}
|
||||||
var editorRow = $("#dialog-form>div.node-text-editor-row");
|
var editorRow = $("#dialog-form>div.node-text-editor-row");
|
||||||
|
@ -161,8 +161,8 @@
|
|||||||
$( "#node-input-randomFirst" ).spinner({min:0});
|
$( "#node-input-randomFirst" ).spinner({min:0});
|
||||||
$( "#node-input-randomLast" ).spinner({min:1});
|
$( "#node-input-randomLast" ).spinner({min:1});
|
||||||
|
|
||||||
$('.ui-spinner-button').click(function() {
|
$('.ui-spinner-button').on("click", function() {
|
||||||
$(this).siblings('input').change();
|
$(this).siblings('input').trigger("change");
|
||||||
});
|
});
|
||||||
|
|
||||||
$( "#node-input-nbRateUnits" ).on('change keyup', function() {
|
$( "#node-input-nbRateUnits" ).on('change keyup', function() {
|
||||||
@ -226,7 +226,7 @@
|
|||||||
$("#delay-details").hide();
|
$("#delay-details").hide();
|
||||||
$("#rate-details").show();
|
$("#rate-details").show();
|
||||||
}
|
}
|
||||||
}).change();
|
}).trigger("change");
|
||||||
|
|
||||||
$("#node-input-delay-type").on("change", function() {
|
$("#node-input-delay-type").on("change", function() {
|
||||||
if (this.value === "delay") {
|
if (this.value === "delay") {
|
||||||
@ -239,7 +239,7 @@
|
|||||||
$("#delay-details-for").hide();
|
$("#delay-details-for").hide();
|
||||||
$("#random-details").show();
|
$("#random-details").show();
|
||||||
}
|
}
|
||||||
}).change();
|
}).trigger("change");
|
||||||
|
|
||||||
$("#node-input-rate-type").on("change", function() {
|
$("#node-input-rate-type").on("change", function() {
|
||||||
if (this.value === "all") {
|
if (this.value === "all") {
|
||||||
@ -249,7 +249,7 @@
|
|||||||
$("#node-input-drop").prop('checked',true).attr('disabled',true).next().css("opacity",0.5)
|
$("#node-input-drop").prop('checked',true).attr('disabled',true).next().css("opacity",0.5)
|
||||||
$("#rate-details-per-topic").show();
|
$("#rate-details-per-topic").show();
|
||||||
}
|
}
|
||||||
}).change();
|
}).trigger("change");
|
||||||
},
|
},
|
||||||
oneditsave: function() {
|
oneditsave: function() {
|
||||||
var action = $("#node-input-delay-action").val();
|
var action = $("#node-input-delay-action").val();
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
return this.name?"node_label_italic":"";
|
return this.name?"node_label_italic":"";
|
||||||
},
|
},
|
||||||
oneditprepare: function() {
|
oneditprepare: function() {
|
||||||
$("#node-then-type").change(function() {
|
$("#node-then-type").on("change", function() {
|
||||||
if ($(this).val() == "block") {
|
if ($(this).val() == "block") {
|
||||||
$(".node-type-wait").hide();
|
$(".node-type-wait").hide();
|
||||||
$(".node-type-duration").hide();
|
$(".node-type-duration").hide();
|
||||||
@ -160,7 +160,7 @@
|
|||||||
} else {
|
} else {
|
||||||
$("#node-then-type").val("wait");
|
$("#node-then-type").val("wait");
|
||||||
}
|
}
|
||||||
$("#node-then-type").change();
|
$("#node-then-type").trigger("change");
|
||||||
|
|
||||||
if (this.extend === "true" || this.extend === true) {
|
if (this.extend === "true" || this.extend === true) {
|
||||||
$("#node-input-extend").prop("checked",true);
|
$("#node-input-extend").prop("checked",true);
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
oneditresize: function(size) {
|
oneditresize: function(size) {
|
||||||
var rows = $("#dialog-form>div:not(.node-text-editor-row)");
|
var rows = $("#dialog-form>div:not(.node-text-editor-row)");
|
||||||
var height = $("#dialog-form").height();
|
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);
|
height -= $(rows[i]).outerHeight(true);
|
||||||
}
|
}
|
||||||
var editorRow = $("#dialog-form>div.node-text-editor-row");
|
var editorRow = $("#dialog-form>div.node-text-editor-row");
|
||||||
|
@ -92,7 +92,7 @@ RED.debug = (function() {
|
|||||||
parent: headerCheckbox
|
parent: headerCheckbox
|
||||||
});
|
});
|
||||||
flowCheckboxes[node.id] = muteControl;
|
flowCheckboxes[node.id] = muteControl;
|
||||||
row.click(function(e) {
|
row.on("click", function(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
debugNodeListExpandedFlows[node.id] = !debugNodeListExpandedFlows[node.id];
|
debugNodeListExpandedFlows[node.id] = !debugNodeListExpandedFlows[node.id];
|
||||||
row.toggleClass('expanded',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));
|
var muteControl = $('<input type="checkbox">').prop('checked',!filteredNodes[node.id]).appendTo($('<span class="meta">').appendTo(row));
|
||||||
muteControl.checkboxSet({
|
muteControl.checkboxSet({
|
||||||
parent: flowCheckboxes[node.z]
|
parent: flowCheckboxes[node.z]
|
||||||
}).change(function(e) {
|
}).on("change", function(e) {
|
||||||
filteredNodes[node.id] = !$(this).prop('checked');
|
filteredNodes[node.id] = !$(this).prop('checked');
|
||||||
$(".debug-message-node-"+node.id.replace(/\./g,"_")).toggleClass('hide',filteredNodes[node.id]);
|
$(".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'));
|
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();
|
e.preventDefault();
|
||||||
clearMessageList(false);
|
clearMessageList(false);
|
||||||
});
|
});
|
||||||
@ -351,11 +351,11 @@ RED.debug = (function() {
|
|||||||
filteredNodes[n.id] = true;
|
filteredNodes[n.id] = true;
|
||||||
});
|
});
|
||||||
delete filteredNodes[sourceId];
|
delete filteredNodes[sourceId];
|
||||||
$("#debug-tab-filterSelected").click();
|
$("#debug-tab-filterSelected").trigger("click");
|
||||||
refreshMessageList();
|
refreshMessageList();
|
||||||
}},
|
}},
|
||||||
{id:"debug-message-menu-item-clear-filter",label:RED._("node-red:debug.messageMenu.clearFilter"),onselect:function(){
|
{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();
|
refreshMessageList();
|
||||||
}}
|
}}
|
||||||
]
|
]
|
||||||
@ -451,7 +451,7 @@ RED.debug = (function() {
|
|||||||
if (sourceNode) {
|
if (sourceNode) {
|
||||||
$('<a>',{href:"#",class:"debug-message-name"}).text('node: '+(sourceNode.name||sourceNode.id))
|
$('<a>',{href:"#",class:"debug-message-name"}).text('node: '+(sourceNode.name||sourceNode.id))
|
||||||
.appendTo(metaRow)
|
.appendTo(metaRow)
|
||||||
.click(function(evt) {
|
.on("click", function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
config.messageSourceClick(sourceNode.id);
|
config.messageSourceClick(sourceNode.id);
|
||||||
});
|
});
|
||||||
@ -486,7 +486,7 @@ RED.debug = (function() {
|
|||||||
} else {
|
} else {
|
||||||
var tools = $('<span class="debug-message-tools button-group"></span>').appendTo(metaRow);
|
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);
|
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.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
showMessageMenu(filterMessage,debugMessage,sourceNode&&sourceNode.id);
|
showMessageMenu(filterMessage,debugMessage,sourceNode&&sourceNode.id);
|
||||||
|
@ -218,7 +218,7 @@
|
|||||||
pinsInUse = data || {};
|
pinsInUse = data || {};
|
||||||
$('#pin-tip').html(pintip + Object.keys(data));
|
$('#pin-tip').html(pintip + Object.keys(data));
|
||||||
});
|
});
|
||||||
$("#node-input-pin").change(function() {
|
$("#node-input-pin").on("change", function() {
|
||||||
if ($("#node-input-pin").val()) {
|
if ($("#node-input-pin").val()) {
|
||||||
$("#pinform input[value="+$("#node-input-pin").val()+"]").prop('checked', true);
|
$("#pinform input[value="+$("#node-input-pin").val()+"]").prop('checked', true);
|
||||||
}
|
}
|
||||||
@ -230,7 +230,7 @@
|
|||||||
pinnow = pinnew;
|
pinnow = pinnew;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#node-input-intype").change(function() {
|
$("#node-input-intype").on("change", function() {
|
||||||
var newtype = $("#node-input-intype").val();
|
var newtype = $("#node-input-intype").val();
|
||||||
if ((pinsInUse.hasOwnProperty(pinnow)) && (pinsInUse[pinnow] !== newtype)) {
|
if ((pinsInUse.hasOwnProperty(pinnow)) && (pinsInUse[pinnow] !== newtype)) {
|
||||||
RED.notify(pinname+" "+pinnow+" "+alreadyset+" "+pinsInUse[pinnow],"error");
|
RED.notify(pinname+" "+pinnow+" "+alreadyset+" "+pinsInUse[pinnow],"error");
|
||||||
@ -419,7 +419,7 @@
|
|||||||
$('#pin-tip').html(pintip + Object.keys(data));
|
$('#pin-tip').html(pintip + Object.keys(data));
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#node-input-pin").change(function() {
|
$("#node-input-pin").on("change", function() {
|
||||||
if ($("#node-input-pin").val()) {
|
if ($("#node-input-pin").val()) {
|
||||||
$("#pinform input[value="+$("#node-input-pin").val()+"]").prop('checked', true);
|
$("#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();
|
var newtype = $("#node-input-out").val();
|
||||||
if ((pinsInUse.hasOwnProperty(pinnow)) && (pinsInUse[pinnow] !== newtype)) {
|
if ((pinsInUse.hasOwnProperty(pinnow)) && (pinsInUse[pinnow] !== newtype)) {
|
||||||
RED.notify(pinname+" "+pinnow+" "+alreadyset+" "+pinsInUse[pinnow],"error");
|
RED.notify(pinname+" "+pinnow+" "+alreadyset+" "+pinsInUse[pinnow],"error");
|
||||||
@ -455,7 +455,7 @@
|
|||||||
$('#node-set-freq').hide();
|
$('#node-set-freq').hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$("#node-input-out").change(function () { hidestate(); });
|
$("#node-input-out").on("change", function () { hidestate(); });
|
||||||
hidestate();
|
hidestate();
|
||||||
|
|
||||||
var setstate = function () {
|
var setstate = function () {
|
||||||
@ -465,7 +465,7 @@
|
|||||||
$("#node-set-state").hide();
|
$("#node-set-state").hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$("#node-input-set").change(function () { setstate(); });
|
$("#node-input-set").on("change", function () { setstate(); });
|
||||||
setstate();
|
setstate();
|
||||||
|
|
||||||
$('#pinform input').on('change', function() {
|
$('#pinform input').on('change', function() {
|
||||||
|
@ -138,13 +138,13 @@
|
|||||||
}
|
}
|
||||||
reader.readAsText(file,"UTF-8");
|
reader.readAsText(file,"UTF-8");
|
||||||
}
|
}
|
||||||
$("#node-config-input-certfile" ).change(function() {
|
$("#node-config-input-certfile" ).on("change", function() {
|
||||||
saveFile("cert", this.files[0]);
|
saveFile("cert", this.files[0]);
|
||||||
});
|
});
|
||||||
$("#node-config-input-keyfile" ).change(function() {
|
$("#node-config-input-keyfile" ).on("change", function() {
|
||||||
saveFile("key", this.files[0]);
|
saveFile("key", this.files[0]);
|
||||||
});
|
});
|
||||||
$("#node-config-input-cafile" ).change(function() {
|
$("#node-config-input-cafile" ).on("change", function() {
|
||||||
saveFile("ca", this.files[0]);
|
saveFile("ca", this.files[0]);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -153,13 +153,13 @@
|
|||||||
$("#node-config-input-"+prop+"data").val("");
|
$("#node-config-input-"+prop+"data").val("");
|
||||||
$("#node-config-input-"+prop+"name").val("");
|
$("#node-config-input-"+prop+"name").val("");
|
||||||
}
|
}
|
||||||
$("#tls-config-button-cert-clear").click(function() {
|
$("#tls-config-button-cert-clear").on("click", function() {
|
||||||
clearNameData("cert");
|
clearNameData("cert");
|
||||||
});
|
});
|
||||||
$("#tls-config-button-key-clear").click(function() {
|
$("#tls-config-button-key-clear").on("click", function() {
|
||||||
clearNameData("key");
|
clearNameData("key");
|
||||||
});
|
});
|
||||||
$("#tls-config-button-ca-clear").click(function() {
|
$("#tls-config-button-ca-clear").on("click", function() {
|
||||||
clearNameData("ca");
|
clearNameData("ca");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
return this.name || this.url || ('http proxy:' + this.id);
|
return this.name || this.url || ('http proxy:' + this.id);
|
||||||
},
|
},
|
||||||
oneditprepare: function() {
|
oneditprepare: function() {
|
||||||
$('#node-config-input-useAuth').change(function() {
|
$('#node-config-input-useAuth').on("change", function() {
|
||||||
if ($(this).is(":checked")) {
|
if ($(this).is(":checked")) {
|
||||||
$('.node-config-input-useAuth-row').show();
|
$('.node-config-input-useAuth-row').show();
|
||||||
} else {
|
} else {
|
||||||
@ -117,7 +117,7 @@
|
|||||||
oneditresize: function(size) {
|
oneditresize: function(size) {
|
||||||
var rows = $('#node-config-dialog-edit-form>div:not(.node-config-input-noproxy-container-row)');
|
var rows = $('#node-config-dialog-edit-form>div:not(.node-config-input-noproxy-container-row)');
|
||||||
var height = size.height;
|
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);
|
height -= $(rows[i]).outerHeight(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@
|
|||||||
twistie.toggleClass('expanded', expanded);
|
twistie.toggleClass('expanded', expanded);
|
||||||
sectionContent.toggle(expanded);
|
sectionContent.toggle(expanded);
|
||||||
}
|
}
|
||||||
paletteHeader.click(function(e) {
|
paletteHeader.on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var isExpanded = twistie.hasClass('expanded');
|
var isExpanded = twistie.hasClass('expanded');
|
||||||
toggleSection(!isExpanded);
|
toggleSection(!isExpanded);
|
||||||
@ -429,7 +429,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$("#node-config-input-broker").change(function() {
|
$("#node-config-input-broker").on("change", function() {
|
||||||
updatePortEntry();
|
updatePortEntry();
|
||||||
});
|
});
|
||||||
$("#node-config-input-broker").on( "keyup", function() {
|
$("#node-config-input-broker").on( "keyup", function() {
|
||||||
|
@ -113,7 +113,7 @@
|
|||||||
if(!RED.nodes.getType("swagger-doc")){
|
if(!RED.nodes.getType("swagger-doc")){
|
||||||
$('.row-swagger-doc').hide();
|
$('.row-swagger-doc').hide();
|
||||||
}
|
}
|
||||||
$("#node-input-method").change(function() {
|
$("#node-input-method").on("change", function() {
|
||||||
if ($(this).val() === "post") {
|
if ($(this).val() === "post") {
|
||||||
$(".form-row-http-in-upload").show();
|
$(".form-row-http-in-upload").show();
|
||||||
} else {
|
} else {
|
||||||
@ -267,7 +267,7 @@
|
|||||||
oneditresize: function(size) {
|
oneditresize: function(size) {
|
||||||
var rows = $("#dialog-form>div:not(.node-input-headers-container-row)");
|
var rows = $("#dialog-form>div:not(.node-input-headers-container-row)");
|
||||||
var height = size.height;
|
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);
|
height -= $(rows[i]).outerHeight(true);
|
||||||
}
|
}
|
||||||
var editorRow = $("#dialog-form>div.node-input-headers-container-row");
|
var editorRow = $("#dialog-form>div.node-input-headers-container-row");
|
||||||
|
@ -125,7 +125,7 @@
|
|||||||
return this.name?"node_label_italic":"";
|
return this.name?"node_label_italic":"";
|
||||||
},
|
},
|
||||||
oneditprepare: function() {
|
oneditprepare: function() {
|
||||||
$("#node-input-useAuth").change(function() {
|
$("#node-input-useAuth").on("change", function() {
|
||||||
if ($(this).is(":checked")) {
|
if ($(this).is(":checked")) {
|
||||||
$(".node-input-useAuth-row").show();
|
$(".node-input-useAuth-row").show();
|
||||||
// Nodes (< version 0.20.x) with credentials but without authentication type, need type 'basic'
|
// Nodes (< version 0.20.x) with credentials but without authentication type, need type 'basic'
|
||||||
@ -139,7 +139,7 @@
|
|||||||
$('#node-input-password').val('');
|
$('#node-input-password').val('');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#node-input-authType").change(function() {
|
$("#node-input-authType").on("change", function() {
|
||||||
if ($(this).val() == "basic" || $(this).val() == "digest") {
|
if ($(this).val() == "basic" || $(this).val() == "digest") {
|
||||||
$(".node-input-basic-row").show();
|
$(".node-input-basic-row").show();
|
||||||
$('#node-span-password').show();
|
$('#node-span-password').show();
|
||||||
@ -151,7 +151,7 @@
|
|||||||
$('#node-input-user').val('');
|
$('#node-input-user').val('');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#node-input-method").change(function() {
|
$("#node-input-method").on("change", function() {
|
||||||
if ($(this).val() == "GET") {
|
if ($(this).val() == "GET") {
|
||||||
$(".node-input-paytoqs-row").show();
|
$(".node-input-paytoqs-row").show();
|
||||||
} else {
|
} else {
|
||||||
@ -199,7 +199,7 @@
|
|||||||
updateProxyOptions();
|
updateProxyOptions();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#node-input-ret").change(function() {
|
$("#node-input-ret").on("change", function() {
|
||||||
if ($("#node-input-ret").val() === "obj") {
|
if ($("#node-input-ret").val() === "obj") {
|
||||||
$("#tip-json").show();
|
$("#tip-json").show();
|
||||||
} else {
|
} else {
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
function ws_oneditprepare() {
|
function ws_oneditprepare() {
|
||||||
$("#websocket-client-row").hide();
|
$("#websocket-client-row").hide();
|
||||||
$("#node-input-mode").change(function() {
|
$("#node-input-mode").on("change", function() {
|
||||||
if ( $("#node-input-mode").val() === 'client') {
|
if ( $("#node-input-mode").val() === 'client') {
|
||||||
$("#websocket-server-row").hide();
|
$("#websocket-server-row").hide();
|
||||||
$("#websocket-client-row").show();
|
$("#websocket-client-row").show();
|
||||||
|
@ -235,7 +235,7 @@
|
|||||||
},
|
},
|
||||||
oneditprepare: function() {
|
oneditprepare: function() {
|
||||||
var previous = null;
|
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 (previous === null) { previous = $("#node-input-out").val(); }
|
||||||
if ($("#node-input-out").val() == "char") {
|
if ($("#node-input-out").val() == "char") {
|
||||||
if (previous != "char") { $("#node-input-splitc").val("\\n"); }
|
if (previous != "char") { $("#node-input-splitc").val("\\n"); }
|
||||||
|
@ -33,7 +33,7 @@ module.exports = function(RED) {
|
|||||||
*/
|
*/
|
||||||
const enqueue = (queue, item) => {
|
const enqueue = (queue, item) => {
|
||||||
// drop msgs from front of queue if size is going to be exceeded
|
// 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);
|
queue.push(item);
|
||||||
return queue;
|
return queue;
|
||||||
};
|
};
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
return this.name?"node_label_italic":"";
|
return this.name?"node_label_italic":"";
|
||||||
},
|
},
|
||||||
oneditprepare: function() {
|
oneditprepare: function() {
|
||||||
$("#node-input-multicast").change(function() {
|
$("#node-input-multicast").on("change", function() {
|
||||||
var id = $("#node-input-multicast").val();
|
var id = $("#node-input-multicast").val();
|
||||||
if (id == "false") {
|
if (id == "false") {
|
||||||
$(".node-input-group").hide();
|
$(".node-input-group").hide();
|
||||||
@ -103,7 +103,7 @@
|
|||||||
portsInUse = data || {};
|
portsInUse = data || {};
|
||||||
$('#udpporttip').html(porttip + data);
|
$('#udpporttip').html(porttip + data);
|
||||||
});
|
});
|
||||||
$("#node-input-port").change(function() {
|
$("#node-input-port").on("change", function() {
|
||||||
var portnew = $("#node-input-port").val();
|
var portnew = $("#node-input-port").val();
|
||||||
if (portsInUse.hasOwnProperty($("#node-input-port").val())) {
|
if (portsInUse.hasOwnProperty($("#node-input-port").val())) {
|
||||||
RED.notify(alreadyused+" "+$("#node-input-port").val(),"warn");
|
RED.notify(alreadyused+" "+$("#node-input-port").val(),"warn");
|
||||||
@ -191,7 +191,7 @@
|
|||||||
var type = this.outport===""?"random":"fixed";
|
var type = this.outport===""?"random":"fixed";
|
||||||
$("#node-input-outport-type").val(type);
|
$("#node-input-outport-type").val(type);
|
||||||
|
|
||||||
$("#node-input-outport-type").change(function() {
|
$("#node-input-outport-type").on("change", function() {
|
||||||
var type = $(this).val();
|
var type = $(this).val();
|
||||||
if (type == "random") {
|
if (type == "random") {
|
||||||
$("#node-input-outport").val("").hide();
|
$("#node-input-outport").val("").hide();
|
||||||
@ -201,7 +201,7 @@
|
|||||||
});
|
});
|
||||||
$("#node-input-outport-type").change();
|
$("#node-input-outport-type").change();
|
||||||
|
|
||||||
$("#node-input-multicast").change(function() {
|
$("#node-input-multicast").on("change", function() {
|
||||||
var id = $("#node-input-multicast").val();
|
var id = $("#node-input-multicast").val();
|
||||||
if (id === "multi") {
|
if (id === "multi") {
|
||||||
$(".node-input-iface").show();
|
$(".node-input-iface").show();
|
||||||
|
@ -230,7 +230,7 @@
|
|||||||
finalspan.append(' → <span class="node-input-rule-index">'+(i+1)+'</span> ');
|
finalspan.append(' → <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);
|
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);
|
$('<label/>',{for:"node-input-rule-case-"+i,style:"margin-left: 3px;"}).text(caseLabel).appendTo(row2);
|
||||||
selectField.change(function() {
|
selectField.on("change", function() {
|
||||||
resizeRule(container);
|
resizeRule(container);
|
||||||
var type = selectField.val();
|
var type = selectField.val();
|
||||||
if ((type === "btwn") || (type === "index")) {
|
if ((type === "btwn") || (type === "index")) {
|
||||||
@ -390,7 +390,7 @@
|
|||||||
oneditresize: function(size) {
|
oneditresize: function(size) {
|
||||||
var rows = $("#dialog-form>div:not(.node-input-rule-container-row)");
|
var rows = $("#dialog-form>div:not(.node-input-rule-container-row)");
|
||||||
var height = size.height;
|
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);
|
height -= $(rows[i]).outerHeight(true);
|
||||||
}
|
}
|
||||||
var editorRow = $("#dialog-form>div.node-input-rule-container-row");
|
var editorRow = $("#dialog-form>div.node-input-rule-container-row");
|
||||||
|
@ -151,7 +151,7 @@
|
|||||||
.appendTo(row4)
|
.appendTo(row4)
|
||||||
.typedInput({default:'msg',types:['msg','flow','global']});
|
.typedInput({default:'msg',types:['msg','flow','global']});
|
||||||
|
|
||||||
selectField.change(function() {
|
selectField.on("change", function() {
|
||||||
var width = $("#node-input-rule-container").width();
|
var width = $("#node-input-rule-container").width();
|
||||||
var type = $(this).val();
|
var type = $(this).val();
|
||||||
if (type == "set") {
|
if (type == "set") {
|
||||||
@ -255,7 +255,7 @@
|
|||||||
oneditresize: function(size) {
|
oneditresize: function(size) {
|
||||||
var rows = $("#dialog-form>div:not(.node-input-rule-container-row)");
|
var rows = $("#dialog-form>div:not(.node-input-rule-container-row)");
|
||||||
var height = size.height;
|
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);
|
height -= $(rows[i]).outerHeight(true);
|
||||||
}
|
}
|
||||||
var editorRow = $("#dialog-form>div.node-input-rule-container-row");
|
var editorRow = $("#dialog-form>div.node-input-rule-container-row");
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
types:['msg']
|
types:['msg']
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#node-input-addname-cb").change(function() {
|
$("#node-input-addname-cb").on("change", function() {
|
||||||
$("#node-input-addname").prop('disabled',!this.checked);
|
$("#node-input-addname").prop('disabled',!this.checked);
|
||||||
})
|
})
|
||||||
if (this.addname === "") {
|
if (this.addname === "") {
|
||||||
@ -228,7 +228,7 @@
|
|||||||
oneditprepare: function() {
|
oneditprepare: function() {
|
||||||
var node = this;
|
var node = this;
|
||||||
|
|
||||||
$("#node-input-mode").change(function(e) {
|
$("#node-input-mode").on("change", function(e) {
|
||||||
var val = $(this).val();
|
var val = $(this).val();
|
||||||
$(".node-row-custom").toggle(val==='custom');
|
$(".node-row-custom").toggle(val==='custom');
|
||||||
$(".node-row-reduce").toggle(val==='reduce');
|
$(".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();
|
var val = $(this).val();
|
||||||
$(".node-row-key").toggle(val==='object');
|
$(".node-row-key").toggle(val==='object');
|
||||||
$(".node-row-accumulate").toggle(val==='object' || val==='merged');
|
$(".node-row-accumulate").toggle(val==='object' || val==='merged');
|
||||||
|
@ -108,7 +108,7 @@
|
|||||||
typeField: $("#node-input-seqKeyType"),
|
typeField: $("#node-input-seqKeyType"),
|
||||||
types:['msg', 'jsonata']
|
types:['msg', 'jsonata']
|
||||||
});
|
});
|
||||||
$("#node-input-target").change(function(e) {
|
$("#node-input-target").on("change", function(e) {
|
||||||
var val = $("#node-input-target").typedInput('type');
|
var val = $("#node-input-target").typedInput('type');
|
||||||
$(".node-row-sort-msg-key").toggle(val === "msg");
|
$(".node-row-sort-msg-key").toggle(val === "msg");
|
||||||
$(".node-row-sort-seq-key").toggle(val === "seq");
|
$(".node-row-sort-seq-key").toggle(val === "seq");
|
||||||
|
@ -125,7 +125,7 @@
|
|||||||
$("#node-input-count").spinner({min:1});
|
$("#node-input-count").spinner({min:1});
|
||||||
$("#node-input-overlap").spinner({min:0});
|
$("#node-input-overlap").spinner({min:0});
|
||||||
$("#node-input-interval").spinner({min:1});
|
$("#node-input-interval").spinner({min:1});
|
||||||
$("#node-input-mode").change(function(e) {
|
$("#node-input-mode").on("change", function(e) {
|
||||||
var val = $(this).val();
|
var val = $(this).val();
|
||||||
$(".node-row-msg-count").toggle(val==="count");
|
$(".node-row-msg-count").toggle(val==="count");
|
||||||
$(".node-row-msg-overlap").toggle(val==="count");
|
$(".node-row-msg-overlap").toggle(val==="count");
|
||||||
@ -159,7 +159,7 @@
|
|||||||
oneditresize: function(size) {
|
oneditresize: function(size) {
|
||||||
var rows = $("#dialog-form>div:not(.node-input-topics-container-row)");
|
var rows = $("#dialog-form>div:not(.node-input-topics-container-row)");
|
||||||
var height = size.height;
|
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);
|
height -= $(rows[i]).outerHeight(true);
|
||||||
}
|
}
|
||||||
var editorRow = $("#dialog-form>div.node-input-topics-container-row");
|
var editorRow = $("#dialog-form>div.node-input-topics-container-row");
|
||||||
|
@ -94,7 +94,7 @@
|
|||||||
$("#node-input-sep").val(this.sep);
|
$("#node-input-sep").val(this.sep);
|
||||||
$("#node-input-sep").show();
|
$("#node-input-sep").show();
|
||||||
}
|
}
|
||||||
$("#node-input-select-sep").change(function() {
|
$("#node-input-select-sep").on("change", function() {
|
||||||
var v = $("#node-input-select-sep").val();
|
var v = $("#node-input-select-sep").val();
|
||||||
$("#node-input-sep").val(v);
|
$("#node-input-sep").val(v);
|
||||||
if (v == "") {
|
if (v == "") {
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
$("#node-input-property").val("payload");
|
$("#node-input-property").val("payload");
|
||||||
}
|
}
|
||||||
$("#node-input-property").typedInput({default:'msg',types:['msg']});
|
$("#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") {
|
if (this.value === "" || this.value === "str") {
|
||||||
$(".node-json-to-json-options").show();
|
$(".node-json-to-json-options").show();
|
||||||
} else {
|
} else {
|
||||||
|