From: Michael J. Rubinsky Date: Thu, 9 Sep 2010 21:30:50 +0000 (-0400) Subject: Remove delete icon when error is returned also. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=eeeb150ddf521d1db9ae64def213554a28760ae8;p=horde.git Remove delete icon when error is returned also. --- 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); }); } }