UNPKG

node-red-contrib-smartnode

Version:

this project is a nodejs package for making the nodered support the Smart Device development. the pacakge require node-red enviroment.

77 lines (68 loc) 2.36 kB
<!-- Copyright 2015 Maker Collider Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <script type="text/javascript"> RED.nodes.registerType('wechat in', { category: 'social', color: '#E2D96E', defaults: { accountid: {value: "", required: false}, prev_accountid: {value: "", required: false} }, inputs: 0, outputs: 1, icon: "wechat.png", align: "right", label: function() { return this.name || "wechat in"; }, paletteLabel: function () { return this._("wechat.label.palette-in"); }, oneditsave: function() { this.prev_accountid = this.accountid; } }); </script> <script type="text/x-red" data-template-name="wechat in"> <div class="form-row"> <label for="node-input-accountid"><i class="fa fa-tag"></i> Account ID</label> <input type="text" id="node-input-accountid" placeholder="Account ID"> </div> </script> <script type="text/javascript"> RED.nodes.registerType('wechat out', { category: 'social', color: '#E2D96E', defaults: { accountid: {value: "", required: false} }, inputs: 1, outputs: 0, icon: "wechat.png", label: function() { return this.name || "wechat out"; }, paletteLabel: function () { return this._("wechat.label.palette-out"); }, oneditsave: function() { this.prev_accountid = this.accountid; } }); </script> <script type="text/x-red" data-template-name="wechat out"> <div class="form-row"> <label for="node-input-accountid"><i class="fa fa-tag"></i> Account ID</label> <input type="text" id="node-input-accountid" placeholder="Account ID"> </div> </script>