FileButton: add default for image options
This commit is contained in:
parent
4c6756c192
commit
abc6cbbb15
1 changed files with 3 additions and 2 deletions
|
@ -4,7 +4,8 @@
|
|||
Ox.FileButton <f> File Button
|
||||
options <o> Options
|
||||
disabled <b|false> If true, the button is disabled
|
||||
image <s|false> Symbol name (if type is 'image')
|
||||
image <s|'file'> Symbol name (if type is 'image')
|
||||
The default value will be 'files' if maxFiles is not 1
|
||||
maxFiles <n|-1> Maximum number of files (or -1 for unlimited)
|
||||
maxSize <n|-1> Maximum total file size in bytes (or -1 for unlimited)
|
||||
title <s|''> Title of the button (and its tooltip)
|
||||
|
@ -20,7 +21,7 @@ Ox.FileButton = function(options, self) {
|
|||
var that = Ox.Element({}, self)
|
||||
.defaults({
|
||||
disabled: false,
|
||||
image: '',
|
||||
image: options && options.maxFiles == 1 ? 'file' : 'files',
|
||||
maxFiles: -1,
|
||||
maxSize: -1,
|
||||
style: 'default',
|
||||
|
|
Loading…
Reference in a new issue