forked from 0x2620/oxjs
some documentation
This commit is contained in:
parent
275dcbb356
commit
bdb8d98787
45 changed files with 775 additions and 255 deletions
|
|
@ -1,59 +1,62 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||
Ox.Input = function(options, self) {
|
||||
/*@
|
||||
Ox.Input <f:Ox.Element> Input Element
|
||||
() -> <f> Input Element
|
||||
(options) -> <f> Input Element
|
||||
(options, self) -> <f> Input Element
|
||||
options <o> Options object
|
||||
arrows <b> if true, and type is 'float' or 'integer', display arrows
|
||||
arrowStep <n> step when clicking arrows
|
||||
autocomplete <a> array of possible values, or
|
||||
<f> function(key, value, callback), returns one or more values
|
||||
autocompleteReplace <b> if true, value is replaced
|
||||
autocompleteReplaceCorrect <b> if true, only valid values can be entered
|
||||
autocompleteSelect <b> if true, menu is displayed
|
||||
autocompleteSelectHighlight <b> if true, value in menu is highlighted
|
||||
autocompleteSelectSubmit <b> if true, submit input on menu selection
|
||||
autocorrect <s|r|f|null> ('email', 'float', 'integer', 'phone', 'url'), or
|
||||
<r> regexp(value), or
|
||||
<f> function(key, value, blur, callback), returns value
|
||||
autovalidate <f> --remote validation--
|
||||
clear <b> if true, has clear button
|
||||
disabled <b> if true, is disabled
|
||||
height <n> px (for type='textarea' and type='range' with orientation='horizontal')
|
||||
id <s> element id
|
||||
key <s> to be passed to autocomplete and autovalidate functions
|
||||
max <n> max value if type is 'integer' or 'float'
|
||||
min <n> min value if type is 'integer' or 'float'
|
||||
name <s> will be displayed by autovalidate function ('invalid ' + name)
|
||||
overlap <s> '', 'left' or 'right', will cause padding and negative margin
|
||||
picker <o> picker object
|
||||
rangeOptions <o> range options
|
||||
arrows <b>boolean, if true, display arrows
|
||||
//arrowStep <n> number, step when clicking arrows
|
||||
//arrowSymbols <a> array of two strings
|
||||
max <n> number, maximum value
|
||||
min <n> number, minimum value
|
||||
orientation <s> 'horizontal' or 'vertical'
|
||||
step <n> number, step
|
||||
thumbValue <b> boolean, if true, value is displayed on thumb, or
|
||||
<a> array of strings per value, or
|
||||
<f> function(value), returns string
|
||||
thumbSize <n> integer, px
|
||||
trackGradient <s> string, css gradient for track
|
||||
trackImage <s> string, image url, or
|
||||
<a> array of image urls
|
||||
//trackStep <n> number, 0 for 'scroll here', positive for step
|
||||
trackValues <b> boolean
|
||||
serialize <f> function used to serialize value in submit
|
||||
textAlign <s> 'left', 'center' or 'right'
|
||||
type <s> 'float', 'integer', 'password', 'text', 'textarea'
|
||||
value <s> string
|
||||
validate <f> remote validation
|
||||
width <n> px
|
||||
|
||||
/**
|
||||
options
|
||||
arrows boolearn, if true, and type is 'float' or 'integer', display arrows
|
||||
arrowStep number, step when clicking arrows
|
||||
autocomplete array of possible values, or
|
||||
function(key, value, callback), returns one or more values
|
||||
autocompleteReplace boolean, if true, value is replaced
|
||||
autocompleteReplaceCorrect boolean, if true, only valid values can be entered
|
||||
autocompleteSelect boolean, if true, menu is displayed
|
||||
autocompleteSelectHighlight boolean, if true, value in menu is highlighted
|
||||
autocompleteSelectSubmit boolean, if true, submit input on menu selection
|
||||
autocorrect string ('email', 'float', 'integer', 'phone', 'url'), or
|
||||
regexp(value), or
|
||||
function(key, value, blur, callback), returns value
|
||||
autovalidate --remote validation--
|
||||
clear boolean, if true, has clear button
|
||||
disabled boolean, if true, is disabled
|
||||
height integer, px (for type='textarea' and type='range' with orientation='horizontal')
|
||||
id string, element id
|
||||
key string, to be passed to autocomplete and autovalidate functions
|
||||
max number, max value if type is 'integer' or 'float'
|
||||
min number, min value if type is 'integer' or 'float'
|
||||
name string, will be displayed by autovalidate function ('invalid ' + name)
|
||||
overlap string, '', 'left' or 'right', will cause padding and negative margin
|
||||
picker
|
||||
//rangeOptions
|
||||
arrows boolean, if true, display arrows
|
||||
//arrowStep number, step when clicking arrows
|
||||
//arrowSymbols array of two strings
|
||||
max number, maximum value
|
||||
min number, minimum value
|
||||
orientation 'horizontal' or 'vertical'
|
||||
step number, step
|
||||
thumbValue boolean, if true, value is displayed on thumb, or
|
||||
array of strings per value, or
|
||||
function(value), returns string
|
||||
thumbSize integer, px
|
||||
trackGradient string, css gradient for track
|
||||
trackImage string, image url, or
|
||||
array of image urls
|
||||
//trackStep number, 0 for 'scroll here', positive for step
|
||||
trackValues boolean
|
||||
serialize
|
||||
textAlign 'left', 'center' or 'right'
|
||||
type 'float', 'integer', 'password', 'text', 'textarea'
|
||||
value string
|
||||
validate function, remote validation
|
||||
width integer, px
|
||||
methods:
|
||||
events:
|
||||
change
|
||||
submit
|
||||
*/
|
||||
change <!> input changed event
|
||||
submit <!> input submit event
|
||||
@*/
|
||||
|
||||
Ox.Input = function(options, self) {
|
||||
|
||||
var self = self || {},
|
||||
that = new Ox.Element({}, self)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue