mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Restore should include database name in dialog title like in backup.
Add icons to restore and cancel button in restore dialog.
This commit is contained in:
parent
52906dd020
commit
85a7104e2c
@ -286,7 +286,7 @@ define([
|
|||||||
},
|
},
|
||||||
// Callback to draw Backup Dialog for objects
|
// Callback to draw Backup Dialog for objects
|
||||||
restore_objects: function(action, treeItem) {
|
restore_objects: function(action, treeItem) {
|
||||||
var title = '{{ _('Restore') }}',
|
var title = S('{{ 'Restore (%s: %s)' }}'),
|
||||||
tree = pgBrowser.tree,
|
tree = pgBrowser.tree,
|
||||||
item = treeItem || tree.selected(),
|
item = treeItem || tree.selected(),
|
||||||
data = item && item.length == 1 && tree.itemData(item),
|
data = item && item.length == 1 && tree.itemData(item),
|
||||||
@ -295,6 +295,8 @@ define([
|
|||||||
if (!node)
|
if (!node)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
title = title.sprintf(node.label, data.label).value();
|
||||||
|
|
||||||
if(!alertify.pg_restore) {
|
if(!alertify.pg_restore) {
|
||||||
// Create Dialog title on the fly with node details
|
// Create Dialog title on the fly with node details
|
||||||
alertify.dialog('pg_restore' ,function factory() {
|
alertify.dialog('pg_restore' ,function factory() {
|
||||||
@ -319,10 +321,10 @@ define([
|
|||||||
url: '{{ url_for('help.static', filename='restore_dialog.html') }}'}
|
url: '{{ url_for('help.static', filename='restore_dialog.html') }}'}
|
||||||
},{
|
},{
|
||||||
text: '{{ _('Restore') }}', key: 27,
|
text: '{{ _('Restore') }}', key: 27,
|
||||||
className: 'btn btn-primary', restore: true
|
className: 'btn btn-primary fa fa-upload pg-alertify-button', restore: true
|
||||||
},{
|
},{
|
||||||
text: '{{ _('Cancel') }}', key: 27,
|
text: '{{ _('Cancel') }}', key: 27,
|
||||||
className: 'btn btn-danger', restore: false
|
className: 'btn btn-danger fa fa-lg fa-times pg-alertify-button', restore: false
|
||||||
}],
|
}],
|
||||||
// Set options for dialog
|
// Set options for dialog
|
||||||
options: {
|
options: {
|
||||||
@ -379,7 +381,7 @@ define([
|
|||||||
el: $container, model: newModel, schema: fields
|
el: $container, model: newModel, schema: fields
|
||||||
});
|
});
|
||||||
|
|
||||||
$(this.elements.body.childNodes[2]).addClass(
|
$(this.elements.body.childNodes[0]).addClass(
|
||||||
'alertify_tools_dialog_properties obj_properties'
|
'alertify_tools_dialog_properties obj_properties'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user