From 96b1de18560cf0b8c03e7d241baf0753ccb800ed Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sun, 10 May 2020 20:34:34 +0200 Subject: [PATCH] register different input types --- htdocs/settings.js | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/htdocs/settings.js b/htdocs/settings.js index c9cb97f..732e795 100644 --- a/htdocs/settings.js +++ b/htdocs/settings.js @@ -25,8 +25,42 @@ TextInput.prototype.render = function() { return this.bootstrapify($('')); } +function NumberInput() { + Input.apply(this, arguments); +}; + +NumberInput.prototype = new Input(); + +NumberInput.prototype.render = function() { + return this.bootstrapify($('')); +}; + +function ProfileInput() { + Input.apply(this, arguments); +}; + +ProfileInput.prototype = new Input(); + +ProfileInput.prototype.render = function() { + return $('

Profiles

'); +}; + +function SchedulerInput() { + Input.apply(this, arguments); +}; + +SchedulerInput.prototype = new Input(); + +SchedulerInput.prototype.render = function() { + return $('

Scheduler

'); +}; + Input.mappings = { - "name": TextInput + "name": TextInput, + "type": TextInput, + "ppm": NumberInput, + "profiles": ProfileInput, + "scheduler": SchedulerInput }; function SdrDevice(el) {