Tidy up some little wrinkles in Inject node html labels etc

This commit is contained in:
Dave C-J 2014-09-14 18:38:30 +01:00
parent 7e2dbb13e4
commit a0ac79384d
1 changed files with 15 additions and 13 deletions

View File

@ -136,10 +136,10 @@
outputs:1,
icon: "inject.png",
label: function() {
if (this.payloadType == "string") {
if (this.payloadType === "string") {
return this.name||this.topic||this.payload||"inject";
}
else { return this.name||"inject"; }
else { return this.name||this.topic||"inject"; }
},
labelStyle: function() {
return this.name?"node_label_italic":"";
@ -399,6 +399,8 @@
button: {
onclick: function() {
var label = (this.name||this.payload).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
if (this.payloadType === "date") { label = "timestamp"; }
if (this.payloadType === "none") { label = "blank"; }
d3.xhr("inject/"+this.id).post(function(err,resp) {
if (err) {
if (err.status == 404) {