diff --git a/77-cloudant-cf.html b/77-cloudant-cf.html index ae0c58d..49699f8 100644 --- a/77-cloudant-cf.html +++ b/77-cloudant-cf.html @@ -81,6 +81,12 @@ style="display: inline-block; width: auto; vertical-align: top;"> +
+ + + +
@@ -140,7 +146,8 @@ database: { value:"", required:true, validate:validateDatabase }, service: { value:"", required:true }, payonly: { value:false }, - operation: { value:"insert" } + operation: { value:"insert" }, + successOutput: { value: false } }, inputs: 1, outputs: 0, @@ -150,7 +157,15 @@ labelStyle: function() { return this.name?"node_label_italic":""; }, - oneditprepare: oneditprepare + oneditprepare: function() { + var node = this; + $('#node-input-successOutput').change(function() { + node.outputs = $(this).is(':checked') ? 1 : 0; + }); + if (node.successOutput) + node.outputs = 1 + return oneditprepare.call(this) + } }); RED.nodes.registerType("cloudant in", { @@ -264,6 +279,12 @@ msg object itself or as an object in the msg.payload.

+

+ It is also possible to have a success output. The msg.payload + will be de body of callback function. Errors are send throught + node.error (You'll have to catch them using the catch + mechanism) +

The database name must follow these rules: