mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
move to debug.html, rename to "deactivate" instead of "disable"
This commit is contained in:
parent
b71f81af57
commit
a69db4d572
@ -401,8 +401,6 @@ RED.view = (function() {
|
||||
$("#red-ui-workspace-tabs").removeClass("red-ui-workspace-focussed");
|
||||
});
|
||||
|
||||
RED.actions.add("core:disable-all-debug-nodes", function() { disableAllDebugNodes(false); });
|
||||
RED.actions.add("core:disable-all-flow-debug-nodes", function() { disableAllDebugNodes(true); });
|
||||
RED.actions.add("core:copy-selection-to-internal-clipboard",copySelection);
|
||||
RED.actions.add("core:cut-selection-to-internal-clipboard",function(){copySelection();deleteSelection();});
|
||||
RED.actions.add("core:paste-from-internal-clipboard",function(){importNodes(clipboard);});
|
||||
@ -1434,34 +1432,6 @@ RED.view = (function() {
|
||||
redraw();
|
||||
}
|
||||
|
||||
function disableAllDebugNodes(currentFlowOnly) {
|
||||
var historyEvents = [];
|
||||
RED.nodes.eachNode(function(n) {
|
||||
if (n.type === "debug" && n.active === true && ( currentFlowOnly === false || n.z == RED.workspaces.active() )) {
|
||||
var oldValue = n.active;
|
||||
historyEvents.push({
|
||||
t: "edit",
|
||||
node: n,
|
||||
changed: n.changed,
|
||||
changes: {
|
||||
active: oldValue
|
||||
}
|
||||
});
|
||||
n.active = false;
|
||||
n.changed = true;
|
||||
n.dirty = true;
|
||||
}
|
||||
});
|
||||
if (historyEvents.length > 0) {
|
||||
RED.history.push({
|
||||
t: "multi",
|
||||
events: historyEvents,
|
||||
dirty: RED.nodes.dirty()
|
||||
});
|
||||
RED.nodes.dirty(true);
|
||||
}
|
||||
RED.view.redraw();
|
||||
}
|
||||
|
||||
function selectAll() {
|
||||
if (mouse_mode === RED.state.SELECTING_NODE && selectNodesOptions.single) {
|
||||
|
@ -266,6 +266,40 @@
|
||||
RED.events.on("project:change", this.clearMessageList);
|
||||
RED.actions.add("core:clear-debug-messages", function() { RED.debug.clearMessageList(true) });
|
||||
|
||||
|
||||
RED.actions.add("core:deactivate-all-debug-nodes", function() { deactivateAllDebugNodes(true); });
|
||||
RED.actions.add("core:deactivate-all-flow-debug-nodes", function() { deactivateAllDebugNodes(false); });
|
||||
|
||||
function deactivateAllDebugNodes(globally) {
|
||||
var historyEvents = [];
|
||||
RED.nodes.eachNode(function(n) {
|
||||
if (n.type === "debug" && n.active === true) {
|
||||
if (globally === true || n.z == RED.workspaces.active()) {
|
||||
historyEvents.push({
|
||||
t: "edit",
|
||||
node: n,
|
||||
changed: n.changed,
|
||||
changes: {
|
||||
active: n.active
|
||||
}
|
||||
});
|
||||
n.active = false;
|
||||
n.changed = true;
|
||||
n.dirty = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (historyEvents.length > 0) {
|
||||
RED.history.push({
|
||||
t: "multi",
|
||||
events: historyEvents,
|
||||
dirty: RED.nodes.dirty()
|
||||
});
|
||||
RED.nodes.dirty(true);
|
||||
}
|
||||
RED.view.redraw();
|
||||
}
|
||||
|
||||
$("#red-ui-sidebar-debug-open").on("click", function(e) {
|
||||
e.preventDefault();
|
||||
subWindow = window.open(document.location.toString().replace(/[?#].*$/,"")+"debug/view/view.html"+document.location.search,"nodeREDDebugView","menubar=no,location=no,toolbar=no,chrome,height=500,width=600");
|
||||
|
Loading…
Reference in New Issue
Block a user