mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-interval"><i class="fa fa-repeat"></i> <span data-i18n="feedparse.label.refresh"></span></label>
|
||||
<input type="text" id="node-input-interval" style="width: 50px"> <span data-i18n="feedparse.label.minutes"></span>
|
||||
<input type="text" id="node-input-interval" style="width:60px"> <span data-i18n="feedparse.label.minutes"></span>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
|
||||
@@ -19,6 +19,7 @@
|
||||
<p>The <code>msg.topic</code> contains the original article link. The <code>msg.payload</code>
|
||||
contains the description, and <code>msg.article</code> contains the complete article object,
|
||||
which has properties such as <code>.title</code>, <code>.summary</code>, <code>.date</code> and so on.</p>
|
||||
<p>The Refresh interval cannot be greater than 35790 minutes (approx 24.8 days).
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -28,13 +29,13 @@
|
||||
defaults: {
|
||||
name: {value:""},
|
||||
url: {value:"", required:true},
|
||||
interval: { value:15, required: true,validate:RED.validators.number()}
|
||||
interval: { value:15, required:true, validate:function(v) {return (!isNaN(parseInt(v)) && (parseInt(v) <= 35790))} }
|
||||
},
|
||||
inputs:0,
|
||||
outputs:1,
|
||||
icon: "feed.png",
|
||||
label: function() {
|
||||
return this.name||this.url;
|
||||
return this.name||this.url||"feedparser";
|
||||
},
|
||||
labelStyle: function() {
|
||||
return this.name?"node_label_italic":"";
|
||||
|
Reference in New Issue
Block a user