diff --git a/js/icon_select.js b/js/icon_select.js
index 72e87755c..413a403d2 100644
--- a/js/icon_select.js
+++ b/js/icon_select.js
@@ -34,7 +34,7 @@ $(function()
}
this.oImg = $('
');
this.oLabel = $(''+sLabel+'');
- this.oButton = $('');
+ this.oButton = $('');
this.oButton.prepend(this.oLabel).prepend(this.oImg);
this.oButton.click(function(event, ui) { me._on_button_clicked(event, ui); });
this.element.after(this.oButton);
@@ -49,7 +49,7 @@ $(function()
});
if (this.options.post_upload_to != null)
{
- this.oUploadBtn = $('');
+ this.oUploadBtn = $('');
this.oUploadBtn.click( function() { me._upload_dlg(); } );
this.oButton.after(this.oUploadBtn);
}
@@ -193,6 +193,12 @@ $(function()
_do_upload: function()
{
var me = this;
+ var $element = this.oUploadDlg.find('#file');
+ this.oUploadDlg.closest('.ui-dialog').find('.ui-button').button('disable');
+ if (ReplaceWithAnimation)
+ {
+ ReplaceWithAnimation($element);
+ }
$.ajaxFileUpload
(
{
@@ -226,11 +232,12 @@ $(function()
this.oLabel.text(this.options.items[idx].label);
}
this.element.trigger('change');
- this.oUploadDlg.dialog( "close" );
+ this.oUploadDlg.dialog('close');
},
_on_upload_error: function(data, status, e)
{
alert(e);
+ this.oUploadDlg.closest('.ui-dialog').find('.ui-button').button('enable');
}
});
});