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

View File

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

View File

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

View File

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

View File

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