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.

61 lines (47 loc) 1.6 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('RobotHead-Sad',{ category: 'Motion', color: '#c7e9c0', defaults: { name: {value:"RobotHead-Sad"}, time: {value: 500} }, inputs:0, outputs:1, // how many callbacks of cameraInit icon: "light.png", label: function() { return this.name; }, paletteLabel: function () { return this.name||this._("RobotHead-Sad.label.palette"); }, button: { onclick: function(){ d3.xhr("inject/"+this.id).post(function(err,resp) { }); } } }); </script> <script type="text/x-red" data-template-name="RobotHead-Sad"> <div class="form-row"> <label for="node-input-name"><i class="icon-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="Name"> </div> <div class="form-row"> <label for="node-input-time"><i class="icon-tag"></i>Time</label> <input type="text" id="node-input-time" placeholder="Name"> </div> </script>