From 7580d35be816ad73ca6d9434f7992301c000d0fa Mon Sep 17 00:00:00 2001 From: scott1702 Date: Fri, 19 Feb 2016 15:05:54 +1300 Subject: [PATCH] Fix ability to edit files immeditately after upload Conflicts: javascript/dist/UploadField.js --- javascript/dist/UploadField.js | 3 ++- javascript/src/UploadField.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/javascript/dist/UploadField.js b/javascript/dist/UploadField.js index c96b9f030..10a31cc5a 100644 --- a/javascript/dist/UploadField.js +++ b/javascript/dist/UploadField.js @@ -417,10 +417,11 @@ } if (iframe.attr('src') == 'about:blank') { + var disabled = this.siblings(); + iframe.attr('src', iframe.data('src')); iframe.parent().addClass('loading'); - disabled = this.siblings(); disabled.addClass('ui-state-disabled'); disabled.attr('disabled', 'disabled'); diff --git a/javascript/src/UploadField.js b/javascript/src/UploadField.js index 904cbedd1..391bae389 100644 --- a/javascript/src/UploadField.js +++ b/javascript/src/UploadField.js @@ -430,13 +430,14 @@ $.entwine('ss', function($) { } if (iframe.attr('src') == 'about:blank') { + var disabled = this.siblings(); + // Lazy-load the iframe on editform toggle iframe.attr('src', iframe.data('src')); // Add loading class, disable buttons while loading is in progress // (_prepareIframe() handles re-enabling them when appropriate) iframe.parent().addClass('loading'); - disabled=this.siblings(); disabled.addClass('ui-state-disabled'); disabled.attr('disabled', 'disabled');