mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
tweak sample nodes - slightly
This commit is contained in:
parent
10d9dee4aa
commit
96ed3055bf
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
Copyright 2013 IBM Corp.
|
Copyright 2014 IBM Corp.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@ -28,14 +28,15 @@
|
|||||||
<!-- Generally, there should be an input for each property of the node. -->
|
<!-- Generally, there should be an input for each property of the node. -->
|
||||||
<!-- The for and id attributes identify the corresponding property -->
|
<!-- The for and id attributes identify the corresponding property -->
|
||||||
<!-- (with the 'node-input-' prefix). -->
|
<!-- (with the 'node-input-' prefix). -->
|
||||||
<!-- The available icon classes are defined in Twitter Bootstrap -->
|
<!-- The available icon classes are defined Twitter Bootstrap glyphicons -->
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-topic"><i class="icon-tasks"></i> Topic</label>
|
<label for="node-input-topic"><i class="icon-tasks"></i> Topic</label>
|
||||||
<input type="text" id="node-input-topic" placeholder="Topic">
|
<input type="text" id="node-input-topic" placeholder="Topic">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
<!-- By convention, most nodes have a 'name' property. The following div -->
|
<!-- By convention, most nodes have a 'name' property. The following div -->
|
||||||
<!-- provides the necessary field. -->
|
<!-- provides the necessary field. Should always be the last option -->
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
|
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
|
||||||
<input type="text" id="node-input-name" placeholder="Name">
|
<input type="text" id="node-input-name" placeholder="Name">
|
||||||
@ -64,10 +65,11 @@
|
|||||||
name: {value:""}, // along with default values.
|
name: {value:""}, // along with default values.
|
||||||
topic: {value:"", required:true}
|
topic: {value:"", required:true}
|
||||||
},
|
},
|
||||||
inputs:0, // set the number of inputs - only 0 or 1
|
inputs:0, // set the number of inputs - only 0 or 1
|
||||||
outputs:1, // set the number of outputs - 0 to n
|
outputs:1, // set the number of outputs - 0 to n
|
||||||
icon: "arrow-in.png", // set the icon (held in public/icons)
|
// set the icon (held in icons dir below where you save the node)
|
||||||
label: function() { // sets the default label contents
|
icon: "myicon.png", // saved in icons/myicon.png
|
||||||
|
label: function() { // sets the default label contents
|
||||||
return this.name||this.topic||"sample";
|
return this.name||this.topic||"sample";
|
||||||
},
|
},
|
||||||
labelStyle: function() { // sets the class to apply to the label
|
labelStyle: function() { // sets the class to apply to the label
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2013 IBM Corp.
|
* Copyright 2014 IBM Corp.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
Loading…
Reference in New Issue
Block a user