Close button added to the alertify message box, which pops up in case of backend error. Fixes #3290

This commit is contained in:
Ashesh Vashi 2018-04-24 18:57:31 +05:30 committed by Akshay Joshi
parent eb35629712
commit b653b742ed
5 changed files with 14 additions and 7 deletions

View File

@ -420,10 +420,10 @@ define('pgadmin.node.server', [
return {
buttons: [{
text: gettext('Ok'), key: 13, className: 'btn btn-primary',
attrs:{name:'submit'},
attrs: {name:'submit'},
},{
text: gettext('Cancel'), key: 27, className: 'btn btn-danger',
attrs:{name:'cancel'},
text: gettext('Cancel'), key: 27,
className: 'btn btn-danger', attrs: {name: 'cancel'},
}],
// Set options for dialog
options: {
@ -1046,6 +1046,7 @@ define('pgadmin.node.server', [
text: gettext('OK'), key: 13, className: 'btn btn-primary',
},{
text: gettext('Cancel'), className: 'btn btn-danger',
key: 27,
}],
focus: {element: '#password', select: true},
options: {

View File

@ -37,7 +37,7 @@ function(gettext, _, alertify, pgAdmin) {
alertify.alert(
title,
text
);
).set('closable', true);
},
});

View File

@ -21,9 +21,10 @@ define([
setup: function() {
return {
options: {
//disable both padding and overflow control.
// Disable both padding and overflow control.
padding: !1,
overflow: !1,
closable: true,
},
};
},
@ -127,13 +128,15 @@ define([
return;
}
} catch (e) {
alertify.alert().show().set('message', e.message).set('title', 'Error');
alertify.alert().show().set('message', e.message).set(
'title', 'Error'
).set('closable', true);
}
}
}
alertify.alert().show().set(
'message', msg.replace(new RegExp(/\r?\n/, 'g'), '<br />')
).set('title', promptmsg);
).set('title', promptmsg).set('closable', true);
};
var alertifyDialogResized = function(stop) {

View File

@ -286,10 +286,12 @@ define('pgadmin.datagrid', [
return {
buttons:[{
text: gettext('OK'),
key: 13,
className: 'btn btn-primary',
},
{
text: gettext('Cancel'),
key: 27,
className: 'btn btn-danger',
},
],

View File

@ -1749,6 +1749,7 @@ define('tools.querytool', [
},
{
text: gettext('Cancel'),
key: 27,
className: 'btn btn-danger',
},
],