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

Missed sidebar api changes

This commit is contained in:
Nick O'Leary 2014-02-27 16:47:28 +00:00
parent ebcf539795
commit 1c655b5945
3 changed files with 20 additions and 19 deletions

View File

@ -86,7 +86,7 @@ RED.nodes = function() {
var removedLinks = [];
if (id in configNodes) {
delete configNodes[id];
RED.configTab.refresh();
RED.sidebar.config.refresh();
} else {
var node = getNode(id);
if (node) {
@ -110,7 +110,7 @@ RED.nodes = function() {
}
}
if (updatedConfigNode) {
RED.configTab.refresh();
RED.sidebar.config.refresh();
}
}
return removedLinks;

View File

@ -23,6 +23,23 @@ RED.sidebar.info = function() {
RED.sidebar.addTab("info",content);
function jsonFilter(key,value) {
if (key == "") {
return value;
}
var t = typeof value;
if ($.isArray(value)) {
return "[array:"+value.length+"]";
} else if (t === "object") {
return "[object]"
} else if (t === "string") {
if (value.length > 30) {
return value.substring(0,30)+" ...";
}
}
return value;
}
function refresh(node) {
var table = '<table class="node-info"><tbody>';

View File

@ -521,22 +521,6 @@ RED.view = function() {
}
}
function jsonFilter(key,value) {
if (key == "") {
return value;
}
var t = typeof value;
if ($.isArray(value)) {
return "[array:"+value.length+"]";
} else if (t === "object") {
return "[object]"
} else if (t === "string") {
if (value.length > 30) {
return value.substring(0,30)+" ...";
}
}
return value;
}
function calculateTextWidth(str) {
var sp = document.createElement("span");