MINOR Disable UploadField init on readonly or disabled fields

This commit is contained in:
Ingo Schommer 2012-03-02 00:43:14 +01:00
parent 783de154b2
commit db1854b5fb

View File

@ -30,6 +30,8 @@
Config: null, Config: null,
onmatch: function() { onmatch: function() {
if(this.is('.readonly,.disabled')) return;
var fileInput = this.find('input'); var fileInput = this.find('input');
var dropZone = this.find('.ss-uploadfield-dropzone'); var dropZone = this.find('.ss-uploadfield-dropzone');
var config = $.parseJSON(fileInput.data('config').replace(/'/g,'"')); var config = $.parseJSON(fileInput.data('config').replace(/'/g,'"'));