diff --git a/web/pgadmin/tools/backup/templates/backup/js/backup.js b/web/pgadmin/tools/backup/templates/backup/js/backup.js index 96fe082..4c742f9 100644 --- a/web/pgadmin/tools/backup/templates/backup/js/backup.js +++ b/web/pgadmin/tools/backup/templates/backup/js/backup.js @@ -123,10 +123,10 @@ TODO LIST FOR BACKUP: width: "100%" }, options: [ - {label: "Custom", value: "custom"}, - {label: "Tar", value: "tar"}, - {label: "Plain", value: "plain"}, - {label: "Directory", value: "directory"} + {label: '{{ _('Custom') }}', value: "custom"}, + {label: '{{ _('Tar') }}', value: "tar"}, + {label: '{{ _('Plain') }}', value: "plain"}, + {label: '{{ _('Directory') }}', value: "directory"} ] },{ id: 'ratio', label: '{{ _('Compression ratio') }}', @@ -447,9 +447,11 @@ TODO LIST FOR BACKUP: url: '{{ url_for('help.static', filename='backup_dialog.html') }}' } },{ - text: '{{ _('Backup') }}', key: 27, className: 'btn btn-primary fa fa-lg fa-save pg-alertify-button' + text: '{{ _('Backup') }}', key: 27, className: 'btn btn-primary fa fa-lg fa-save pg-alertify-button', + 'data-btn-name': 'backup' },{ - text: '{{ _('Cancel') }}', key: 27, className: 'btn btn-danger fa fa-lg fa-times pg-alertify-button' + text: '{{ _('Cancel') }}', key: 27, className: 'btn btn-danger fa fa-lg fa-times pg-alertify-button', + 'data-btn-name': 'cancel' }], // Set options for dialog options: { @@ -537,7 +539,7 @@ TODO LIST FOR BACKUP: return; } - if (e.button.text === '{{ _('Backup') }}') { + if (e.button['data-btn-name'] === "backup") { if (!d) return; @@ -660,9 +662,11 @@ TODO LIST FOR BACKUP: attrs:{name:'dialog_help', type:'button', label: '{{ _('Backup') }}', url: '{{ url_for('help.static', filename='backup_dialog.html') }}'} },{ - text: '{{ _('Backup') }}', key: 27, className: 'btn btn-primary fa fa-lg fa-save pg-alertify-button' + text: '{{ _('Backup') }}', key: 27, className: 'btn btn-primary fa fa-lg fa-save pg-alertify-button', + 'data-btn-name': 'backup' },{ - text: '{{ _('Cancel') }}', key: 27, className: 'btn btn-danger fa fa-lg fa-times pg-alertify-button' + text: '{{ _('Cancel') }}', key: 27, className: 'btn btn-danger fa fa-lg fa-times pg-alertify-button', + 'data-btn-name': 'cancel' }], // Set options for dialog options: { @@ -748,7 +752,7 @@ TODO LIST FOR BACKUP: return; } - if (e.button.text === "Backup") { + if (e.button['data-btn-name'] === "backup") { if (!d) return; diff --git a/web/pgadmin/tools/import_export/templates/import_export/js/import_export.js b/web/pgadmin/tools/import_export/templates/import_export/js/import_export.js index 8859b23..a300531 100644 --- a/web/pgadmin/tools/import_export/templates/import_export/js/import_export.js +++ b/web/pgadmin/tools/import_export/templates/import_export/js/import_export.js @@ -374,10 +374,12 @@ define( return { buttons:[{ text: "{{ _('OK') }}", key: 27, disable: true, + 'data-btn-name': 'ok', className: "btn btn-primary fa fa-lg fa-save pg-alertify-button" }, { text: "{{ _('Cancel') }}", key: 27, + 'data-btn-name': 'cancel', className: "btn btn-danger fa fa-lg fa-times pg-alertify-button" }], @@ -393,7 +395,7 @@ define( // Callback functions when click on the buttons of the Alertify dialogs callback: function(e) { - if (e.button.text === "{{ _('OK') }}") { + if (e.button['data-btn-name'] === "ok") { var n = this.settings['pg_node'], i = this.settings['pg_item'], diff --git a/web/pgadmin/tools/maintenance/templates/maintenance/js/maintenance.js b/web/pgadmin/tools/maintenance/templates/maintenance/js/maintenance.js index 0466e74..3d2b51a 100644 --- a/web/pgadmin/tools/maintenance/templates/maintenance/js/maintenance.js +++ b/web/pgadmin/tools/maintenance/templates/maintenance/js/maintenance.js @@ -269,9 +269,11 @@ define( attrs:{name:'dialog_help', type:'button', label: '{{ _('Maintenance') }}', url: '{{ url_for('help.static', filename='maintenance_dialog.html') }}'} },{ - text: "{{ _('OK') }}", key: 27, className: "btn btn-primary fa fa-lg fa-save pg-alertify-button" + text: "{{ _('OK') }}", key: 27, className: "btn btn-primary fa fa-lg fa-save pg-alertify-button", + 'data-btn-name': 'ok', },{ - text: "{{ _('Cancel') }}", key: 27, className: "btn btn-danger fa fa-lg fa-times pg-alertify-button" + text: "{{ _('Cancel') }}", key: 27, className: "btn btn-danger fa fa-lg fa-times pg-alertify-button", + 'data-btn-name': 'cancel', }], options: { modal: 0, pinnable: false} }; @@ -289,7 +291,7 @@ define( return; } - if (e.button.text === "{{ _('OK') }}") { + if (e.button['data-btn-name'] === "ok") { var schema = undefined, table = undefined, diff --git a/web/pgadmin/tools/restore/templates/restore/js/restore.js b/web/pgadmin/tools/restore/templates/restore/js/restore.js index df3e193..e17d9ce 100644 --- a/web/pgadmin/tools/restore/templates/restore/js/restore.js +++ b/web/pgadmin/tools/restore/templates/restore/js/restore.js @@ -36,7 +36,7 @@ define([ custom: false, file: undefined, role: undefined, - format: 'Custom or tar', + format: 'custom', verbose: true, blobs: true, encoding: undefined, @@ -81,8 +81,8 @@ define([ width: "100%" }, options: [ - {label: "Custom or tar", value: "custom"}, - {label: "Directory", value: "directory"} + {label: '{{ _('Custom or tar') }}', value: "custom"}, + {label: '{{ _('Directory') }}', value: "directory"} ] },{ id: 'file', label: '{{ _('Filename') }}', @@ -374,10 +374,12 @@ define([ url: '{{ url_for('help.static', filename='restore_dialog.html') }}'} },{ text: '{{ _('Restore') }}', key: 27, - className: 'btn btn-primary fa fa-upload pg-alertify-button', restore: true + className: 'btn btn-primary fa fa-upload pg-alertify-button', restore: true, + 'data-btn-name': 'restore' },{ text: '{{ _('Cancel') }}', key: 27, - className: 'btn btn-danger fa fa-lg fa-times pg-alertify-button', restore: false + className: 'btn btn-danger fa fa-lg fa-times pg-alertify-button', restore: false, + 'data-btn-name': 'cancel' }], // Set options for dialog options: { @@ -473,7 +475,7 @@ define([ return; } - if (e.button.restore) { + if (e.button['data-btn-name'] === "restore") { if (!d) return;