|
|
|
@ -545,12 +545,12 @@
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_events: function (wrap) { |
|
|
|
|
var self = this; |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
event.add(wrap.dom.input, "change", function () { |
|
|
|
|
event.del(wrap.dom.input, "change", arguments.callee); |
|
|
|
|
var input = wrap.dom.input.cloneNode(true); |
|
|
|
|
var files = F(wrap.dom.input); |
|
|
|
|
if (wrap.maxLength !== -1 && wrap.maxLength < files.length) { |
|
|
|
|
if (o.maxLength !== -1 && o.maxLength < files.length) { |
|
|
|
|
self.fireEvent(BI.File.EVENT_ERROR, { |
|
|
|
|
errorType: 2 |
|
|
|
|
}); |
|
|
|
@ -654,6 +654,13 @@
|
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
setMaxFileLength: function(v) { |
|
|
|
|
this.options.maxLength = v; |
|
|
|
|
if (this.wrap) { |
|
|
|
|
this.wrap.maxLength = v; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
select: function () { |
|
|
|
|
this.wrap && BI.Widget._renderEngine.createElement(this.wrap.dom.input).click(); |
|
|
|
|
}, |
|
|
|
|