mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-31 16:37:42 -05:00
Fixed an issue where the error message does not have a close button on utility dialogs. Fixes #5670
This commit is contained in:
1 parent
9ad7476a34
commit
3672013ddc
11 files changed
+88
-44
No files matched your search
@@ -631,6 +631,9 @@ define([
|
||||
' <i class="fa fa-exclamation-triangle text-danger" aria-hidden="true"></i> ' +
|
||||
' </div> ' +
|
||||
' <div class="alert-text" role="alert"></div> ' +
|
||||
' <div class="ml-auto close-error-bar"> ' +
|
||||
' <a aria-label="' + gettext('Close error bar') + '" class="close-error fa fa-times text-danger"></a> ' +
|
||||
' </div> ' +
|
||||
' </div> ' +
|
||||
' </div> ' +
|
||||
'</div>').appendTo($container);
|
||||
@@ -645,6 +648,10 @@ define([
|
||||
ctx.errorModel.set(errorField, errormsg);
|
||||
statusBar.removeClass('d-none');
|
||||
statusBar.find('.alert-text').html(errormsg);
|
||||
self.elements.dialog.querySelector('.close-error').addEventListener('click', ()=>{
|
||||
statusBar.addClass('d-none');
|
||||
ctx.errorModel.set(errorField, errormsg);
|
||||
});
|
||||
};
|
||||
if (!_.isUndefined(this.get('filename')) && this.get('filename') !== '') {
|
||||
this.errorModel.clear();
|
||||
|
||||
Reference in new issue
Block a user