Skip to content

Commit

Permalink
support more data types in numeric and textinput UI
Browse files Browse the repository at this point in the history
  • Loading branch information
wellingguzman committed Apr 6, 2017
1 parent 7816be4 commit c47366b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion app/core/uis/numeric.js
Expand Up @@ -57,7 +57,19 @@ define(['app', 'core/UIComponent', 'core/UIView', 'core/t'], function(app, UICom

var Component = UIComponent.extend({
id: 'numeric',
dataTypes: ['TINYINT', 'INT', 'NUMERIC', 'FLOAT', 'YEAR', 'VARCHAR', 'CHAR', 'DOUBLE', 'BIGINT'],
dataTypes: [
'TINYINT',
'SMALLINT',
'MEDIUMINT',
'INT',
'NUMERIC',
'FLOAT',
'YEAR',
'VARCHAR',
'CHAR',
'DOUBLE',
'BIGINT'
],
variables: [
{id: 'size', type: 'String', default_value: 'large', ui: 'select', options: {options: {'large':__t('size_large'),'medium':__t('size_medium'),'small':__t('size_small')} }},
{id: 'placeholder_text', type: 'String', default_value: '', ui: 'textinput', char_length:200},
Expand Down
2 changes: 1 addition & 1 deletion app/core/uis/textinput.js
Expand Up @@ -92,7 +92,7 @@ define(['app', 'core/UIComponent', 'core/UIView', 'core/t'], function(app, UICom

var Component = UIComponent.extend({
id: 'textinput',
dataTypes: ['VARCHAR', 'DATE', 'TIME', 'ENUM'],
dataTypes: ['VARCHAR', 'CHAR', 'DATE', 'TIME', 'ENUM'],
variables: [
// Disables editing of the field while still letting users see the value (true = readonly)
{id: 'readonly', type: 'Boolean', default_value: false, ui: 'checkbox'},
Expand Down

0 comments on commit c47366b

Please sign in to comment.