Files
nextcloud-nodered-ocs-api/nodes/nextcloud-ocs/dav.html
T

37 lines
3.1 KiB
HTML
Raw Normal View History

<script type="text/javascript">
RED.nodes.registerType('dav', {
category: 'nextcloud', color: '#33AA55',
defaults: {
name:{value:""},nextcloud:{type:"nextcloud-config",required:true},operation:{value:"direct:url"},
userId:{value:""},
bodyFileId:{value:""},bodyExpirationTime:{value:""},
bodyFirstDay:{value:""},bodyLastDay:{value:""},bodyStatus:{value:""},
bodyMessage:{value:""},bodyReplacementUserId:{value:""},bodyLocation:{value:""}
},
inputs:1,outputs:1,icon:"dav.svg",
label:function(){return this.name||"DAV";}
});
</script>
<script type="text/html" data-template-name="dav">
<div class="form-row"><label for="node-input-name"><i class="fa fa-tag"></i> Name</label><input type="text" id="node-input-name" placeholder="DAV"></div>
<div class="form-row"><label for="node-input-nextcloud"><i class="fa fa-cloud"></i> Config</label><input type="text" id="node-input-nextcloud" placeholder="Select config node"></div>
<div class="form-row"><label for="node-input-operation"><i class="fa fa-cog"></i> Operation</label>
<select id="node-input-operation" style="width:100%;">
<optgroup label="Direct Links"><option value="direct:url">Get Direct Link</option></optgroup>
<optgroup label="Events"><option value="events:upcoming">Upcoming Events</option></optgroup>
<optgroup label="Out of Office"><option value="ooo:current">Current Status</option><option value="ooo:get">Get Absence</option><option value="ooo:set">Set Absence</option><option value="ooo:clear">Clear Absence</option></optgroup>
</select>
</div>
<hr><div style="font-weight:bold;margin-bottom:6px;">Path / Query Params</div>
<div class="form-row"><label>User ID</label><input type="text" id="node-input-userId" placeholder="msg.userId"></div>
<div class="form-row"><label>File ID (direct link)</label><input type="text" id="node-input-bodyFileId" placeholder="msg.fileId"></div>
<div class="form-row"><label>Expiration (seconds)</label><input type="text" id="node-input-bodyExpirationTime" placeholder="msg.expirationTime"></div>
<div class="form-row"><label>Location (events)</label><input type="text" id="node-input-bodyLocation" placeholder="msg.location"></div>
<hr><div style="font-weight:bold;margin-bottom:6px;">Out of Office Fields</div>
<div class="form-row"><label>First Day (YYYY-MM-DD)</label><input type="text" id="node-input-bodyFirstDay" placeholder="msg.firstDay"></div>
<div class="form-row"><label>Last Day (YYYY-MM-DD)</label><input type="text" id="node-input-bodyLastDay" placeholder="msg.lastDay"></div>
<div class="form-row"><label>Status Text</label><input type="text" id="node-input-bodyStatus" placeholder="msg.status"></div>
<div class="form-row"><label>Message</label><textarea id="node-input-bodyMessage" rows="2" placeholder="msg.message"></textarea></div>
<div class="form-row"><label>Replacement User ID</label><input type="text" id="node-input-bodyReplacementUserId" placeholder="msg.replacementUserId"></div>
<div class="form-tips"><p>All fields overridable via <code>msg.*</code>.</p></div>
</script>