mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
Add numeric field type.
This commit is contained in:
@@ -136,6 +136,19 @@ GuacAdmin.Field.PASSWORD = function() {
|
|||||||
|
|
||||||
GuacAdmin.Field.PASSWORD.prototype = new GuacAdmin.Field._HTML_INPUT();
|
GuacAdmin.Field.PASSWORD.prototype = new GuacAdmin.Field._HTML_INPUT();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A basic numeric field, leveraging the new HTML5 field types.
|
||||||
|
*
|
||||||
|
* @augments GuacAdmin.Field._HTML_INPUT
|
||||||
|
*/
|
||||||
|
GuacAdmin.Field.NUMERIC = function() {
|
||||||
|
GuacAdmin.Field._HTML_INPUT.apply(this, ["number"]);
|
||||||
|
};
|
||||||
|
|
||||||
|
GuacAdmin.Field.NUMERIC.prototype = new GuacAdmin.Field._HTML_INPUT();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple checkbox.
|
* Simple checkbox.
|
||||||
*
|
*
|
||||||
@@ -803,19 +816,27 @@ GuacAdmin.addConnection = function(connection) {
|
|||||||
var field;
|
var field;
|
||||||
switch (parameter.type) {
|
switch (parameter.type) {
|
||||||
|
|
||||||
|
// Text field
|
||||||
case GuacamoleService.Protocol.Parameter.TEXT:
|
case GuacamoleService.Protocol.Parameter.TEXT:
|
||||||
case GuacamoleService.Protocol.Parameter.NUMERIC:
|
|
||||||
field = new GuacAdmin.Field.TEXT();
|
field = new GuacAdmin.Field.TEXT();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Password field
|
||||||
case GuacamoleService.Protocol.Parameter.PASSWORD:
|
case GuacamoleService.Protocol.Parameter.PASSWORD:
|
||||||
field = new GuacAdmin.Field.PASSWORD();
|
field = new GuacAdmin.Field.PASSWORD();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Numeric field
|
||||||
|
case GuacamoleService.Protocol.Parameter.NUMERIC:
|
||||||
|
field = new GuacAdmin.Field.NUMERIC();
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Checkbox
|
||||||
case GuacamoleService.Protocol.Parameter.BOOLEAN:
|
case GuacamoleService.Protocol.Parameter.BOOLEAN:
|
||||||
field = new GuacAdmin.Field.CHECKBOX(parameter.value);
|
field = new GuacAdmin.Field.CHECKBOX(parameter.value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Select field
|
||||||
case GuacamoleService.Protocol.Parameter.ENUM:
|
case GuacamoleService.Protocol.Parameter.ENUM:
|
||||||
field = new GuacAdmin.Field.ENUM(parameter.options);
|
field = new GuacAdmin.Field.ENUM(parameter.options);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user