|
111 | 111 |
|
112 | 112 | <script type="text/javascript">
|
113 | 113 | RED.nodes.registerType('postgres',{
|
114 |
| - category: 'storage-output', |
115 |
| - color:"rgb(148, 226, 252)", |
116 |
| - defaults: { |
117 |
| - postgresdb: { type:"postgresdb",required:true}, |
118 |
| - name: {value:""}, |
119 |
| - output: {value:false} |
120 |
| - }, |
121 |
| - inputs:1, |
122 |
| - outputs:0, |
123 |
| - icon: "postgres.png", |
124 |
| - align: "right", |
125 |
| - label: function() { |
126 |
| - return this.name||(this.sqlquery?this.sqlquery:"postgres"); |
127 |
| - }, |
128 |
| - labelStyle: function() { |
129 |
| - return this.name?"node_label_italic":""; |
130 |
| - }, |
131 |
| - oneditprepare: function() { |
132 |
| - |
133 |
| - $( "#node-input-output" ).prop( "checked", this.output ); |
134 |
| - $("#node-input-name").focus(); |
135 |
| - |
136 |
| - }, |
137 |
| - oneditsave: function() { |
| 114 | + category: 'storage-output', |
| 115 | + color:"rgb(148, 226, 252)", |
| 116 | + defaults: { |
| 117 | + postgresdb: { type:"postgresdb",required:true}, |
| 118 | + name: {value:""}, |
| 119 | + output: {value:false}, |
| 120 | + outputs: {value:0} |
| 121 | + }, |
| 122 | + inputs: 1, |
| 123 | + outputs: 0, |
| 124 | + icon: "postgres.png", |
| 125 | + align: "right", |
| 126 | + label: function() { |
| 127 | + return this.name||(this.sqlquery?this.sqlquery:"postgres"); |
| 128 | + }, |
| 129 | + labelStyle: function() { |
| 130 | + return this.name?"node_label_italic":""; |
| 131 | + }, |
| 132 | + oneditprepare: function() { |
| 133 | + |
| 134 | + $( "#node-input-output" ).prop( "checked", this.output ); |
| 135 | + $("#node-input-name").focus(); |
| 136 | + |
| 137 | + }, |
| 138 | + oneditsave: function() { |
138 | 139 |
|
139 |
| - var hasOutput = $( "#node-input-output" ).prop( "checked" ); |
140 |
| - this.outputs = hasOutput ? 1: 0; |
141 |
| - |
142 |
| - } |
143 |
| - }); |
| 140 | + var hasOutput = $( "#node-input-output" ).prop( "checked" ); |
| 141 | + this.outputs = hasOutput ? 1:0; |
| 142 | + |
| 143 | + } |
| 144 | + }); |
| 145 | + |
144 | 146 | </script>
|
0 commit comments