From db1854b5fb53d400f7b024b11b4c83a8f6954045 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 2 Mar 2012 00:43:14 +0100 Subject: [PATCH] MINOR Disable UploadField init on readonly or disabled fields --- javascript/UploadField.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/javascript/UploadField.js b/javascript/UploadField.js index 8ae2366f9..2a00e33c2 100644 --- a/javascript/UploadField.js +++ b/javascript/UploadField.js @@ -30,6 +30,8 @@ Config: null, onmatch: function() { + if(this.is('.readonly,.disabled')) return; + var fileInput = this.find('input'); var dropZone = this.find('.ss-uploadfield-dropzone'); var config = $.parseJSON(fileInput.data('config').replace(/'/g,'"'));