diff --git a/modules/gallery/js/l10n_client.js b/modules/gallery/js/l10n_client.js index 80fe166b26..35986e5a69 100644 --- a/modules/gallery/js/l10n_client.js +++ b/modules/gallery/js/l10n_client.js @@ -205,6 +205,19 @@ Gallery.behaviors.l10nClient = function(context) { Gallery.l10nClient.toggle(0); } }); + + // Close the l10n client using an AJAX call and refreshing the page + $('#gCloseL10n').click(function(event) { + $.ajax({ + type: "GET", + url: toggle_l10n_mode_url, + data: "csrf=" + csrf, + success: function() { + window.location.reload(true); + } + }); + event.preventDefault(); + }); // Register keybindings using jQuery hotkeys // TODO: Either remove hotkeys code or add query.hotkeys.js. diff --git a/modules/gallery/views/l10n_client.html.php b/modules/gallery/views/l10n_client.html.php index 5ee7eca33b..6c440b6858 100644 --- a/modules/gallery/views/l10n_client.html.php +++ b/modules/gallery/views/l10n_client.html.php @@ -3,7 +3,8 @@
_ - X + " + href="">X

get('show_all_l10n_messages')): ?> @@ -76,5 +77,7 @@ class="gButtonLink ui-state-default ui-corner-all">< var MSG_CLOSE_X = ""; var l10n_client_data = ; var plural_forms = ; + var toggle_l10n_mode_url = ""; + var csrf = "";