display correct ui for non-empty file inputs
This commit is contained in:
parent
fe8c97db24
commit
fdb8a2b98b
1 changed files with 9 additions and 2 deletions
|
@ -60,9 +60,14 @@ Ox.FileInput = function(options, self) {
|
|||
|
||||
self.$button = Ox.Button({
|
||||
style: 'symbol',
|
||||
title: 'add',
|
||||
title: self.multiple || self.options.value.length == 0
|
||||
? 'add' : 'close',
|
||||
type: 'image'
|
||||
})
|
||||
.attr({
|
||||
title: self.multiple || self.options.value.length == 0
|
||||
? '' : 'Clear'
|
||||
})
|
||||
.css({
|
||||
float: 'left',
|
||||
marginTop: '-1px'
|
||||
|
@ -72,7 +77,9 @@ Ox.FileInput = function(options, self) {
|
|||
})
|
||||
.appendTo(self.$bar);
|
||||
|
||||
if (self.multiple || self.options.value.length == 0) {
|
||||
self.$input = renderInput();
|
||||
}
|
||||
|
||||
if (self.multiple) {
|
||||
self.$files = $('<div>')
|
||||
|
|
Loading…
Reference in a new issue