diff --git a/source/Ox.UI/js/Form/FileInput.js b/source/Ox.UI/js/Form/FileInput.js index 6ddab3b6..222b98ec 100644 --- a/source/Ox.UI/js/Form/FileInput.js +++ b/source/Ox.UI/js/Form/FileInput.js @@ -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); - self.$input = renderInput(); + if (self.multiple || self.options.value.length == 0) { + self.$input = renderInput(); + } if (self.multiple) { self.$files = $('