From eeeb150ddf521d1db9ae64def213554a28760ae8 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 9 Sep 2010 17:30:50 -0400 Subject: [PATCH] Remove delete icon when error is returned also. --- horde/js/plupload/uploader.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/horde/js/plupload/uploader.js b/horde/js/plupload/uploader.js index 6bdfceaa6..331f60e4f 100644 --- a/horde/js/plupload/uploader.js +++ b/horde/js/plupload/uploader.js @@ -83,7 +83,9 @@ var Horde_Uploader = Class.create({ up.unbind('UploadProgress', this.handlers.progress); $(file.id).select('.hordeUploaderFilestatus').each(function(p) { $(p).update(result.error.message); }); $(file.id).setStyle({'fontWeight': 'bold', 'color': 'red'}); - $(file.id).select('.hordeUploaderFileaction').each(function(p) { $(p).addClassName(this._params['error_class']) }.bind(this)); + $(file.id).select('.hordeUploaderFileaction').each(function(p) { + $(p).select('.hordeUploaderRemove').each(function(r) { r.remove(); }); + $(p).addClassName(this._params['error_class']) }.bind(this)); } else { $(file.id).setStyle({'fontWeight': 'bold', 'color': 'green'}); $(file.id).select('.hordeUploaderFileaction').each(function(p) { @@ -93,6 +95,10 @@ var Horde_Uploader = Class.create({ } } catch (Exception) { up.unbind('UploadProgress', this.handlers.progress); + $(file.id).select('.hordeUploaderFileaction').each(function(p) { + $(p).select('.hordeUploaderRemove').each(function(r) { r.remove(); }); + $(p).update(' ').addClassName(this._params['error_class']); + }.bind(this)); $(file.id).select('.hordeUploaderFilestatus').each(function(p) { $(p).update(Exception); }); } } -- 2.11.0