mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Allow credSecret to be managed via project settings
This commit is contained in:
@@ -23,7 +23,7 @@ RED.popover = (function() {
|
||||
},
|
||||
"small": {
|
||||
top: 5,
|
||||
leftRight: 8,
|
||||
leftRight: 17,
|
||||
leftLeft: 16
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,7 @@ RED.popover = (function() {
|
||||
var active;
|
||||
var div;
|
||||
|
||||
var openPopup = function() {
|
||||
var openPopup = function(instant) {
|
||||
if (active) {
|
||||
div = $('<div class="red-ui-popover red-ui-popover-'+direction+'"></div>').appendTo("body");
|
||||
if (size !== "default") {
|
||||
@@ -62,7 +62,6 @@ RED.popover = (function() {
|
||||
var targetPos = target.offset();
|
||||
var targetWidth = target.width();
|
||||
var targetHeight = target.height();
|
||||
|
||||
var divHeight = div.height();
|
||||
var divWidth = div.width();
|
||||
if (direction === 'right') {
|
||||
@@ -70,16 +69,23 @@ RED.popover = (function() {
|
||||
} else if (direction === 'left') {
|
||||
div.css({top: targetPos.top+targetHeight/2-divHeight/2-deltaSizes[size].top,left:targetPos.left-deltaSizes[size].leftLeft-divWidth});
|
||||
}
|
||||
|
||||
div.fadeIn("fast");
|
||||
if (instant) {
|
||||
div.show();
|
||||
} else {
|
||||
div.fadeIn("fast");
|
||||
}
|
||||
}
|
||||
}
|
||||
var closePopup = function() {
|
||||
var closePopup = function(instant) {
|
||||
if (!active) {
|
||||
if (div) {
|
||||
div.fadeOut("fast",function() {
|
||||
if (instant) {
|
||||
$(this).remove();
|
||||
});
|
||||
} else {
|
||||
div.fadeOut("fast",function() {
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
div = null;
|
||||
}
|
||||
}
|
||||
@@ -114,14 +120,17 @@ RED.popover = (function() {
|
||||
var res = {
|
||||
setContent: function(_content) {
|
||||
content = _content;
|
||||
return res;
|
||||
},
|
||||
open: function () {
|
||||
open: function (instant) {
|
||||
active = true;
|
||||
openPopup();
|
||||
openPopup(instant);
|
||||
return res;
|
||||
},
|
||||
close: function () {
|
||||
close: function (instant) {
|
||||
active = false;
|
||||
closePopup();
|
||||
closePopup(instant);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
|
Reference in New Issue
Block a user