diff --git a/js/export.js b/js/export.js index 96afdd13aa..1dabf31d32 100644 --- a/js/export.js +++ b/js/export.js @@ -280,22 +280,22 @@ function aliasSelectHandler(event) { */ function createAliasModal(event) { event.preventDefault(); + var dlgButtons = {}; + dlgButtons[PMA_messages.strResetAll] = function() { + $(this).find('input[type="text"]').val(''); + }; + dlgButtons[PMA_messages.strReset] = function() { + $(this).find('input[type="text"]:visible').val(''); + }; + dlgButtons[PMA_messages.strSaveAndClose] = function() { + $(this).dialog("close"); + $('#alias_modal').parent().appendTo($('form[name="dump"]')); + }; $('#alias_modal').dialog({ width: Math.min($(window).width() - 100, 700), modal: true, dialogClass: "alias-dialog", - buttons: { - 'Reset All': function() { - $(this).find('input[type="text"]').val(''); - }, - 'Reset': function() { - $(this).find('input[type="text"]:visible').val(''); - }, - 'Save & Close': function() { - $(this).dialog("close"); - $('#alias_modal').parent().appendTo($('form[name="dump"]')); - } - }, + buttons: dlgButtons, create: function() { $(this).css('maxHeight', $(window).height() - 150); $('.alias-dialog .ui-dialog-titlebar-close').remove(); diff --git a/js/messages.php b/js/messages.php index e527fb65ef..dec9992e01 100644 --- a/js/messages.php +++ b/js/messages.php @@ -45,6 +45,11 @@ $js_messages['strDropUserGroupWarning'] = __('Do you really want to delete user $js_messages['strConfirmDeleteQBESearch'] = __('Do you really want to delete the search "%s"?'); $js_messages['strConfirmNavigation'] = __('You have unsaved changes; are you sure you want to leave this page?'); +/* For modal dialog buttons */ +$js_messages['strSaveAndClose'] = __('Save & Close'); +$js_messages['strReset'] = __('Reset'); +$js_messages['strResetAll'] = __('Reset All'); + /* For indexes */ $js_messages['strFormEmpty'] = __('Missing value in the form!'); $js_messages['strRadioUnchecked'] = __('Select at least one of the options!');