From 85a7104e2c8c66ca09d5918b65d85a8c0c35b529 Mon Sep 17 00:00:00 2001 From: Surinder Kumar Date: Tue, 21 Jun 2016 12:16:03 +0100 Subject: [PATCH] Restore should include database name in dialog title like in backup. Add icons to restore and cancel button in restore dialog. --- .../tools/restore/templates/restore/js/restore.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/pgadmin/tools/restore/templates/restore/js/restore.js b/web/pgadmin/tools/restore/templates/restore/js/restore.js index bb7982e28..ef731c6b3 100644 --- a/web/pgadmin/tools/restore/templates/restore/js/restore.js +++ b/web/pgadmin/tools/restore/templates/restore/js/restore.js @@ -286,7 +286,7 @@ define([ }, // Callback to draw Backup Dialog for objects restore_objects: function(action, treeItem) { - var title = '{{ _('Restore') }}', + var title = S('{{ 'Restore (%s: %s)' }}'), tree = pgBrowser.tree, item = treeItem || tree.selected(), data = item && item.length == 1 && tree.itemData(item), @@ -295,6 +295,8 @@ define([ if (!node) return; + title = title.sprintf(node.label, data.label).value(); + if(!alertify.pg_restore) { // Create Dialog title on the fly with node details alertify.dialog('pg_restore' ,function factory() { @@ -319,10 +321,10 @@ define([ url: '{{ url_for('help.static', filename='restore_dialog.html') }}'} },{ 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, - className: 'btn btn-danger', restore: false + className: 'btn btn-danger fa fa-lg fa-times pg-alertify-button', restore: false }], // Set options for dialog options: { @@ -379,7 +381,7 @@ define([ el: $container, model: newModel, schema: fields }); - $(this.elements.body.childNodes[2]).addClass( + $(this.elements.body.childNodes[0]).addClass( 'alertify_tools_dialog_properties obj_properties' );