mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Fix linting
This commit is contained in:
parent
18d0fa2259
commit
a745ddc164
@ -29,7 +29,14 @@ RED.history = (function() {
|
|||||||
}
|
}
|
||||||
return RED.nodes.junction(id);
|
return RED.nodes.junction(id);
|
||||||
}
|
}
|
||||||
|
function ensureUnlocked(id, flowsToLock) {
|
||||||
|
const flow = id && (RED.nodes.workspace(id) || RED.nodes.subflow(id) || null);
|
||||||
|
const isLocked = flow ? flow.locked : false;
|
||||||
|
if (flow && isLocked) {
|
||||||
|
flow.locked = false;
|
||||||
|
flowsToLock.add(flow)
|
||||||
|
}
|
||||||
|
}
|
||||||
function undoEvent(ev) {
|
function undoEvent(ev) {
|
||||||
var i;
|
var i;
|
||||||
var len;
|
var len;
|
||||||
@ -78,21 +85,14 @@ RED.history = (function() {
|
|||||||
RED.nodes.dirty(false);
|
RED.nodes.dirty(false);
|
||||||
|
|
||||||
const flowsToLock = new Set()
|
const flowsToLock = new Set()
|
||||||
function ensureUnlocked(id) {
|
|
||||||
const flow = id && (RED.nodes.workspace(id) || RED.nodes.subflow(id) || null);
|
|
||||||
const isLocked = flow ? flow.locked : false;
|
|
||||||
if (flow && isLocked) {
|
|
||||||
flow.locked = false;
|
|
||||||
flowsToLock.add(flow)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
imported.nodes.forEach(function(n) {
|
imported.nodes.forEach(function(n) {
|
||||||
if (ev.changed[n.id]) {
|
if (ev.changed[n.id]) {
|
||||||
ensureUnlocked(n.z)
|
ensureUnlocked(n.z, flowsToLock)
|
||||||
n.changed = true;
|
n.changed = true;
|
||||||
}
|
}
|
||||||
if (ev.moved[n.id]) {
|
if (ev.moved[n.id]) {
|
||||||
ensureUnlocked(n.z)
|
ensureUnlocked(n.z, flowsToLock)
|
||||||
n.moved = true;
|
n.moved = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -223,7 +223,7 @@ RED.notifications = (function() {
|
|||||||
}
|
}
|
||||||
newTimeout = newOptions.hasOwnProperty('timeout')?newOptions.timeout:timeout
|
newTimeout = newOptions.hasOwnProperty('timeout')?newOptions.timeout:timeout
|
||||||
if (!fixed || newOptions.fixed === false) {
|
if (!fixed || newOptions.fixed === false) {
|
||||||
newTimeout === newTimeout || 5000
|
newTimeout = newTimeout || 5000
|
||||||
}
|
}
|
||||||
if (newOptions.buttons) {
|
if (newOptions.buttons) {
|
||||||
var buttonSet = $('<div class="ui-dialog-buttonset"></div>').appendTo(nn)
|
var buttonSet = $('<div class="ui-dialog-buttonset"></div>').appendTo(nn)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user